[TASK] Missing clickmenu links 55/27855/6
authorJohannes Feustel <s@feustel.eu>
Tue, 25 Feb 2014 16:00:34 +0000 (17:00 +0100)
committerTymoteusz Motylewski <t.motylewski@gmail.com>
Fri, 2 Jan 2015 16:18:50 +0000 (17:18 +0100)
For consistency and to improve usability all record icons are linked with
context menu (clickmenu) actions.

Change-Id: I154d1ada104ffed5a8a05c40ec168d1e45ac3bc0
Resolves: #56281
Releases: master
Reviewed-on: http://review.typo3.org/27855
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
typo3/sysext/backend/Classes/Form/FormEngine.php
typo3/sysext/beuser/Classes/Controller/PermissionController.php
typo3/sysext/frontend/Classes/Controller/TranslationStatusController.php

index b64c360..a3a900e 100644 (file)
@@ -3686,6 +3686,7 @@ class FormEngine {
         * @return string
         */
        public function replaceTableWrap($arr, $rec, $table) {
+               $icon = IconUtility::getSpriteIconForRecord($table, $rec, array('title' => $this->getRecordPath($table, $rec)));
                // Make "new"-label
                $languageService = $this->getLanguageService();
                if (strstr($rec['uid'], 'NEW')) {
@@ -3734,6 +3735,7 @@ class FormEngine {
                                        $pageTitle = sprintf($label, $tableTitle, $pageTitle);
                                }
                        }
+                       $icon = $this->getClickMenu($icon, $table, $rec['uid']);
                }
                foreach ($arr as $k => $v) {
                        // Make substitutions:
@@ -3750,7 +3752,7 @@ class FormEngine {
                                        $newLabel,
                                        $rLabel,
                                        htmlspecialchars($languageService->sL($GLOBALS['TCA'][$table]['ctrl']['title'])),
-                                       IconUtility::getSpriteIconForRecord($table, $rec, array('title' => $this->getRecordPath($table, $rec)))
+                                       $icon
                                ),
                                $arr[$k]
                        );
index 037d34b..0feec07 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Beuser\Controller;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Backend\Template\DocumentTemplate;
 use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\Database\DatabaseConnection;
 use TYPO3\CMS\Core\Messaging\FlashMessage;
@@ -239,7 +240,8 @@ class PermissionController extends ActionController {
                                $viewData['editPermsAllowed'] = ($data['row']['perms_userid'] == $this->getBackendUser()->user['uid']
                                        || $this->getBackendUser()->isAdmin());
 
-                               $viewData['html'] = $data['HTML'] . htmlspecialchars(GeneralUtility::fixed_lgd_cs($data['row']['title'], 20));
+                               $viewData['html'] = $this->getControllerDocumentTemplate()->wrapClickMenuOnIcon($data['HTML'], 'pages', $data['row']['uid'])
+                                       . htmlspecialchars(GeneralUtility::fixed_lgd_cs($data['row']['title'], 20));
                                $viewData['id'] = $data['row']['_ORIG_uid'] ? $data['row']['_ORIG_uid'] : $pageId;
 
                                $viewData['userPermissions'] = ($pageId ?
@@ -378,6 +380,13 @@ class PermissionController extends ActionController {
        }
 
        /**
+        * @return DocumentTemplate
+        */
+       protected function getControllerDocumentTemplate() {
+               return $GLOBALS['TBE_TEMPLATE'];
+       }
+
+       /**
         * Finding tree and offer setting of values recursively.
         *
         * @return array
index de507df..b062004 100644 (file)
@@ -108,7 +108,11 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
                        $tCells = array();
                        $langRecUids[0][] = $data['row']['uid'];
                        // Page icons / titles etc.
-                       $tCells[] = '<td' . ($data['row']['_CSSCLASS'] ? ' class="' . $data['row']['_CSSCLASS'] . '"' : '') . '>' . $data['HTML'] . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($data['row']['title'], $titleLen)) . ((string)$data['row']['nav_title'] !== '' ? ' [Nav: <em>' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($data['row']['nav_title'], $titleLen)) . '</em>]' : '') . '</td>';
+                       $tCells[] = '<td' . ($data['row']['_CSSCLASS'] ? ' class="' . $data['row']['_CSSCLASS'] . '"' : '') . '>' .
+                               $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($data['HTML'], 'pages', $data['row']['uid']) .
+                               htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($data['row']['title'], $titleLen)) .
+                               ((string)$data['row']['nav_title'] !== '' ? ' [Nav: <em>' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($data['row']['nav_title'], $titleLen)) . '</em>]' : '') .
+                               '</td>';
                        // DEFAULT language:
                        // "View page" link is created:
                        $viewPageLink = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick(