[FEATURE] Add path where reference records are located to record info 35/57735/7
authorKevin Ditscheid <kevinditscheid@gmail.com>
Tue, 31 Jul 2018 07:10:48 +0000 (09:10 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 14 Aug 2018 11:13:16 +0000 (13:13 +0200)
This change is enhancing the reference infos of records by adding the
path in the pagetree to the table of record references. This path is
similar to the path in the record edit view on the top right corner

Resolves: #85691
Releases: master
Change-Id: I7d2379fb8a9b41d726f0a1c38a3db7288e689437
Reviewed-on: https://review.typo3.org/57735
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php
typo3/sysext/backend/Resources/Private/Templates/ContentElement/ElementInformation.html
typo3/sysext/core/Documentation/Changelog/master/Feature-85691-ShowPagePathForReferencesInRecordInfo.rst [new file with mode: 0644]

index f89613b..a7cbdca 100644 (file)
@@ -642,6 +642,7 @@ class ElementInformationController
                 $line['parentRecordTitle'] = $parentRecordTitle;
                 $line['title'] = $lang->sL($GLOBALS['TCA'][$row['tablename']]['ctrl']['title']);
                 $line['labelForTableColumn'] = $this->getLabelForTableColumn($row['tablename'], $row['field']);
+                $line['path'] = BackendUtility::getRecordPath($record['pid'], '', 0, 0);
                 $line['actions'] = $this->getRecordActions($row['tablename'], $row['recuid'], $request);
             } else {
                 $line['row'] = $row;
@@ -708,6 +709,7 @@ class ElementInformationController
                 $line['recordTitle'] = BackendUtility::getRecordTitle($row['ref_table'], $record, false, true);
                 $line['title'] = $lang->sL($GLOBALS['TCA'][$row['ref_table']]['ctrl']['title']);
                 $line['labelForTableColumn'] = $this->getLabelForTableColumn($table, $row['field']);
+                $line['path'] = BackendUtility::getRecordPath($record['pid'], '', 0, 0);
                 $line['actions'] = $this->getRecordActions($row['ref_table'], $row['ref_uid'], $request);
             } else {
                 $line['row'] = $row;
index 744552a..852dd37 100644 (file)
@@ -56,6 +56,7 @@
                                                <th class="col-title"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:show_item.php.title" /></th>
                                                <th><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:show_item.php.table" /></th>
                                                <th><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:show_item.php.uid" /></th>
+                                               <th><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.path" /></th>
                                                <th><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:show_item.php.field" /></th>
                                                <th><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:show_item.php.flexpointer" /></th>
                                                <th><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:show_item.php.softrefKey" /></th>
@@ -81,6 +82,7 @@
                                                <th class="col-title"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:show_item.php.title" /></th>
                                                <th><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:show_item.php.table" /></th>
                                                <th><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:show_item.php.uid" /></th>
+                                               <th><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.path" /></th>
                                                <th><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:show_item.php.field" /></th>
                                                <th><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:show_item.php.flexpointer" /></th>
                                                <th><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:show_item.php.softrefKey" /></th>
                 <td></td>
             </f:else>
         </f:if>
+        <td title="{line.path}" class="col-responsive">{line.path}</td>
         <td>{line.labelForTableColumn}</td>
         <td>{line.row.flexpointer}</td>
         <td>{line.row.softref_key}</td>
                 <td></td>
             </f:else>
         </f:if>
+        <td title="{line.path}" class="col-responsive">{line.path}</td>
         <td>{line.labelForTableColumn}</td>
         <td>{line.row.flexpointer}</td>
         <td>{line.row.softref_key}</td>
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-85691-ShowPagePathForReferencesInRecordInfo.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-85691-ShowPagePathForReferencesInRecordInfo.rst
new file mode 100644 (file)
index 0000000..1220fa8
--- /dev/null
@@ -0,0 +1,20 @@
+.. include:: ../../Includes.txt
+
+==============================================================
+Feature: #85691 - Show page path for references in record info
+==============================================================
+
+See :issue:`85691`
+
+Description
+===========
+
+This feature adds the page path of record references into the table found in the record info.
+
+
+Impact
+======
+
+Better way to find record references via the record info
+
+.. index:: Backend, ext:backend