[TASK] Show correct module action name in bookmark list 44/44144/3
authorMichael Oehlhof <typo3@oehlhof.de>
Sun, 18 Oct 2015 22:00:14 +0000 (00:00 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sun, 25 Oct 2015 13:22:39 +0000 (14:22 +0100)
This patch includes the changes for the two modules "Backend user"
and "Scheduler" using the new displayName property of the ShortcutButton.

Resolves: #70824
Releases: master
Change-Id: Iad9169030429d649aa9f9b8cec910529b3140884
Reviewed-on: https://review.typo3.org/44144
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/beuser/Classes/Controller/BackendUserActionController.php
typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php

index 650e9bb..b880186 100644 (file)
@@ -127,10 +127,7 @@ class BackendUserActionController extends ActionController
             $modulePrefix = strtolower('tx_' . $extensionName . '_' . $moduleName);
             $getVars = array('id', 'M', $modulePrefix);
         }
-        $shortcutButton = $buttonBar->makeShortcutButton()
-            ->setModuleName($moduleName)
-            ->setGetVariables($getVars);
-        $buttonBar->addButton($shortcutButton);
+        $shortcutName = $this->getLanguageService()->sL('LLL:EXT:beuser/Resources/Private/Language/locallang.xml:backendUsers');
         if ($this->request->getControllerName() === 'BackendUser') {
             if ($this->request->getControllerActionName() === 'index') {
                 $returnUrl = rawurlencode(BackendUtility::getModuleUrl('system_BeuserTxBeuser'));
@@ -154,8 +151,12 @@ class BackendUserActionController extends ActionController
                     ->setIcon($icon);
                 $buttonBar->addButton($addUserButton, ButtonBar::BUTTON_POSITION_LEFT);
             }
+            if ($this->request->getControllerActionName() === 'online') {
+                $shortcutName = $this->getLanguageService()->sL('LLL:EXT:beuser/Resources/Private/Language/locallang.xml:onlineUsers');
+            }
         }
         if ($this->request->getControllerName() === 'BackendUserGroup') {
+            $shortcutName = $this->getLanguageService()->sL('LLL:EXT:beuser/Resources/Private/Language/locallang.xml:backendUserGroupsMenu');
             $returnUrl = rawurlencode(BackendUtility::getModuleUrl('system_BeuserTxBeuser', array(
                 'tx_beuser_system_beusertxbeuser' => array(
                     'action' => 'index',
@@ -172,6 +173,11 @@ class BackendUserActionController extends ActionController
                 ->setIcon($icon);
             $buttonBar->addButton($addUserGroupButton, ButtonBar::BUTTON_POSITION_LEFT);
         }
+        $shortcutButton = $buttonBar->makeShortcutButton()
+            ->setModuleName($moduleName)
+            ->setDisplayName($shortcutName)
+            ->setGetVariables($getVars);
+        $buttonBar->addButton($shortcutButton);
     }
 
     /**
index 4d64af1..49da2ae 100644 (file)
@@ -1653,6 +1653,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
         // Shortcut
         $shortcutButton = $buttonBar->makeShortcutButton()
             ->setModuleName($this->moduleName)
+            ->setDisplayName($this->MOD_MENU['function'][$this->MOD_SETTINGS['function']])
             ->setSetVariables(['function']);
         $buttonBar->addButton($shortcutButton);
     }