[BUGFIX] User Admin: Move "Add" button to docheader
authorFelix Kopp <felix-source@phorax.com>
Wed, 28 Dec 2011 16:41:49 +0000 (17:41 +0100)
committerSteffen Gebert <steffen.gebert@typo3.org>
Fri, 6 Jan 2012 20:30:53 +0000 (21:30 +0100)
Move the "Add User" button in "User Admin" module to the docheader.

Change-Id: I3394685e8056837c90ca735b521260ca6fb675f6
Fixes: #32855
Releases: 4.7
Reviewed-on: http://review.typo3.org/7625
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
typo3/sysext/beuser/mod/index.php
typo3/templates/beuser.html

index e594000..0e02878 100755 (executable)
@@ -1174,6 +1174,7 @@ class SC_mod_tools_be_user_index {
        protected function getButtons() {
 
                $buttons = array(
+                       'add' => '',
                        'csh' => '',
                        'shortcut' => '',
                        'save' => ''
@@ -1181,6 +1182,12 @@ class SC_mod_tools_be_user_index {
                        // CSH
                //$buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH']);
 
+                       // Add user
+               if ($this->MOD_SETTINGS['function'] === 'compare') {
+                       $buttons['add'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick('&edit[be_users][0]=new' , $this->doc->backPath, -1)) .
+                               '" title="' . $GLOBALS['LANG']->getLL('newUser', TRUE) . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-new') . '</a>';
+               }
+
                        // Shortcut
                if ($GLOBALS['BE_USER']->mayMakeShortcut())     {
                        $buttons['shortcut'] = $this->doc->makeShortcutIcon('be_user_uid,compareFlags','function', $this->MCONF['name']);
@@ -1336,11 +1343,7 @@ class SC_mod_tools_be_user_index {
                                // Header:
                        $allCells = array();
 
-                       $link_createNewUser='<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick('&edit[be_users][0]=new',$this->doc->backPath,-1)).'" title="' . $GLOBALS['LANG']->getLL('newUser', TRUE) . '">'.
-                                       t3lib_iconWorks::getSpriteIcon('actions-document-new') .
-                               '</a>';
-
-                       $allCells['USERS'] = '<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td><strong>' . $GLOBALS['LANG']->getLL('usernames', TRUE) . '</strong></td><td width="12">' . $link_createNewUser . '</td></tr></table>';
+                       $allCells['USERS'] = '<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td><strong>' . $GLOBALS['LANG']->getLL('usernames', TRUE) . '</strong></td></table>';
 
                        foreach ($options as $kk => $vv) {
                                if ($compareFlags[$kk]) {
index 6fec932..e0126cf 100644 (file)
@@ -27,7 +27,7 @@
 <!-- ###BUTTON_GROUP_WRAP### -->
 
 <!-- ###BUTTON_GROUPS_LEFT### -->
-<!-- ###BUTTON_GROUP1### -->###SAVE###<!-- ###BUTTON_GROUP1### -->
+<!-- ###BUTTON_GROUP1### -->###ADD######SAVE###<!-- ###BUTTON_GROUP1### -->
 <!-- ###BUTTON_GROUPS_LEFT### -->
 
 <!-- ###BUTTON_GROUPS_RIGHT### -->