Skip to content

Commit

Permalink
[TASK] Restore template order of template module
Browse files Browse the repository at this point in the history
With #93523 parts of the template module have been refactored.
Some changes are reverted because those just change the order of
functionality without a true benefit and makes it hard for users who
use those modules very often:

* "Edit the whole template recoord" is moved to the bottom
* "Create extension template" and "Go to closest page with template" are
moved below instead of a grid

Related: #93523
Resolves: #95338
Releases: master
Change-Id: I98b1aef1daa1c7c5cf1858f4a537e85a93c9d807
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/71221
Tested-by: core-ci <typo3@b13.com>
Tested-by: Nikita Hovratov <nikita.h@live.de>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Nikita Hovratov <nikita.h@live.de>
Reviewed-by: Benni Mack <benni@typo3.org>
  • Loading branch information
georgringer authored and bmack committed Oct 1, 2021
1 parent 63137e4 commit dc4dbf5
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 38 deletions.
Expand Up @@ -55,7 +55,7 @@
<source>Create new website</source>
</trans-unit>
<trans-unit id="newWebsiteDescription" resname="newWebsiteDescription">
<source>If you want this page to be the root of a new website, optionally based on one of the standard templates, then press the button below</source>
<source>If you want this page to be the root of a new website, optionally based on one of the standard templates, then press the button below.</source>
</trans-unit>
<trans-unit id="newWebsiteAction" resname="newWebsiteAction">
<source>Create template for a new site</source>
Expand Down
Expand Up @@ -5,23 +5,22 @@ <h3>
<core:iconForRecord table="sys_template" row="{templateRecord}"/>
</a> {templateRecord.title}
</h3>
<div class="row row-cols-auto g-3">
<f:if condition="{manyTemplatesMenu}">
<div class="col">
<f:format.raw>{manyTemplatesMenu}</f:format.raw>
</div>
</f:if>
<div class="col">
<a class="btn btn-default mb-2" href="{editAllUrl}"><core:icon identifier="actions-document-open" />&nbsp;<f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_info.xlf:editTemplateRecord"/></a>

<f:if condition="{manyTemplatesMenu}">
<div>
<f:format.raw>{manyTemplatesMenu}</f:format.raw>
</div>
</div>
</f:if>

<table class="table table-striped table-hover">
<tbody>
<f:for each="{tableRows}" as="line">
<tr>
<td class="text-nowrap"><a href="{line.url}" title="{f:translate(key:'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:editField')}" class="btn btn-block text-start btn-default"><core:icon identifier="actions-open" /> <strong>{line.label}</strong></a></td>
<td class="text-nowrap"><a href="{line.url}" title="{f:translate(key:'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:editField')}" class="btn btn-block text-start btn-default"><core:icon identifier="actions-open" /> {line.label}</a></td>
<td width="90%">{line.data -> f:format.nl2br()}</td>
</tr>
</f:for>
</tbody>
</table>

<a class="btn btn-default mb-2" href="{editAllUrl}"><core:icon identifier="actions-document-open" />&nbsp;<f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_info.xlf:editTemplateRecord"/></a>
59 changes: 32 additions & 27 deletions typo3/sysext/tstemplate/Resources/Private/Templates/NoTemplate.html
Expand Up @@ -5,38 +5,43 @@
<br />
<f:translate key="createTemplateToEditConfiguration" />
</p>
<f:if condition="{previousPage}">
<p>
<strong><f:translate key="goToClosest" /></strong><br>
<f:translate key="goToClosestDescription" arguments="{0: previousPage.title, 1: previousPage.uid}" />
</p>
<f:be.link route="web_ts" parameters="{id: previousPage.uid}" class="btn btn-default"><f:translate key="goToClosestAction" /></f:be.link>
</f:if>

</f:be.infobox>

<div class="row">
<div class="col">
<h2><f:translate key="newWebsite" />{staticsText}</h2>
<p><f:translate key="newWebsiteDescription" /></p>
</div>
<div class="col">
<h2><f:translate key="extTemplate" /></h2>
<p><f:translate key="extTemplateDescription" /></p>
</div>
<f:if condition="{previousPage}">
<div class="col">
<h3><f:translate key="goToClosest" /></h3>
<p><f:translate key="goToClosestDescription" arguments="{0: previousPage.title, 1: previousPage.uid}" /></p>
<div class="col-md-6">
<div class="card">
<div class="card-body">
<h2 class="card-title"><f:translate key="newWebsite" />{staticsText}</h2>
<div class="card-text">
<p><f:translate key="newWebsiteDescription" /></p>
<div>
{content.selector -> f:format.raw() -> f:or(alternative: '<input type="hidden" name="createStandard" value="" />')}
<input class="btn btn-primary" type="submit" form="TypoScriptTemplateModuleController" name="newWebsite" value="{f:translate(key: 'newWebsiteAction', extensionName:'tstemplate')}" />
</div>
</div>
</div>
</div>
</f:if>
</div>
<div class="row">
<div class="col">
{content.selector -> f:format.raw() -> f:or(alternative: '<input type="hidden" name="createStandard" value="" />')}
<input class="btn btn-primary text-light" type="submit" form="TypoScriptTemplateModuleController" name="newWebsite" value="{f:translate(key: 'newWebsiteAction', extensionName:'tstemplate')}" />
</div>
<div class="col">
<input class="btn btn-default" type="submit" form="TypoScriptTemplateModuleController" name="createExtension" value="{f:translate(key: 'extTemplateAction', extensionName:'tstemplate')}" />
</div>
<f:if condition="{previousPage}">
<div class="col">
<f:be.link route="web_ts" parameters="{id: previousPage.uid}" class="btn btn-default"><f:translate key="goToClosestAction" /></f:be.link>
<div class="col-md-6">
<div class="card">
<div class="card-body">
<h2 class="card-title"><f:translate key="extTemplate" /></h2>
<div class="card-text">
<p><f:translate key="extTemplateDescription" /></p>
<div>
<input class="btn btn-default" type="submit" form="TypoScriptTemplateModuleController" name="createExtension" value="{f:translate(key: 'extTemplateAction', extensionName:'tstemplate')}" />
</div>
</div>
</div>
</div>
</f:if>
</div>
</div>


</form>

0 comments on commit dc4dbf5

Please sign in to comment.