Skip to content
Snippets Groups Projects
Commit dca8d72e authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[BUGFIX] Fix the DocHeader generation of sg_mail backend module

parent ee2ac55f
No related branches found
No related tags found
1 merge request!13Feature upgrade to9 lts
......@@ -8,51 +8,10 @@
<sgm:inlineLanguageLabels labels="backend.delete_template, backend.send_mail_manually, backend.send_mail_again" />
<div class="module" data-module-id="" data-module-name="">
<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">
<f:if condition="{pages}">
<f:then></f:then>
<f:else>
<div class="module-docheader-bar-column-left">
<f:be.menus.actionMenu>
<f:if condition="{mode} == 'queue'">
<f:then>
<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>
</f:else>
</f:if>
<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>
<f:render
partial="Module/DocHeader"
section="main"
arguments="{pages: pages, selectedTemplateKey: selectedTemplateKey, selectedExtensionKey: selectedExtensionKey}" />
<f:if condition="{pages}">
<f:then></f:then>
<f:else>
......@@ -61,52 +20,23 @@
<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="{parameters: {selectedTemplate: templateKey, selectedExtension: extensionKey}}"
additionalAttributes="{selected: 'selected'}" />
</f:then>
<f:else>
<sgm:be.menus.actionMenuItem label="{currentTemplate.templateName}"
controller="Queue"
action="index"
arguments="{parameters: {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="{f:if(condition: '{extensionKey} == \'sg_mail\'', then: '{f:translate(key: \'backend.default_extension_name\')}', else: '{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="{parameters: {selectedTemplate: templateKey, selectedExtension: extensionKey}}"
additionalAttributes="{selected: 'selected'}" />
</f:then>
<f:else>
<sgm:be.menus.actionMenuItem label="{currentTemplate.templateName}"
controller="Mail"
action="index"
arguments="{parameters: {selectedTemplate: templateKey, selectedExtension: extensionKey}}" />
</f:else>
</sgm:extendedIf>
</f:for>
</sgm:be.menus.actionMenuOptionGroup>
</f:if>
</f:else>
<f:comment><!--
Do not use f:be.menus.actionMenuItemGroup here,
because it does not work with f:for as child!
--></f:comment>
<optgroup label="{extensionKey}">
<f:for each="{template}" as="currentTemplate" key="templateKey">
<f:render
partial="Module/DocHeader"
section="actionMenuItem"
arguments="{
controller: '{f:if(condition:\'{mode}==queue\', then:\'Queue\',else:\'Mail\')}',
action: 'index',
selectedTemplateKey: templateKey,
selectedExtensionKey: extensionKey,
label: '{currentTemplate.templateName}'}" />
</f:for>
</optgroup>
</f:for>
</f:be.menus.actionMenu>
</f:if>
......
......@@ -9,51 +9,10 @@
<sgm:inlineLanguageLabels labels="backend.delete_template, backend.send_mail_manually, backend.send_mail_again" />
<div class="module" data-module-id="" data-module-name="">
<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">
<f:if condition="{pages}">
<f:then></f:then>
<f:else>
<div class="module-docheader-bar-column-left">
<f:be.menus.actionMenu>
<f:if condition="{mode} == 'queue'">
<f:then>
<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>
</f:else>
</f:if>
<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>
<f:render
partial="Module/DocHeader"
section="main"
arguments="{pages: pages, selectedTemplateKey: selectedTemplateKey, selectedExtensionKey: selectedExtensionKey}" />
</div>
</div>
<div id="typo3-docbody">
......
<f:comment><!--
~
~ Copyright notice
~
~ (c) sgalinski Internet Services (https://www.sgalinski.de)
~
~ All rights reserved
~
~ This script is part of the TYPO3 project. The TYPO3 project is
~ free software; you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation; either version 3 of the License, or
~ (at your option) any later version.
~
~ The GNU General Public License can be found at
~ http://www.gnu.org/copyleft/gpl.html.
~
~ This script is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ This copyright notice MUST APPEAR in all copies of the script!
--></f:comment>
<!DOCTYPE html>
<html
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
data-namespace-typo3-fluid="true">
<f:section name="main">
<div class="module-docheader-bar module-docheader-bar-navigation t3js-module-docheader-bar t3js-module-docheader-bar-navigation">
<f:render
partial="Module/DocHeader"
section="actionMenu"
arguments="{pages: pages, selectedTemplate: selectedTemplateKey, selectedExtension: selectedExtensionKey}" />
<f:render
partial="Module/DocHeader"
section="path"
arguments="{docHeader}" />
</div>
</f:section>
<f:section name="path">
<div class="module-docheader-bar-column-right">
<span class="typo3-docheader-pagePath">
<f:translate key="LLL:EXT:core/Resources/Private/Language/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>
</f:section>
<f:section name="actionMenu">
<f:if condition="{pages}">
<f:then></f:then>
<f:else>
<div class="module-docheader-bar-column-left">
<f:be.menus.actionMenu>
<f:render
partial="Module/DocHeader"
section="actionMenuItem"
arguments="{controller:'Mail', action: 'index', label: '{f:translate(key:\'backend.template_editor\')}', selectedTemplate: selectedTemplateKey, selectedExtension: selectedExtensionKey}" />
<f:render
partial="Module/DocHeader"
section="actionMenuItem"
arguments="{controller:'Queue', action: 'index', label: '{f:translate(key:\'backend.mail_queue\')}', selectedTemplate: selectedTemplateKey, selectedExtension: selectedExtensionKey}" />
</f:be.menus.actionMenu>
</div>
</f:else>
</f:if>
</f:section>
<f:section name="actionMenuItem">
<f:be.menus.actionMenuItem
controller="{controller}"
action="{action}"
arguments="{selectedTemplate: selectedTemplateKey, selectedExtension: selectedExtensionKey}"
label="{label}" />
</f:section>
</html>
......@@ -186,10 +186,11 @@
<f:for each="{pages}" as="page">
<tr data-uid="{page.pid}">
<td nowrap="nowrap" class="col-title">
<a href="#" onclick="sgMailGoToPage({page.uid}, '{page.path}'); return false;">
<f:link.action action="index" additionalParams="{id: page.uid, returnUrl: returnUrl}">
<sgm:backend.icon table="pages" row="{page}" clickMenu="0" />
{page._thePathFull}
</a>
</f:link.action>
>
</td>
</tr>
</f:for>
......
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