From 3c53d6b68baf2990c587258f47bc2bb3360127fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jasmina=20Lie=C3=9Fmann?= <minapokhalo+typo3@gmail.com> Date: Tue, 17 Jan 2023 21:04:13 +0100 Subject: [PATCH] [TASK] Update display of options in "TypoScript" submodules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Always show options above other listings. Unify the appearance and placement of form fields within these options. Resolves: #99583 Releases: main Change-Id: If56ca25889cd1216d7ec37468f8247bcaf532fbd Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77454 Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Stefan Bürk <stefan@buerk.tech> Tested-by: core-ci <typo3@b13.com> Reviewed-by: Stefan Bürk <stefan@buerk.tech> --- .../Application/Template/TemplateCest.php | 8 +- .../Private/Language/locallang_analyzer.xlf | 9 +- .../Private/Language/locallang_ceditor.xlf | 5 +- .../Private/Language/locallang_info.xlf | 2 +- .../Private/Language/locallang_objbrowser.xlf | 10 +- .../Private/Partials/AnalyzerOptions.html | 115 ++++----- .../Partials/ConstantEditorOptions.html | 130 +++++------ .../Partials/ObjectBrowserOptions.html | 220 ++++++++---------- .../Private/Templates/ConstantEditorMain.html | 2 +- .../Private/Templates/InfoModifyMain.html | 50 ++-- 10 files changed, 240 insertions(+), 311 deletions(-) diff --git a/typo3/sysext/core/Tests/Acceptance/Application/Template/TemplateCest.php b/typo3/sysext/core/Tests/Acceptance/Application/Template/TemplateCest.php index 034a5e7438c2..83577805de4f 100644 --- a/typo3/sysext/core/Tests/Acceptance/Application/Template/TemplateCest.php +++ b/typo3/sysext/core/Tests/Acceptance/Application/Template/TemplateCest.php @@ -184,13 +184,11 @@ class TemplateCest $I->clickWithLeftButton('//*[text()=\'styleguide TCA demo\']'); $I->switchToContentFrame(); $I->selectOption('.t3-js-jumpMenuBox', 'TypoScript Tree'); - $I->waitForText('Options'); - $I->click('Options'); - $I->waitForText('Search'); + $I->waitForText('Tree for TypoScript template'); $I->amGoingTo('type "styles" into the search field and submit.'); $I->fillField('#searchValue', 'styles'); - $I->click("//input[@name='search']"); - $I->waitForText('Constants Tree'); + $I->click('button[type="submit"]'); + $I->waitForText('Setup Tree'); $I->seeInSource('<strong class="text-danger">styles</strong>'); } } diff --git a/typo3/sysext/tstemplate/Resources/Private/Language/locallang_analyzer.xlf b/typo3/sysext/tstemplate/Resources/Private/Language/locallang_analyzer.xlf index 76f087c59430..47d1b325da35 100644 --- a/typo3/sysext/tstemplate/Resources/Private/Language/locallang_analyzer.xlf +++ b/typo3/sysext/tstemplate/Resources/Private/Language/locallang_analyzer.xlf @@ -10,7 +10,7 @@ <source>Included TypoScript files for template "%s"</source> </trans-unit> <trans-unit id="selectedTemplate" resname="selectedTemplate"> - <source>Selected TypoScript template</source> + <source>Selected record</source> </trans-unit> <trans-unit id="title" resname="title"> <source>Title</source> @@ -30,9 +30,6 @@ <trans-unit id="pid" resname="pid"> <source>PID</source> </trans-unit> - <trans-unit id="options" resname="options"> - <source>Options</source> - </trans-unit> <trans-unit id="constants" resname="constants"> <source>Constants</source> </trans-unit> @@ -49,13 +46,13 @@ <source>Constant usage: [%s]</source> </trans-unit> <trans-unit id="constantTree" resname="constantTree"> - <source>Constants include tree</source> + <source>Constants include</source> </trans-unit> <trans-unit id="constantSource" resname="constantSource"> <source>Selected constants source</source> </trans-unit> <trans-unit id="setupTree" resname="setupTree"> - <source>Setup include tree</source> + <source>Setup include</source> </trans-unit> <trans-unit id="setupSource" resname="setupSource"> <source>Selected setup source</source> diff --git a/typo3/sysext/tstemplate/Resources/Private/Language/locallang_ceditor.xlf b/typo3/sysext/tstemplate/Resources/Private/Language/locallang_ceditor.xlf index 950f0d485dfc..9f418deaa558 100644 --- a/typo3/sysext/tstemplate/Resources/Private/Language/locallang_ceditor.xlf +++ b/typo3/sysext/tstemplate/Resources/Private/Language/locallang_ceditor.xlf @@ -6,11 +6,8 @@ <trans-unit id="objectBrowserTitleWithTemplate" resname="objectBrowserTitleWithTemplate"> <source>Constant Editor for TypoScript template "%s"</source> </trans-unit> - <trans-unit id="options" resname="options"> - <source>Options</source> - </trans-unit> <trans-unit id="selectedTemplate" resname="selectedTemplate"> - <source>Selected TypoScript template</source> + <source>Selected record</source> </trans-unit> <trans-unit id="category" resname="category"> <source>Selected category</source> diff --git a/typo3/sysext/tstemplate/Resources/Private/Language/locallang_info.xlf b/typo3/sysext/tstemplate/Resources/Private/Language/locallang_info.xlf index 84a120da4fb7..d2eed6b1483a 100644 --- a/typo3/sysext/tstemplate/Resources/Private/Language/locallang_info.xlf +++ b/typo3/sysext/tstemplate/Resources/Private/Language/locallang_info.xlf @@ -10,7 +10,7 @@ <source>Override TypoScript of template "%s"</source> </trans-unit> <trans-unit id="selectedTemplate" resname="selectedTemplate"> - <source>Selected TypoScript template</source> + <source>Selected record</source> </trans-unit> <trans-unit id="delete" resname="delete"> <source>Delete</source> diff --git a/typo3/sysext/tstemplate/Resources/Private/Language/locallang_objbrowser.xlf b/typo3/sysext/tstemplate/Resources/Private/Language/locallang_objbrowser.xlf index d029f21a421a..7e301957f589 100644 --- a/typo3/sysext/tstemplate/Resources/Private/Language/locallang_objbrowser.xlf +++ b/typo3/sysext/tstemplate/Resources/Private/Language/locallang_objbrowser.xlf @@ -16,10 +16,7 @@ <source>Edit single properties in TypoScript template "%s"</source> </trans-unit> <trans-unit id="selectedTemplate" resname="selectedTemplate"> - <source>Selected TypoScript template</source> - </trans-unit> - <trans-unit id="options" resname="options"> - <source>Options</source> + <source>Selected record</source> </trans-unit> <trans-unit id="noSpaces" resname="noSpaces"> <source>You must enter a property with characters "a-z", "A-Z", "0-9", or ".". Dots will be quoted. No spaces or special chars.</source> @@ -54,9 +51,6 @@ <trans-unit id="noCurrentTemplate" resname="noCurrentTemplate"> <source>You cannot edit properties and values if there is no current TypoScript template. Please create an extension typoscript template in "Override TypoScript" first.</source> </trans-unit> - <trans-unit id="search" resname="search"> - <source>Search</source> - </trans-unit> <trans-unit id="setupRoot" resname="setupRoot"> <source>Setup Tree</source> </trans-unit> @@ -85,7 +79,7 @@ <source>Sort keys alphabetically</source> </trans-unit> <trans-unit id="displayConstantsSubstitutions" resname="displayConstantsSubstitutions"> - <source>Display constants substitutions</source> + <source>Substitute constants in setup</source> </trans-unit> <trans-unit id="displayOptions" resname="displayOptions"> <source>Display options</source> diff --git a/typo3/sysext/tstemplate/Resources/Private/Partials/AnalyzerOptions.html b/typo3/sysext/tstemplate/Resources/Private/Partials/AnalyzerOptions.html index a6028181d471..167e95e798b2 100644 --- a/typo3/sysext/tstemplate/Resources/Private/Partials/AnalyzerOptions.html +++ b/typo3/sysext/tstemplate/Resources/Private/Partials/AnalyzerOptions.html @@ -1,76 +1,57 @@ <html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" + xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers" data-namespace-typo3-fluid="true" > -<div class="panel-group"> - <div class="panel panel-default"> - <div class="panel-heading" role="tab"> - <h3 class="panel-title" id="template-analyzer-options-heading"> - <a href="#" class="collapsed" data-bs-toggle="collapse" data-bs-target="#template-analyzer-options-body" aria-expanded="false" aria-controls="template-analyzer-options-body"> - <span class="caret"></span> - <strong><f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_analyzer.xlf:options"/></strong> - </a> - </h3> - </div> - <div id="template-analyzer-options-body" class="panel-collapse collapse" data-persist-collapse-state="true" aria-labelledby="template-analyzer-options-heading" role="tabpanel"> - <div class="panel-body"> - <f:if condition="{f:count(subject: allTemplatesOnPage)} > 1"> - <div class="row"> - <div class="col-auto"> - <div class="row row-cols-auto"> - <form action="{f:be.uri(route: 'web_typoscript_analyzer', parameters: '{id: pageUid}')}" method="post"> - <div class="col"> - <label class="form-select-label" for="selectedTemplate"> - <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_analyzer.xlf:selectedTemplate" /> - </label> - <select - name="selectedTemplate" - id="selectedTemplate" - class="form-select mb-3" - data-global-event="change" - data-action-navigate="$data=~s/$value/" - data-action-submit="$form" - > - <f:for each="{allTemplatesOnPage}" as="template"> - <option - value="{template.uid}" - {f:if(condition:'{selectedTemplateUid} == {template.uid}', then:'selected="selected"')} - > - {template.title} - </option> - </f:for> - </select> - </div> - </form> - </div> - </div> - </div> - </f:if> - <div class="row"> - <div class="col-12"> - <form action="{f:be.uri(route: 'web_typoscript_analyzer', parameters: '{id: pageUid}')}" method="post"> - <div class="form-check form-switch"> - <label class="form-check-label" for="restrictIncludesToMatchingConditions"> - <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_analyzer.xlf:restrictIncludesToMatchingConditions" /> - </label> - <input type="hidden" name="restrictIncludesToMatchingConditions" value="0" /> - <input - type="checkbox" - class="form-check-input" - name="restrictIncludesToMatchingConditions" - id="restrictIncludesToMatchingConditions" - value="1" - {f:if(condition: restrictIncludesToMatchingConditionsEnabled, then:'checked="checked"')} - data-global-event="change" - data-action-submit="$form" - data-value-selector="input[name='restrictIncludesToMatchingConditions']" - /> - </div> - </form> - </div> - </div> +<div id="analyzer-index" class="tx_tstemplate_analyzer"> + <div class="row row-cols-auto align-items-end g-3 mb-4"> + <f:if condition="{f:count(subject: allTemplatesOnPage)} > 1"> + <div class="col col-md-2 col-4"> + <form action="{f:be.uri(route: 'web_typoscript_analyzer', parameters: '{id: pageUid}')}" method="post"> + <label class="form-select-label" for="selectedTemplate"> + <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_analyzer.xlf:selectedTemplate" /> + </label> + <select + name="selectedTemplate" + id="selectedTemplate" + class="form-select" + data-global-event="change" + data-action-navigate="$data=~s/$value/" + data-action-submit="$form" + > + <f:for each="{allTemplatesOnPage}" as="template"> + <option + value="{template.uid}" + {f:if(condition:'{selectedTemplateUid} == {template.uid}', then:'selected="selected"')} + > + {template.title} + </option> + </f:for> + </select> + </form> </div> + </f:if> + <div class="col"> + <form action="{f:be.uri(route: 'web_typoscript_analyzer', parameters: '{id: pageUid}')}" method="post"> + <div class="form-check form-switch"> + <label class="form-check-label" for="restrictIncludesToMatchingConditions"> + <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_analyzer.xlf:restrictIncludesToMatchingConditions" /> + </label> + <input type="hidden" name="restrictIncludesToMatchingConditions" value="0" /> + <input + type="checkbox" + class="form-check-input" + name="restrictIncludesToMatchingConditions" + id="restrictIncludesToMatchingConditions" + value="1" + {f:if(condition: restrictIncludesToMatchingConditionsEnabled, then:'checked="checked"')} + data-global-event="change" + data-action-submit="$form" + data-value-selector="input[name='restrictIncludesToMatchingConditions']" + /> + </div> + </form> </div> </div> </div> diff --git a/typo3/sysext/tstemplate/Resources/Private/Partials/ConstantEditorOptions.html b/typo3/sysext/tstemplate/Resources/Private/Partials/ConstantEditorOptions.html index 94fab6233e29..8cb513609485 100644 --- a/typo3/sysext/tstemplate/Resources/Private/Partials/ConstantEditorOptions.html +++ b/typo3/sysext/tstemplate/Resources/Private/Partials/ConstantEditorOptions.html @@ -1,84 +1,64 @@ <html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" + xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers" data-namespace-typo3-fluid="true" > -<f:if condition="{f:count(subject: allTemplatesOnPage)} > 1 || {relevantCategories} > 1"> - <div class="panel-group"> - <div class="panel panel-default"> - <div class="panel-heading" role="tab"> - <h3 class="panel-title" id="constant-editor-options-heading"> - <a href="#" class="collapsed" data-bs-toggle="collapse" data-bs-target="#constant-editor-options-body" aria-expanded="false" aria-controls="constant-editor-options-body"> - <span class="caret"></span> - <strong><f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_ceditor.xlf:options"/></strong> - </a> - </h3> - </div> - <div id="constant-editor-options-body" class="collapse" data-persist-collapse-state="true" aria-labelledby="constant-editor-options-heading" role="tabpanel"> - <div class="panel-body"> - <div class="row"> - <div class="col-auto"> - <div class="row row-cols-auto"> - <form action="{f:be.uri(route: 'web_typoscript_constanteditor', parameters: '{id: pageUid}')}" method="post"> - <div class="col"> - <label class="form-select-label" for="selectedTemplate"> - <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_ceditor.xlf:selectedTemplate" /> - </label> - <select - name="selectedTemplate" - id="selectedTemplate" - class="form-select mb-3" - data-global-event="change" - data-action-navigate="$data=~s/$value/" - data-action-submit="$form" - > - <f:for each="{allTemplatesOnPage}" as="template"> - <option - value="{template.uid}" - {f:if(condition:'{selectedTemplateUid} == {template.uid}', then:'selected="selected"')} - > - {template.title} - </option> - </f:for> - </select> - </div> - </form> - </div> - </div> - </div> - - <div class="row"> - <div class="col-auto"> - <div class="row row-cols-auto"> - <form action="{f:be.uri(route: 'web_typoscript_constanteditor', parameters: '{id: pageUid}')}" method="post"> - <div class="col"> - <label class="form-select-label" for="selectedCategory"> - <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_ceditor.xlf:category" /> - </label> - <select - name="selectedCategory" - id="selectedCategory" - class="form-select mb-3" - data-global-event="change" - data-action-navigate="$data=~s/$value/" - data-action-submit="$form" - > - <f:for each="{relevantCategories}" key="relevantCategoryKey" as="relevantCategory"> - <option - value="{relevantCategoryKey}" - {f:if(condition:'{selectedCategory} == {relevantCategoryKey}', then:'selected="selected"')} - > - {relevantCategory.label} ({relevantCategory.usageCount}) - </option> - </f:for> - </select> - </div> - </form> - </div> - </div> - </div> +<f:if condition="({f:count(subject: allTemplatesOnPage)} > 1) || ({f:count(subject: relevantCategories)} > 1)"> + <div id="constant-editor-index" class="tx_tstemplate_constant-editor"> + <div class="row row-cols-auto align-items-end g-3 mb-4"> + <f:if condition="{f:count(subject: allTemplatesOnPage)} > 1"> + <div class="col col-md-2 col-4"> + <form action="{f:be.uri(route: 'web_typoscript_constanteditor', parameters: '{id: pageUid}')}" method="post"> + <label class="form-select-label" for="selectedTemplate"> + <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_ceditor.xlf:selectedTemplate" /> + </label> + <select + name="selectedTemplate" + id="selectedTemplate" + class="form-select" + data-global-event="change" + data-action-navigate="$data=~s/$value/" + data-action-submit="$form" + > + <f:for each="{allTemplatesOnPage}" as="template"> + <option + value="{template.uid}" + {f:if(condition:'{selectedTemplateUid} == {template.uid}', then:'selected="selected"')} + > + {template.title} + </option> + </f:for> + </select> + </form> + </div> + </f:if> + <f:if condition="{f:count(subject: relevantCategories)} > 1"> + <div class="col col-md-2 col-4"> + <form action="{f:be.uri(route: 'web_typoscript_constanteditor', parameters: '{id: pageUid}')}" method="post"> + <label class="form-select-label" for="selectedCategory"> + <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_ceditor.xlf:category" /> + </label> + <select + name="selectedCategory" + id="selectedCategory" + class="form-select" + data-global-event="change" + data-action-navigate="$data=~s/$value/" + data-action-submit="$form" + > + <f:for each="{relevantCategories}" key="relevantCategoryKey" as="relevantCategory"> + <option + value="{relevantCategoryKey}" + {f:if(condition:'{selectedCategory} == {relevantCategoryKey}', then:'selected="selected"')} + > + {relevantCategory.label} ({relevantCategory.usageCount}) + </option> + </f:for> + </select> + </form> </div> - </div> + </f:if> </div> </div> </f:if> diff --git a/typo3/sysext/tstemplate/Resources/Private/Partials/ObjectBrowserOptions.html b/typo3/sysext/tstemplate/Resources/Private/Partials/ObjectBrowserOptions.html index 0f109a835bf6..4450e6582365 100644 --- a/typo3/sysext/tstemplate/Resources/Private/Partials/ObjectBrowserOptions.html +++ b/typo3/sysext/tstemplate/Resources/Private/Partials/ObjectBrowserOptions.html @@ -1,128 +1,114 @@ <html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" + xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers" data-namespace-typo3-fluid="true" > -<div class="panel-group"> - <div class="panel panel-default"> - <div class="panel-heading" role="tab"> - <h3 class="panel-title" id="object-browser-options-heading"> - <a href="#" class="collapsed" data-bs-toggle="collapse" data-bs-target="#object-browser-options-body" aria-expanded="false" aria-controls="object-browser-options-body"> - <span class="caret"></span> - <strong><f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_objbrowser.xlf:options"/></strong> - </a> - </h3> - </div> - <div id="object-browser-options-body" class="panel-collapse collapse" data-persist-collapse-state="true" aria-labelledby="object-browser-options-heading" role="tabpanel"> - <div class="panel-body"> - <f:if condition="{f:count(subject: allTemplatesOnPage)} > 1"> - <div class="row"> - <div class="col-auto"> - <div class="row row-cols-auto"> - <form action="{f:be.uri(route: 'web_typoscript_objectbrowser', parameters: '{id: pageUid}')}" method="post"> - <div class="col"> - <label class="form-select-label" for="selectedTemplate"> - <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_objbrowser.xlf:selectedTemplate" /> - </label> - <select - name="selectedTemplate" - id="selectedTemplate" - class="form-select mb-3" - data-global-event="change" - data-action-navigate="$data=~s/$value/" - data-action-submit="$form" - > - <f:for each="{allTemplatesOnPage}" as="template"> - <option - value="{template.uid}" - {f:if(condition:'{selectedTemplateUid} == {template.uid}', then:'selected="selected"')} - > - {template.title} - </option> - </f:for> - </select> - </div> - </form> - </div> - </div> - </div> - </f:if> +<div id="object-browser-index" class="tx_tstemplate_object-browser"> + <div class="row row-cols-auto align-items-end g-3 mb-4"> + <f:if condition="{f:count(subject: allTemplatesOnPage)} > 1"> + <div class="col col-md-2 col-4"> <form action="{f:be.uri(route: 'web_typoscript_objectbrowser', parameters: '{id: pageUid}')}" method="post"> - <div class="row row-cols-auto align-items-end g-1"> - <div class="col"> - <label class="form-label" for="searchValue"> - <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_objbrowser.xlf:search"/> - </label> - <input class="form-control" type="text" name="searchValue" id="searchValue" value="{searchValue}"/> - </div> - <div class="col"> - <input class="btn btn-default" type="submit" name="search" value="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:search')}"/> - </div> - </div> + <label class="form-label" for="selectedTemplate"> + <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_objbrowser.xlf:selectedTemplate" /> + </label> + <select + name="selectedTemplate" + id="selectedTemplate" + class="form-select" + data-global-event="change" + data-action-navigate="$data=~s/$value/" + data-action-submit="$form" + > + <f:for each="{allTemplatesOnPage}" as="template"> + <option + value="{template.uid}" + {f:if(condition:'{selectedTemplateUid} == {template.uid}', then:'selected="selected"')} + > + {template.title} + </option> + </f:for> + </select> </form> - - <div class="row mt-3"> - <div class="col"> - <form action="{f:be.uri(route: 'web_typoscript_objectbrowser', parameters: '{id: pageUid}')}" method="post"> - <div class="form-check form-switch"> - <label class="form-check-label" for="displayConstantSubstitutions"> - <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_objbrowser.xlf:displayConstantsSubstitutions" /> - </label> - <input type="hidden" name="displayConstantSubstitutions" value="0" /> - <input - type="checkbox" - class="form-check-input" - name="displayConstantSubstitutions" - id="displayConstantSubstitutions" - value="1" - {f:if(condition: displayConstantSubstitutions, then:'checked="checked"')} - data-global-event="change" - data-action-submit="$form" - data-value-selector="input[name='displayConstantSubstitutions']" - /> - </div> - </form> - <form action="{f:be.uri(route: 'web_typoscript_objectbrowser', parameters: '{id: pageUid}')}" method="post"> - <div class="form-check form-switch"> - <label class="form-check-label" for="displayComments"> - <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_objbrowser.xlf:displayComments" /> - </label> - <input type="hidden" name="displayComments" value="0" /> - <input - type="checkbox" - class="form-check-input" - name="displayComments" - id="displayComments" - value="1" - {f:if(condition: displayComments, then:'checked="checked"')} - data-global-event="change" - data-action-submit="$form" - data-value-selector="input[name='displayComments']" - /> - </div> - </form> - <form action="{f:be.uri(route: 'web_typoscript_objectbrowser', parameters: '{id: pageUid}')}" method="post"> - <div class="form-check form-switch"> - <label class="form-check-label" for="sortAlphabetically"> - <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_objbrowser.xlf:sortAlphabetically" /> - </label> - <input type="hidden" name="sortAlphabetically" value="0" /> - <input - type="checkbox" - class="form-check-input" - name="sortAlphabetically" - id="sortAlphabetically" - value="1" - {f:if(condition: sortAlphabetically, then:'checked="checked"')} - data-global-event="change" - data-action-submit="$form" - data-value-selector="input[name='sortAlphabetically']" - /> - </div> - </form> - </div> - </div> </div> + </f:if> + <div class="col"> + <form action="{f:be.uri(route: 'web_typoscript_objectbrowser', parameters: '{id: pageUid}')}" method="post"> + <div class="input-group"> + <input + type="text" + name="searchValue" + class="form-control" + id="searchValue" + placeholder="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.enterSearchString')}" + value="{searchValue}" + > + <button type="submit" class="btn btn-default"><core:icon identifier="actions-search" /></button> + </div> + </form> + </div> + <div class="col"> + <form action="{f:be.uri(route: 'web_typoscript_objectbrowser', parameters: '{id: pageUid}')}" method="post"> + <div class="form-check form-switch"> + <label class="form-check-label" for="displayConstantSubstitutions"> + <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_objbrowser.xlf:displayConstantsSubstitutions" /> + </label> + <input type="hidden" name="displayConstantSubstitutions" value="0" /> + <input + type="checkbox" + class="form-check-input" + name="displayConstantSubstitutions" + id="displayConstantSubstitutions" + value="1" + {f:if(condition: displayConstantSubstitutions, then:'checked="checked"')} + data-global-event="change" + data-action-submit="$form" + data-value-selector="input[name='displayConstantSubstitutions']" + /> + </div> + </form> + </div> + <div class="col"> + <form action="{f:be.uri(route: 'web_typoscript_objectbrowser', parameters: '{id: pageUid}')}" method="post"> + <div class="form-check form-switch"> + <label class="form-check-label" for="displayComments"> + <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_objbrowser.xlf:displayComments" /> + </label> + <input type="hidden" name="displayComments" value="0" /> + <input + type="checkbox" + class="form-check-input" + name="displayComments" + id="displayComments" + value="1" + {f:if(condition: displayComments, then:'checked="checked"')} + data-global-event="change" + data-action-submit="$form" + data-value-selector="input[name='displayComments']" + /> + </div> + </form> + </div> + <div class="col"> + <form action="{f:be.uri(route: 'web_typoscript_objectbrowser', parameters: '{id: pageUid}')}" method="post"> + <div class="form-check form-switch"> + <label class="form-check-label" for="sortAlphabetically"> + <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_objbrowser.xlf:sortAlphabetically" /> + </label> + <input type="hidden" name="sortAlphabetically" value="0" /> + <input + type="checkbox" + class="form-check-input" + name="sortAlphabetically" + id="sortAlphabetically" + value="1" + {f:if(condition: sortAlphabetically, then:'checked="checked"')} + data-global-event="change" + data-action-submit="$form" + data-value-selector="input[name='sortAlphabetically']" + /> + </div> + </form> </div> </div> </div> diff --git a/typo3/sysext/tstemplate/Resources/Private/Templates/ConstantEditorMain.html b/typo3/sysext/tstemplate/Resources/Private/Templates/ConstantEditorMain.html index fdb76debfcd2..5dad5ef6c339 100644 --- a/typo3/sysext/tstemplate/Resources/Private/Templates/ConstantEditorMain.html +++ b/typo3/sysext/tstemplate/Resources/Private/Templates/ConstantEditorMain.html @@ -60,7 +60,7 @@ </f:comment> <f:if condition="!{relevantCategories}"> <f:then> - <f:be.infobox title="{f:translate(key:'LLL:EXT:tstemplate/Resources/Private/Language/locallang_ceditor.xlf:noConstants')}"> + <f:be.infobox title="{f:translate(key:'LLL:EXT:tstemplate/Resources/Private/Language/locallang_ceditor.xlf:noConstants')}" state="-1"> {f:translate(key:'LLL:EXT:tstemplate/Resources/Private/Language/locallang_ceditor.xlf:noConstantsDescription')} </f:be.infobox> </f:then> diff --git a/typo3/sysext/tstemplate/Resources/Private/Templates/InfoModifyMain.html b/typo3/sysext/tstemplate/Resources/Private/Templates/InfoModifyMain.html index 4132bdbb3b39..b272e9bf715b 100644 --- a/typo3/sysext/tstemplate/Resources/Private/Templates/InfoModifyMain.html +++ b/typo3/sysext/tstemplate/Resources/Private/Templates/InfoModifyMain.html @@ -40,34 +40,30 @@ </div> <f:if condition="{f:count(subject: allTemplatesOnPage)} > 1"> - <div class="row"> - <div class="col-auto"> - <div class="row row-cols-auto"> - <form action="{f:be.uri(route: 'web_typoscript_infomodify', parameters: '{id: pageUid}')}" method="post"> - <div class="col"> - <label class="form-select-label" for="selectedTemplate"> - <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_info.xlf:selectedTemplate" /> - </label> - <select - name="selectedTemplate" - id="selectedTemplate" - class="form-select mb-3" - data-global-event="change" - data-action-navigate="$data=~s/$value/" - data-action-submit="$form" + <div class="row row-cols-auto align-items-end g-3 mb-4"> + <div class="col col-md-2 col-4"> + <form action="{f:be.uri(route: 'web_typoscript_infomodify', parameters: '{id: pageUid}')}" method="post"> + <label class="form-select-label" for="selectedTemplate"> + <f:translate key="LLL:EXT:tstemplate/Resources/Private/Language/locallang_info.xlf:selectedTemplate" /> + </label> + <select + name="selectedTemplate" + id="selectedTemplate" + class="form-select" + data-global-event="change" + data-action-navigate="$data=~s/$value/" + data-action-submit="$form" + > + <f:for each="{allTemplatesOnPage}" as="template"> + <option + value="{template.uid}" + {f:if(condition:'{templateRecord.uid} == {template.uid}', then:'selected="selected"')} > - <f:for each="{allTemplatesOnPage}" as="template"> - <option - value="{template.uid}" - {f:if(condition:'{templateRecord.uid} == {template.uid}', then:'selected="selected"')} - > - {template.title} - </option> - </f:for> - </select> - </div> - </form> - </div> + {template.title} + </option> + </f:for> + </select> + </form> </div> </div> </f:if> -- GitLab