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

[TASK] Working on new backend module

parent 053a98f7
No related branches found
No related tags found
1 merge request!12Feature backend config
......@@ -71,13 +71,13 @@ class ConfigurationController extends ActionController {
// store the user selection in the session
if ($this->request->hasArgument('controller')) {
$this->session->setDataByKey('mode', $this->request->getArgument('controller'));
$this->session->setDataByKey('mode', BackendService::BACKEND_MODE_EDITOR_CONTROLLER);
}
$registerArray = BackendService::getNonBlacklistedTemplates($pageUid);
if ($selectedTemplate === NULL || $selectedTemplate === '') {
$selectedExtension = key($registerArray);
$selectedTemplate = key($registerArray[$selectedExtension]);
$selectedExtension = \key($registerArray);
$selectedTemplate = \key($registerArray[$selectedExtension]);
}
// make docheader
......@@ -95,6 +95,6 @@ class ConfigurationController extends ActionController {
$this->view->assign('typo3Version', VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version));
$this->view->assign('selectedTemplateKey', $selectedTemplate);
$this->view->assign('selectedExtensionKey', $selectedExtension);
$this->view->assign('mode', 'configuration');
$this->view->assign('mode', 'editor');
}
}
......@@ -29,6 +29,10 @@
<source><![CDATA[Show mails from blacklisted templates]]></source>
<target><![CDATA[Mails basierend auf gesperrten Templates anzeigen]]></target>
</trans-unit>
<trans-unit id="backend.button_create" approved="yes">
<source><![CDATA[Register new template]]></source>
<target><![CDATA[Neues Template registrieren]]></target>
</trans-unit>
<trans-unit id="backend.button_download_csv" approved="yes">
<source><![CDATA[Export CSV]]></source>
<target><![CDATA[CSV exportieren]]></target>
......@@ -57,6 +61,10 @@
<source><![CDATA[Text]]></source>
<target><![CDATA[Text]]></target>
</trans-unit>
<trans-unit id="backend.create.markers" approved="yes">
<source><![CDATA[Template marker]]></source>
<target><![CDATA[Template Marker]]></target>
</trans-unit>
<trans-unit id="backend.delete_template" approved="yes">
<source><![CDATA[Do you really want to reset this template?]]></source>
<target><![CDATA[Möchten Sie wirklich den Ursprungszustand wiederherstellen?]]></target>
......
......@@ -24,6 +24,9 @@
<trans-unit id="backend.blacklisted">
<source><![CDATA[Show mails from blacklisted templates]]></source>
</trans-unit>
<trans-unit id="backend.button_create">
<source><![CDATA[Register new template]]></source>
</trans-unit>
<trans-unit id="backend.button_download_csv">
<source><![CDATA[Export CSV]]></source>
</trans-unit>
......@@ -45,6 +48,9 @@
<trans-unit id="backend.content">
<source><![CDATA[Text]]></source>
</trans-unit>
<trans-unit id="backend.create.markers">
<source><![CDATA[Template marker]]></source>
</trans-unit>
<trans-unit id="backend.delete_template">
<source><![CDATA[Do you really want to reset this template?]]></source>
</trans-unit>
......
......@@ -44,21 +44,6 @@
arguments="{selectedTemplate: selectedTemplateKey, selectedExtension: selectedExtensionKey}" />
</f:else>
</f:if>
<f:if condition="{mode} == 'configuration'">
<f:then>
<sgm:be.menus.actionMenuItem label="{f:translate(key:'backend.configuration')}"
controller="Configuration"
action="index"
arguments="{selectedTemplate: selectedTemplateKey, selectedExtension: selectedExtensionKey}"
additionalAttributes="{selected: 'selected'}" />
</f:then>
<f:else>
<sgm:be.menus.actionMenuItem label="{f:translate(key:'backend.configuration')}"
controller="Configuration"
action="index"
arguments="{selectedTemplate: selectedTemplateKey, selectedExtension: selectedExtensionKey}" />
</f:else>
</f:if>
</f:be.menus.actionMenu>
</div>
</f:else>
......
{namespace sgm=SGalinski\SgMail\ViewHelpers}
<f:be.container enableClickMenu="FALSE" loadExtJs="FALSE" includeCssFiles="{0: '{f:uri.resource(path: \'StyleSheets/backend.css\')}'}"
includeRequireJsModules="{
0: 'TYPO3/CMS/Backend/AjaxDataHandler',
1: '{f:if(condition: \'{typo3Version} < 8000000 \', then: \'TYPO3/CMS/Backend/ClickMenu\', else: \'TYPO3/CMS/Backend/ContextMenu\')}',
2: 'TYPO3/CMS/Backend/Tooltip',
3: 'TYPO3/CMS/Backend/DateTimePicker'}">
<sgm:addJavaScriptFile javaScriptFile="{f:uri.resource(path: 'Scripts/Backend.js')}" />
<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">
<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>
</div>
<div id="typo3-docbody">
<div id="typo3-inner-docbody">
<f:render section="content" />
</div>
</div>
</f:be.container>
......@@ -45,21 +45,6 @@
arguments="{selectedTemplate: selectedTemplateKey, selectedExtension: selectedExtensionKey}" />
</f:else>
</f:if>
<f:if condition="{mode} == 'configuration'">
<f:then>
<sgm:be.menus.actionMenuItem label="{f:translate(key:'backend.configuration')}"
controller="Configuration"
action="index"
arguments="{selectedTemplate: selectedTemplateKey, selectedExtension: selectedExtensionKey}"
additionalAttributes="{selected: 'selected'}" />
</f:then>
<f:else>
<sgm:be.menus.actionMenuItem label="{f:translate(key:'backend.configuration')}"
controller="Configuration"
action="index"
arguments="{selectedTemplate: selectedTemplateKey, selectedExtension: selectedExtensionKey}" />
</f:else>
</f:if>
</f:be.menus.actionMenu>
</div>
</f:else>
......
{namespace sgm=SGalinski\SgMail\ViewHelpers}
<f:form action="create" controller="Configuration" method="post" objectName="configuration" object="{configuration}">
<div class="row">
<div class="col-xs-12 col-md-3">
<div class="form-group">
<label for="extensionKey"><f:translate key="backend.create.extensionKey" />EXT KEY</label>
<f:form.select class="form-control" property="extensionKey" optionValueField="value" options="{extensions}" id="extensionKey" />
</div>
<div class="form-group">
<label for="templateName"><f:translate key="backend.create.templateName" />TEMPLATE NAME</label>
<f:form.textfield class="form-control" property="templateName" id="templateName" />
</div>
<div class="form-group">
<label for="description"><f:translate key="backend.create.description" />description</label>
<f:form.textarea class="form-control" property="description" id="description" />
</div>
<div class="form-group">
<label for="subject"><f:translate key="backend.create.subject" />subject</label>
<f:form.textfield class="form-control" property="subject" id="subject" />
</div>
<div class="form-group">
<label for="content"><f:translate key="backend.create.content" />content</label>
<f:form.textarea class="form-control" property="content" id="content" />
</div>
</div>
</div>
</f:form>
{namespace sgm=SGalinski\SgMail\ViewHelpers}
<f:layout name="Default" />
<f:layout name="NoMenu" />
<f:section name="iconButtons">
</f:section>
......@@ -7,25 +7,29 @@
<f:section name="content">
<f:flashMessages />
<f:if condition="{pages}">
<f:render partial="Mail/Empty" />
<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}, '{page.path}'); return false;">
<sgm:backend.icon table="pages" row="{page}" clickMenu="0" />
{page._thePathFull}
</a>
</td>
</tr>
</f:for>
</tbody>
</table>
<f:form action="create" controller="Configuration" method="post" objectName="configuration" object="{configuration}">
<div class="row">
<div class="col-xs-12 col-md-3">
<div class="form-group">
<label for="templateName"><f:translate key="backend.create.templateName" />TEMPLATE NAME</label>
<f:form.textfield class="form-control" property="templateName" id="templateName" />
</div>
<div class="form-group">
<label for="markers"><f:translate key="backend.create.markers" />markers</label>
<f:form.textfield class="form-control" property="markers" id="markers" />
</div>
<div class="form-group">
<label for="subject"><f:translate key="backend.create.subject" />subject</label>
<f:form.textfield class="form-control" property="subject" id="subject" />
</div>
<div class="form-group">
<label for="description"><f:translate key="backend.create.description" />description</label>
<f:form.textarea class="form-control" property="description" id="description" />
</div>
</div>
</div>
</f:if>
</f:form>
</f:section>
......@@ -9,9 +9,12 @@
<f:if condition="{selectedTemplate}">
<f:then>
<div class="row form-group col-md-12">
<div class="editor-description col-md-9">
<div class="editor-description col-md-6">
<p>{templateDescription}</p>
</div>
<div class=" col-md-3">
<f:link.action class="reset-all-btn btn-success btn col-md-12" controller="Configuration" action="index" arguments="{template: selectedTemplateKey, extensionKey: selectedTemplate.extension}">{f:translate(key:'backend.button_create')}</f:link.action>
</div>
<div class=" col-md-3">
<f:link.action class="reset-btn reset-all-btn btn-danger btn col-md-12" action="reset" arguments="{template: selectedTemplateKey, extensionKey: selectedTemplate.extension}">{f:translate(key:'backend.button_reset_all')}</f:link.action>
</div>
......
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