[BUGFIX] Fix syntax and logic errors in BE Fluid templates 02/60802/6
authorClaus Due <claus@namelesscoder.net>
Thu, 23 May 2019 10:47:49 +0000 (12:47 +0200)
committerDaniel Goerz <daniel.goerz@posteo.de>
Sat, 29 Jun 2019 11:09:00 +0000 (13:09 +0200)
Fixes an invalid syntax occurrence in the "PageZero.html"
template from EXT:tstemplate. And fixes a logical error
plus incorrect XML tag nesting in the partial template
"DocHeader.html" from EXT:backend.

Change-Id: Ib38fbb2d80cd8e24a2400ec7d2dbd12dee5605ec
Resolves: #88422
Releases: master, 9.5
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60802
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Jonas Eberle <flightvision@googlemail.com>
Tested-by: Guido Schmechel <guido.schmechel@brandung.de>
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Jonas Eberle <flightvision@googlemail.com>
Reviewed-by: Guido Schmechel <guido.schmechel@brandung.de>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
typo3/sysext/backend/Resources/Private/Partials/DocHeader.html
typo3/sysext/tstemplate/Resources/Private/Templates/PageZero.html

index 6ed37a7..f58ace3 100644 (file)
@@ -1,39 +1,36 @@
 <div class="module-loading-indicator"></div>
 <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 row">
+        <f:variable name="columnCssClass">module-docheader-bar-column-left col-xs-12 text-right</f:variable>
         <f:if condition="{docHeader.menus}">
-            <f:then>
-                <f:if condition="{docHeader.menus->f:count()} > 1">
-                    <f:then>
-                        <div class="module-docheader-bar-column-left col-xs-12 col-sm-5 col-md-6 col-lg-4">
-                            <div class="form-inline row">
-                                <f:for each="{docHeader.menus}" as="menu">
-                                    <div class="form-group form-group-sm col-xs-6">
-                                        <f:render partial="Menus/SelectBoxJumpMenu" arguments="{menu:menu}"/>
-                                    </div>
-                                </f:for>
-                            </div>
+            <f:if condition="{docHeader.menus -> f:count()} > 1">
+                <f:then>
+                    <f:variable name="columnCssClass">module-docheader-bar-column-right col-xs-12 col-sm-7 col-md-6 col-lg-8 text-right</f:variable>
+                    <div class="module-docheader-bar-column-left col-xs-12 col-sm-5 col-md-6 col-lg-4">
+                        <div class="form-inline row">
+                            <f:for each="{docHeader.menus}" as="menu">
+                                <div class="form-group form-group-sm col-xs-6">
+                                    <f:render partial="Menus/SelectBoxJumpMenu" arguments="{menu:menu}"/>
+                                </div>
+                            </f:for>
                         </div>
-                        <div class="module-docheader-bar-column-right col-xs-12 col-sm-7 col-md-6 col-lg-8 text-right">
-                    </f:then>
-                    <f:else>
-                        <div class="module-docheader-bar-column-left col-xs-12 col-sm-3">
-                            <div class="form-inline">
-                                <f:for each="{docHeader.menus}" as="menu">
-                                    <div class="form-group form-group-sm">
-                                        <f:render partial="Menus/SelectBoxJumpMenu" arguments="{menu:menu}"/>
-                                    </div>
-                                </f:for>
-                            </div>
+                    </div>
+                </f:then>
+                <f:else>
+                    <f:variable name="columnCssClass">module-docheader-bar-column-right col-xs-12 col-sm-9 text-right</f:variable>
+                    <div class="module-docheader-bar-column-left col-xs-12 col-sm-3">
+                        <div class="form-inline">
+                            <f:for each="{docHeader.menus}" as="menu">
+                                <div class="form-group form-group-sm">
+                                    <f:render partial="Menus/SelectBoxJumpMenu" arguments="{menu:menu}"/>
+                                </div>
+                            </f:for>
                         </div>
-                        <div class="module-docheader-bar-column-right col-xs-12 col-sm-9 text-right">
-                    </f:else>
-                </f:if>
-            </f:then>
-            <f:else>
-                <div class="module-docheader-bar-column-left col-xs-12 text-right">
-            </f:else>
+                    </div>
+                </f:else>
+            </f:if>
         </f:if>
+        <div class="{columnCssClass}">
             <f:if condition="{docHeader.metaInformation.recordInformation}">
                 <span class="typo3-docheader-pagePath">
                     <f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.path"/>: <f:format.raw>{docHeader.metaInformation.path}</f:format.raw>
index 096f5e9..fb50cc4 100644 (file)
@@ -78,7 +78,7 @@
     </tr>
     <f:if condition="{page}">
         <!-- Additional templates -->
-        <f:if condition="{f:count({page._templates})}">
+        <f:if condition="{page._templates -> f:count()}">
             <f:for each="{page._templates}" as="template" iteration="i">
                 <f:if condition="{i.index} > 0">
                     <f:render section="PageZeroTableRow" arguments="{page: 0, level: level, template: template}" />
@@ -86,7 +86,7 @@
             </f:for>
         </f:if>
         <!-- Subpages -->
-        <f:if condition="{f:count({page._nodes})}">
+        <f:if condition="{page._nodes -> f:count()}">
             <f:for each="{page._nodes}" as="page">
                 <f:render section="PageZeroTableRow" arguments="{page: page, level: '{level + 1}', template: page._templates.0}" />
             </f:for>