[BUGFIX] Hide path if no record information is available 57/44357/3
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Thu, 29 Oct 2015 14:54:32 +0000 (15:54 +0100)
committerMorton Jonuschat <m.jonuschat@mojocode.de>
Thu, 29 Oct 2015 15:03:46 +0000 (16:03 +0100)
Do not show the path on the upper right of a module if
there is no record information.

Resolves: #70510
Releases: master
Change-Id: I234a18d83a6553adbd6db12786446a11da96effa
Reviewed-on: https://review.typo3.org/44357
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers <xavier@typo3.org>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
typo3/sysext/backend/Classes/Template/Components/MetaInformation.php
typo3/sysext/backend/Resources/Private/Partials/DocHeader.html

index 8365050..05c52f1 100644 (file)
@@ -99,8 +99,12 @@ class MetaInformation
      */
     public function getRecordInformation()
     {
-        $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
         $pageRecord = $this->recordArray;
+        if (empty($pageRecord)) {
+            return '';
+        }
+
+        $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
         $uid = '';
         $title = '';
         $additionalInfo = (!empty($pageRecord['_additional_info']) ? $pageRecord['_additional_info'] : '');
index 61efa4d..fe1bb66 100644 (file)
@@ -10,7 +10,9 @@
                        </div>
                </div>
                <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>
+                       <f:if condition="{docHeader.metaInformation.recordInformation}">
+                               <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>
+                       </f:if>
                </div>
        </div>
        <div class="module-docheader-bar module-docheader-bar-buttons t3js-module-docheader-bar t3js-module-docheader-bar-buttons">