Commit a6d45d88 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASk] Quiick feedback from review

parent 77b8172b
......@@ -341,9 +341,11 @@ class MailTemplateService {
// insert <br /> tags, but replace every instance of three or more successive breaks with just two.
$emailBody = nl2br($emailBody);
$emailBody = preg_replace('/(<br[\s]?[\/]?>[\s]*){3,}/', '<br /><br />', $emailBody);
if ($this->ignoreMailQueue && self::isTemplateBlacklisted(
$this->extensionKey, $this->templateName, $siteRootId
)) {
$isTemplateBlacklisted = self::isTemplateBlacklisted(
$this->extensionKey, $this->templateName, $siteRootId
);
if ($this->ignoreMailQueue && $isTemplateBlacklisted) {
$this->mailMessage->setBody($emailBody, 'text/html');
$this->mailMessage->send();
......
......@@ -58,25 +58,47 @@
<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'">
<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="{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"
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="Queue"
controller="Mail"
action="index"
arguments="{parameters: {selectedTemplate: templateKey, selectedExtension: extensionKey}}" />
</f:else>
......@@ -84,34 +106,10 @@
</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="{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:for>
</f:be.menus.actionMenu>
</f:if>
</div>
</f:else>
</f:for>
</f:be.menus.actionMenu>
</f:if>
</div>
<div class="module-docheader-bar-column-right">
<f:render partial="ButtonBar" arguments="{buttons:docHeader.buttons.right}" />
......
......@@ -6,7 +6,6 @@
</f:section>
<f:section name="content">
<f:flashMessages />
<br />
<f:if condition="{selectedTemplate}">
<f:then>
<div class="row form-group col-md-12">
......@@ -26,7 +25,6 @@
<th><f:translate key="backend.marker" /></th>
<th><f:translate key="backend.type" /></th>
<th><f:translate key="backend.value" /></th>
<th><f:translate key="backend.usage" /></th>
<th><f:translate key="backend.description" /></th>
</tr>
</thead>
......@@ -56,16 +54,6 @@
</f:else>
</f:if>
</td>
<td>
<f:if condition="{marker.usage}">
<f:then>
{marker.usage}
</f:then>
<f:else>
<![CDATA[{]]>{marker.marker}<![CDATA[}]]>
</f:else>
</f:if>
</td>
<td>
<f:translate key="{marker.description}">{marker.description}</f:translate>
</td>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment