Skip to content
Snippets Groups Projects
Commit 29cbe1f2 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Finishing lists if not on a root page for all modes & cases

parent a9e2ea94
No related branches found
No related tags found
1 merge request!3New version 4 1
...@@ -186,12 +186,8 @@ class MailController extends ActionController { ...@@ -186,12 +186,8 @@ class MailController extends ActionController {
$pageUid = (int) GeneralUtility::_GP('id'); $pageUid = (int) GeneralUtility::_GP('id');
$pageInfo = BackendUtility::readPageAccess($pageUid, $GLOBALS['BE_USER']->getPagePermsClause(1)); $pageInfo = BackendUtility::readPageAccess($pageUid, $GLOBALS['BE_USER']->getPagePermsClause(1));
if ($pageInfo) { if ($pageInfo && $pageInfo['is_siteroot'] === '1') {
$this->docHeaderComponent = GeneralUtility::makeInstance(DocHeaderComponent::class);
$this->docHeaderComponent->setMetaInformation($pageInfo);
BackendService::makeButtons($this->docHeaderComponent, $this->request);
$this->view->assign('docHeader', $this->docHeaderComponent->docHeaderContent());
$this->view->assign('templateDescription', $templateDescription); $this->view->assign('templateDescription', $templateDescription);
$this->view->assign('selectedTemplate', $registerArray[$selectedExtension][$selectedTemplate]); $this->view->assign('selectedTemplate', $registerArray[$selectedExtension][$selectedTemplate]);
$this->view->assign('selectedTemplateKey', $selectedTemplate); $this->view->assign('selectedTemplateKey', $selectedTemplate);
...@@ -199,8 +195,15 @@ class MailController extends ActionController { ...@@ -199,8 +195,15 @@ class MailController extends ActionController {
$this->view->assign('selectedLanguageLeft', $selectedLanguages['left']); $this->view->assign('selectedLanguageLeft', $selectedLanguages['left']);
$this->view->assign('selectedLanguageRight', $selectedLanguages['right']); $this->view->assign('selectedLanguageRight', $selectedLanguages['right']);
$this->view->assign('mode', 'editor'); $this->view->assign('mode', 'editor');
} else {
$this->view->assign('pages', BackendService::getPages());
} }
$this->docHeaderComponent = GeneralUtility::makeInstance(DocHeaderComponent::class);
$this->docHeaderComponent->setMetaInformation($pageInfo);
BackendService::makeButtons($this->docHeaderComponent, $this->request);
$this->view->assign('docHeader', $this->docHeaderComponent->docHeaderContent());
$this->view->assign('typo3Version', VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version)); $this->view->assign('typo3Version', VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version));
} }
......
...@@ -80,11 +80,6 @@ class QueueController extends ActionController { ...@@ -80,11 +80,6 @@ class QueueController extends ActionController {
$pageUid = (int) GeneralUtility::_GP('id'); $pageUid = (int) GeneralUtility::_GP('id');
$pageInfo = BackendUtility::readPageAccess($pageUid, $GLOBALS['BE_USER']->getPagePermsClause(1)); $pageInfo = BackendUtility::readPageAccess($pageUid, $GLOBALS['BE_USER']->getPagePermsClause(1));
if ($pageInfo && $pageInfo['is_siteroot'] === '1') { if ($pageInfo && $pageInfo['is_siteroot'] === '1') {
$this->docHeaderComponent = GeneralUtility::makeInstance(DocHeaderComponent::class);
$this->docHeaderComponent->setMetaInformation($pageInfo);
$this->view->assign('docHeader', $this->docHeaderComponent->docHeaderContent());
BackendService::makeButtons($this->docHeaderComponent, $this->request);
$this->view->assign('selectedTemplateKey', $selectedTemplate); $this->view->assign('selectedTemplateKey', $selectedTemplate);
$this->view->assign('selectedExtensionKey', $selectedExtension); $this->view->assign('selectedExtensionKey', $selectedExtension);
...@@ -98,6 +93,11 @@ class QueueController extends ActionController { ...@@ -98,6 +93,11 @@ class QueueController extends ActionController {
} else { } else {
$this->view->assign('pages', BackendService::getPages()); $this->view->assign('pages', BackendService::getPages());
} }
$this->docHeaderComponent = GeneralUtility::makeInstance(DocHeaderComponent::class);
$this->docHeaderComponent->setMetaInformation($pageInfo);
$this->view->assign('docHeader', $this->docHeaderComponent->docHeaderContent());
BackendService::makeButtons($this->docHeaderComponent, $this->request);
$this->view->assign('typo3Version', VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version)); $this->view->assign('typo3Version', VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version));
} }
......
...@@ -9,106 +9,116 @@ ...@@ -9,106 +9,116 @@
<div class="module" data-module-id="" data-module-name=""> <div class="module" data-module-id="" data-module-name="">
<div class="module-docheader t3js-module-docheader"> <div class="module-docheader t3js-module-docheader">
<div class="module-docheader-bar module-docheader-bar-navigation t3js-module-docheader-bar t3js-module-docheader-bar-navigation"> <div class="module-docheader-bar module-docheader-bar-navigation t3js-module-docheader-bar t3js-module-docheader-bar-navigation">
<div class="module-docheader-bar-column-left"> <f:if condition="{pages}">
<f:be.menus.actionMenu> <f:then></f:then>
<f:if condition="{mode} == 'queue'"> <f:else>
<f:then> <div class="module-docheader-bar-column-left">
<sgm:be.menus.actionMenuItem label="{f:translate(key:'backend.mail_queue')}"
controller="Queue"
action="index"
arguments="{selectedTemplate: selectedTemplateKey, selectedExtension: selectedExtensionKey}"
additionalAttributes="{selected: 'selected'}" />
</f:then>
<f:else>
<sgm:be.menus.actionMenuItem label="{f:translate(key:'backend.mail_queue')}"
controller="Queue"
action="index"
arguments="{selectedTemplate: selectedTemplateKey, selectedExtension: selectedExtensionKey}" />
</f:else>
</f:if>
<f:if condition="{mode} == 'editor'">
<f:then>
<sgm:be.menus.actionMenuItem label="{f:translate(key:'backend.template_editor')}"
controller="Mail"
action="index"
arguments="{selectedTemplate: selectedTemplateKey, selectedExtension: selectedExtensionKey}"
additionalAttributes="{selected: 'selected'}" />
</f:then>
<f:else>
<sgm:be.menus.actionMenuItem label="{f:translate(key:'backend.template_editor')}"
controller="Mail"
action="index"
arguments="{selectedTemplate: selectedTemplateKey, selectedExtension: selectedExtensionKey}" />
</f:else>
</f:if>
</f:be.menus.actionMenu>
</div>
<div class="module-docheader-bar-column-right">
<span class="typo3-docheader-pagePath"><f:translate key="LLL:EXT:lang/locallang_core.xlf:labels.path" />: <f:format.raw>{docHeader.metaInformation.path}</f:format.raw></span>
<f:format.raw>{docHeader.metaInformation.recordInformation}</f:format.raw>
</div>
</div>
<div class="module-docheader-bar module-docheader-bar-buttons t3js-module-docheader-bar t3js-module-docheader-bar-buttons">
<div class="module-docheader-bar-column-left">
<div class="btn-toolbar" role="toolbar" aria-label="">
<f:if condition="{templates}">
<f:be.menus.actionMenu> <f:be.menus.actionMenu>
<f:for each="{templates}" as="template" key="extensionKey"> <f:if condition="{mode} == 'queue'">
<f:if condition="{mode} == 'queue'"> <f:then>
<sgm:be.menus.actionMenuOptionGroup label="{extensionKey}"> <sgm:be.menus.actionMenuItem label="{f:translate(key:'backend.mail_queue')}"
<f:for each="{template}" as="currentTemplate" key="templateKey"> controller="Queue"
<sgm:extendedIf condition="{selectedTemplateKey} == {templateKey}" action="index"
and="{selectedExtensionKey} == {extensionKey}"> arguments="{selectedTemplate: selectedTemplateKey, selectedExtension: selectedExtensionKey}"
<f:then> additionalAttributes="{selected: 'selected'}" />
<sgm:be.menus.actionMenuItem label="{currentTemplate.templateName}" </f:then>
controller="Queue"
action="index"
arguments="{selectedTemplate: templateKey, selectedExtension: extensionKey}"
additionalAttributes="{selected: 'selected'}" />
</f:then>
<f:else>
<sgm:be.menus.actionMenuItem label="{currentTemplate.templateName}"
controller="Queue"
action="index"
arguments="{selectedTemplate: templateKey, selectedExtension: extensionKey}" />
</f:else>
</sgm:extendedIf>
</f:for>
</sgm:be.menus.actionMenuOptionGroup>
</f:if>
<f:else> <f:else>
<f:if condition="{mode} == 'editor'"> <sgm:be.menus.actionMenuItem label="{f:translate(key:'backend.mail_queue')}"
<sgm:be.menus.actionMenuOptionGroup label="{extensionKey}"> controller="Queue"
<f:for each="{template}" as="currentTemplate" key="templateKey"> action="index"
<sgm:extendedIf condition="{selectedTemplateKey} == {templateKey}" arguments="{selectedTemplate: selectedTemplateKey, selectedExtension: selectedExtensionKey}" />
and="{selectedExtensionKey} == {extensionKey}">
<f:then>
<sgm:be.menus.actionMenuItem label="{currentTemplate.templateName}"
controller="Mail"
action="index"
arguments="{selectedTemplate: templateKey, selectedExtension: extensionKey}"
additionalAttributes="{selected: 'selected'}" />
</f:then>
<f:else>
<sgm:be.menus.actionMenuItem label="{currentTemplate.templateName}"
controller="Mail"
action="index"
arguments="{selectedTemplate: templateKey, selectedExtension: extensionKey}" />
</f:else>
</sgm:extendedIf>
</f:for>
</sgm:be.menus.actionMenuOptionGroup>
</f:if>
</f:else> </f:else>
</f:for> </f:if>
<f:if condition="{mode} == 'editor'">
<f:then>
<sgm:be.menus.actionMenuItem label="{f:translate(key:'backend.template_editor')}"
controller="Mail"
action="index"
arguments="{selectedTemplate: selectedTemplateKey, selectedExtension: selectedExtensionKey}"
additionalAttributes="{selected: 'selected'}" />
</f:then>
<f:else>
<sgm:be.menus.actionMenuItem label="{f:translate(key:'backend.template_editor')}"
controller="Mail"
action="index"
arguments="{selectedTemplate: selectedTemplateKey, selectedExtension: selectedExtensionKey}" />
</f:else>
</f:if>
</f:be.menus.actionMenu> </f:be.menus.actionMenu>
</f:if> </div>
</div> </f:else>
</div> </f:if>
<div class="module-docheader-bar-column-right"> <div class="module-docheader-bar-column-right">
<f:render partial="ButtonBar" arguments="{buttons:docHeader.buttons.right}" /> <span class="typo3-docheader-pagePath"><f:translate key="LLL:EXT:lang/locallang_core.xlf:labels.path" />: <f:format.raw>{docHeader.metaInformation.path}</f:format.raw></span>
<f:format.raw>{docHeader.metaInformation.recordInformation}</f:format.raw>
</div> </div>
</div> </div>
<f:if condition="{pages}">
<f:then></f:then>
<f:else>
<div class="module-docheader-bar module-docheader-bar-buttons t3js-module-docheader-bar t3js-module-docheader-bar-buttons">
<div class="module-docheader-bar-column-left">
<div class="btn-toolbar" role="toolbar" aria-label="">
<f:if condition="{templates}">
<f:be.menus.actionMenu>
<f:for each="{templates}" as="template" key="extensionKey">
<f:if condition="{mode} == 'queue'">
<sgm:be.menus.actionMenuOptionGroup label="{extensionKey}">
<f:for each="{template}" as="currentTemplate" key="templateKey">
<sgm:extendedIf condition="{selectedTemplateKey} == {templateKey}"
and="{selectedExtensionKey} == {extensionKey}">
<f:then>
<sgm:be.menus.actionMenuItem label="{currentTemplate.templateName}"
controller="Queue"
action="index"
arguments="{selectedTemplate: templateKey, selectedExtension: extensionKey}"
additionalAttributes="{selected: 'selected'}" />
</f:then>
<f:else>
<sgm:be.menus.actionMenuItem label="{currentTemplate.templateName}"
controller="Queue"
action="index"
arguments="{selectedTemplate: templateKey, selectedExtension: extensionKey}" />
</f:else>
</sgm:extendedIf>
</f:for>
</sgm:be.menus.actionMenuOptionGroup>
</f:if>
<f:else>
<f:if condition="{mode} == 'editor'">
<sgm:be.menus.actionMenuOptionGroup label="{extensionKey}">
<f:for each="{template}" as="currentTemplate" key="templateKey">
<sgm:extendedIf condition="{selectedTemplateKey} == {templateKey}"
and="{selectedExtensionKey} == {extensionKey}">
<f:then>
<sgm:be.menus.actionMenuItem label="{currentTemplate.templateName}"
controller="Mail"
action="index"
arguments="{selectedTemplate: templateKey, selectedExtension: extensionKey}"
additionalAttributes="{selected: 'selected'}" />
</f:then>
<f:else>
<sgm:be.menus.actionMenuItem label="{currentTemplate.templateName}"
controller="Mail"
action="index"
arguments="{selectedTemplate: templateKey, selectedExtension: extensionKey}" />
</f:else>
</sgm:extendedIf>
</f:for>
</sgm:be.menus.actionMenuOptionGroup>
</f:if>
</f:else>
</f:for>
</f:be.menus.actionMenu>
</f:if>
</div>
</div>
<div class="module-docheader-bar-column-right">
<f:render partial="ButtonBar" arguments="{buttons:docHeader.buttons.right}" />
</div>
</div>
</f:else>
</f:if>
</div> </div>
</div> </div>
<div id="typo3-docbody"> <div id="typo3-docbody">
......
...@@ -6,6 +6,28 @@ ...@@ -6,6 +6,28 @@
</f:section> </f:section>
<f:section name="content"> <f:section name="content">
<f:flashMessages /> <f:flashMessages />
<f:if condition="{pages}">
<div class="panel panel-default recordlist">
<div class="table-fit">
<table data-table="pages" class="table table-striped table-hover">
<tbody>
<f:for each="{pages}" as="page">
<tr data-uid="{page.pid}">
<td nowrap="nowrap" class="col-title">
<a href="#" onclick="sgMailGoToPage({page.uid}); return false;">
<sgm:backend.icon table="pages" row="{page}" clickMenu="0" />
{page._thePathFull}
</a>
</td>
</tr>
</f:for>
</tbody>
</table>
</div>
</div>
</f:if>
<f:if condition="{selectedTemplate}"> <f:if condition="{selectedTemplate}">
<f:then> <f:then>
<div class="form-group col-md-6"> <div class="form-group col-md-6">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment