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

[TASK] Updating layout, adding translations for backend

parent 4c1d820f
No related branches found
No related tags found
1 merge request!1Feature sg mail
......@@ -27,7 +27,9 @@ namespace SGalinski\SgMail\Controller;
***************************************************************/
use SGalinski\SgMail\Service\MailTemplateService;
use TYPO3\CMS\Core\Messaging\FlashMessage;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
/**
* Controller for the mail templating service module
......@@ -159,6 +161,10 @@ class MailController extends ActionController {
$filename = $templatePath . $selectedLanguageRight . '.sg_mail.locallang.html';
file_put_contents($filename, $contentRight);
$label = 'backend.success';
$message = LocalizationUtility::translate($label, 'SgMail');
$this->addFlashMessage($message, '', FlashMessage::OK);
$this->redirect('index', NULL, NULL, $arguments);
}
......
......@@ -9,22 +9,50 @@
<authorEmail>torsten@sgalinski.de</authorEmail>
</header>
<body>
<trans-unit id="registeredExtension.action.message">
<source>Extension</source>
<target>Extension</target>
</trans-unit>
<trans-unit id="mlang_labels_tabdescr">
<source>Mail Templates</source>
<target>Mail Templates</target>
</trans-unit>
<trans-unit id="mlang_labels_tablabel">
<source>Mail Templates</source>
<target>Mail Templates</target>
</trans-unit>
<trans-unit id="mlang_tabs_tab">
<source>Mail Templates</source>
<target>Mail Templates</target>
</trans-unit>
<trans-unit id="backend.description" approved="yes">
<source>Description</source>
<target>Beschreibung</target>
</trans-unit>
<trans-unit id="backend.marker" approved="yes">
<source>Marker</source>
<target>Marker</target>
</trans-unit>
<trans-unit id="backend.save" approved="yes">
<source>Save</source>
<target>Speichern</target>
</trans-unit>
<trans-unit id="backend.select_language" approved="yes">
<source>Select Language</source>
<target>Sprache auswählen</target>
</trans-unit>
<trans-unit id="backend.success" approved="yes">
<source>Successfully saved !</source>
<target>Erfolgreich gespeichert !</target>
</trans-unit>
<trans-unit id="backend.template_path" approved="yes">
<source>Template Path: </source>
<target>Pfad: </target>
</trans-unit>
<trans-unit id="backend.value" approved="yes">
<source>Value</source>
<target>Wert</target>
</trans-unit>
<trans-unit id="mlang_labels_tabdescr" approved="yes">
<source>Mail Templates</source>
<target>Mail Templates</target>
</trans-unit>
<trans-unit id="mlang_labels_tablabel" approved="yes">
<source>Mail Templates</source>
<target>Mail Templates</target>
</trans-unit>
<trans-unit id="mlang_tabs_tab" approved="yes">
<source>Mail Templates</source>
<target>Mail Templates</target>
</trans-unit>
<trans-unit id="registeredExtension.action.message" approved="yes">
<source>Extension</source>
<target>Extension</target>
</trans-unit>
</body>
</file>
</xliff>
</xliff>
\ No newline at end of file
......@@ -9,8 +9,26 @@
<authorEmail>torsten@sgalinski.de</authorEmail>
</header>
<body>
<trans-unit id="registeredExtension.action.message">
<source>Extension</source>
<trans-unit id="backend.description">
<source>Description</source>
</trans-unit>
<trans-unit id="backend.marker">
<source>Marker</source>
</trans-unit>
<trans-unit id="backend.save">
<source>Save</source>
</trans-unit>
<trans-unit id="backend.select_language">
<source>Select Language</source>
</trans-unit>
<trans-unit id="backend.success">
<source>Successfully saved !</source>
</trans-unit>
<trans-unit id="backend.template_path">
<source>Template Path: </source>
</trans-unit>
<trans-unit id="backend.value">
<source>Value</source>
</trans-unit>
<trans-unit id="mlang_labels_tabdescr">
<source>Mail Templates</source>
......@@ -21,6 +39,9 @@
<trans-unit id="mlang_tabs_tab">
<source>Mail Templates</source>
</trans-unit>
<trans-unit id="registeredExtension.action.message">
<source>Extension</source>
</trans-unit>
</body>
</file>
</xliff>
</xliff>
\ No newline at end of file
......@@ -6,14 +6,14 @@
<f:section name="main">
<f:flashMessages renderMode="div" />
<p>
Template Path: <strong>{selectedTemplate.templatePath}</strong>
{f:translate(key:'backend.template_path')} <strong>{selectedTemplate.templatePath}</strong>
</p>
<table class="table table-hover">
<thead>
<tr>
<th>Marker</th>
<th>Value</th>
<th>Description</th>
<th>{f:translate(key:'backend.marker')}</th>
<th>{f:translate(key:'backend.value')}</th>
<th>{f:translate(key:'backend.description')}</th>
</tr>
</thead>
<f:for each="{selectedTemplate.marker}" as="marker">
......@@ -25,8 +25,10 @@
</f:for>
</table>
<f:form method="post" controller="Mail" action="save">
<div class="col-md-6">
Sprache auswählen
<div class="col-md-6 form-group">
<div class="form-group">
{f:translate(key:'backend.select_language')}
</div>
<f:be.menus.actionMenu>
<f:for each="{languages}" as="language">
<sgm:extendedIf condition="{language} == {selectedLanguageLeft}">
......@@ -58,8 +60,10 @@
<br />
</div>
<div class="col-md-6">
Sprache auswählen
<div class="col-md-6 form-group">
<div class="form-group">
{f:translate(key:'backend.select_language')}
</div>
<f:be.menus.actionMenu>
<f:for each="{languages}" as="language">
<sgm:extendedIf condition="{language} == {selectedLanguageRight}">
......@@ -84,7 +88,8 @@
<f:form.textarea class="col-md-12" rows="25" name="contentRight" value="{contentRight}"></f:form.textarea>
<br />
</div>
<f:form.submit class="btn-default" value="Save" />
<div class="col-md-3 form-group">
<f:form.submit class="col-md-6 btn-success btn" value="{f:translate(key:'backend.save')}" />
</div>
</f:form>
</f:section>
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