[TASK] Add btn-group to ext:beuser 24/34324/3
authorWouter Wolters <typo3@wouterwolters.nl>
Tue, 18 Nov 2014 22:27:36 +0000 (23:27 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Wed, 19 Nov 2014 19:37:04 +0000 (20:37 +0100)
Resolves: #63057
Releases: master
Change-Id: Ife76126c53bc2109e5465d15ea6d2659e205ac03
Reviewed-on: http://review.typo3.org/34324
Reviewed-by: Frank Nägler <typo3@naegler.net>
Tested-by: Frank Nägler <typo3@naegler.net>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/beuser/Classes/ViewHelpers/RemoveUserViewHelper.php
typo3/sysext/beuser/Classes/ViewHelpers/SwitchUserViewHelper.php
typo3/sysext/beuser/Resources/Private/Partials/BackendUser/IndexListRow.html
typo3/sysext/beuser/Resources/Private/Partials/BackendUser/OnlineListRow.html

index 173bff1..a7c73f9 100644 (file)
@@ -35,7 +35,7 @@ class RemoveUserViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractView
                $redirectUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI');
                $parameters = 'cmd[be_users][' . $backendUser->getUid() . '][delete]=1';
                $url = $GLOBALS['BACK_PATH'] . 'tce_db.php?&' . $parameters . '&redirect=' . ($redirectUrl == '' ? '\' + T3_THIS_LOCATION + \'' : rawurlencode($redirectUrl)) . '&vC=' . rawurlencode($GLOBALS['BE_USER']->veriCode()) . \TYPO3\CMS\Backend\Utility\BackendUtility::getUrlToken('tceAction') . '&prErr=1&uPT=1';
-               return '<a href="' . $url . '"  onclick="return confirm(' . \TYPO3\CMS\Core\Utility\GeneralUtility::quoteJSvalue(\TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('confirm', 'beuser', array($backendUser->getUserName()))) . ')">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon(('actions-edit-delete')) . '</a>';
+               return '<a class="btn" href="' . $url . '"  onclick="return confirm(' . \TYPO3\CMS\Core\Utility\GeneralUtility::quoteJSvalue(\TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('confirm', 'beuser', array($backendUser->getUserName()))) . ')">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon(('actions-edit-delete')) . '</a>';
        }
 
 }
index 8e94922..d8ee59f 100644 (file)
@@ -33,7 +33,7 @@ class SwitchUserViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractView
                        return '';
                }
                $title = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('switchBackMode', 'beuser');
-               return '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('SwitchUser' => $backendUser->getUid()))) . '" target="_top" title="' . htmlspecialchars($title) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon(('actions-system-backend-user-switch')) . '</a>';
+               return '<a class="btn" href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('SwitchUser' => $backendUser->getUid()))) . '" target="_top" title="' . htmlspecialchars($title) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon(('actions-system-backend-user-switch')) . '</a>';
        }
 
 }
index c2e4f1a..323e5d9 100644 (file)
                <f:link.action action="addToCompareList" arguments="{uid: backendUser.uid}"><bu:spriteManagerIcon iconName="actions-edit-add"/></f:link.action>
                <f:link.action action="addToCompareList" arguments="{uid: backendUser.uid}"><f:translate key="compare">Compare</f:translate></f:link.action>
        </td>
-       <td>
-               <a href="#" onclick="top.launchView('be_users', '{backendUser.uid}'); return false;"><bu:spriteManagerIcon iconName="actions-document-info" /></a>
-               <a href="alt_doc.php?edit[be_users][{backendUser.uid}]=edit&returnUrl={returnUrl}"><bu:spriteManagerIcon iconName="actions-document-open" /></a>
+       <td class="col-control">
+               <div class="btn-group" role="group">
+                       <a class="btn" href="#" onclick="top.launchView('be_users', '{backendUser.uid}'); return false;"><bu:spriteManagerIcon iconName="actions-document-info" /></a>
+                       <a class="btn" href="alt_doc.php?edit[be_users][{backendUser.uid}]=edit&returnUrl={returnUrl}"><bu:spriteManagerIcon iconName="actions-document-open" /></a>
 
-               <f:if condition="{backendUser.isDisabled} == 1">
-                       <f:then>
-                               <a href="<bu:issueCommand parameters="tce_db.php?&data[be_users][{backendUser.uid}][disable]=0&redirect={redirectUrl}" />"><bu:spriteManagerIcon iconName="actions-edit-unhide" options="{title: 'unhide'}" /></a>
-                       </f:then>
-                       <f:else>
-                               <a href="<bu:issueCommand parameters="tce_db.php?&data[be_users][{backendUser.uid}][disable]=1&redirect={redirectUrl}" />"><bu:spriteManagerIcon iconName="actions-edit-hide" options="{title: 'hide'}" /></a>
-                       </f:else>
-               </f:if>
+                       <f:if condition="{backendUser.isDisabled} == 1">
+                               <f:then>
+                                       <a class="btn" href="<bu:issueCommand parameters="tce_db.php?&data[be_users][{backendUser.uid}][disable]=0&redirect={redirectUrl}" />"><bu:spriteManagerIcon iconName="actions-edit-unhide" options="{title: 'unhide'}" /></a>
+                               </f:then>
+                               <f:else>
+                                       <a class="btn" href="<bu:issueCommand parameters="tce_db.php?&data[be_users][{backendUser.uid}][disable]=1&redirect={redirectUrl}" />"><bu:spriteManagerIcon iconName="actions-edit-hide" options="{title: 'hide'}" /></a>
+                               </f:else>
+                       </f:if>
 
-               <bu:removeUser backendUser="{backendUser}" />
+                       <bu:removeUser backendUser="{backendUser}" />
 
-               <f:comment>
-                       No need to check if currently listed user is current user.
-                       SU does not work with admin users and current user must always be admin.
-                       Only admin users may use the backend user administration.
-               </f:comment>
-               <f:if condition="{backendUser.active} == 1">
-                       <bu:SwitchUser backendUser="{backendUser}" />
-               </f:if>
+                       <f:comment>
+                               No need to check if currently listed user is current user.
+                               SU does not work with admin users and current user must always be admin.
+                               Only admin users may use the backend user administration.
+                       </f:comment>
+                       <f:if condition="{backendUser.active} == 1">
+                               <bu:SwitchUser backendUser="{backendUser}" />
+                       </f:if>
+               </div>
        </td>
        <td class="hidden-xs hidden-sm">
                <f:if condition="{backendUser.lastLoginDateAndTime}">
index 76ca721..c83ec55 100644 (file)
@@ -5,10 +5,12 @@
                <b>{onlineUser.backendUser.userName}</b><br />
                {onlineUser.backendUser.realName}
        </td>
-       <td>
-               <a href="#" onclick="top.launchView('be_users', '{onlineUser.backendUser.uid}',''); return false;">
-                       <bu:SpriteManagerIcon iconName="actions-document-info" />
-               </a>
+       <td class="col-control">
+               <div class="btn-group" role="group">
+                       <a class="btn" href="#" onclick="top.launchView('be_users', '{onlineUser.backendUser.uid}',''); return false;">
+                               <bu:SpriteManagerIcon iconName="actions-document-info" />
+                       </a>
+               </div>
        </td>
 
        <f:for each="{onlineUser.sessions}" as="session" key="sessionKey">