[FEATURE] Indicate status of permissions by color in EXT:beuser 36/36136/2
authorMathias Schreiber <mathias.schreiber@wmdb.de>
Tue, 20 Jan 2015 11:01:25 +0000 (12:01 +0100)
committerPhilipp Gampe <philipp.gampe@typo3.org>
Sat, 24 Jan 2015 13:56:11 +0000 (14:56 +0100)
Although the monochrome look of the BE is intended the permission
module should reflect the status of the permission.

We use the defined color classes of Bootstrap for that.

Resolves: #63607
Releases: master
Change-Id: Ib8346835fa715f765977ea75514707ada076c5ed
Reviewed-on: http://review.typo3.org/36136
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Philipp Gampe <philipp.gampe@typo3.org>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Tested-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Tested-by: Philipp Gampe <philipp.gampe@typo3.org>
typo3/sysext/beuser/Classes/Controller/PermissionAjaxController.php
typo3/sysext/beuser/Resources/Private/Templates/Permission/Index.html

index f76cd6c..9de8870 100644 (file)
@@ -271,7 +271,7 @@ class PermissionAjaxController {
                        if ($int & $permission) {
                                $str .= IconUtility::getSpriteIcon('status-status-permission-granted', array(
                                        'title' => $GLOBALS['LANG']->getLL($permission, TRUE),
-                                       'class' => 'change-permission',
+                                       'class' => 'change-permission text-success',
                                        'data-page' => $pageId,
                                        'data-permissions' => $int,
                                        'data-mode' => 'delete',
@@ -282,7 +282,7 @@ class PermissionAjaxController {
                        } else {
                                $str .= IconUtility::getSpriteIcon('status-status-permission-denied', array(
                                        'title' => $GLOBALS['LANG']->getLL($permission, TRUE),
-                                       'class' => 'change-permission',
+                                       'class' => 'change-permission text-danger',
                                        'data-page' => $pageId,
                                        'data-permissions' => $int,
                                        'data-mode' => 'add',
index e05a1c3..52d0db0 100644 (file)
                                <td nowrap="nowrap"><strong><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:4" /></strong>: <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:4_t" /></td>
                        </tr>
                        <tr>
-                               <td nowrap="nowrap"><bu:spriteManagerIcon iconName="status-status-permission-granted" /></td>
-                               <td nowrap="nowrap"><bu:spriteManagerIcon iconName="status-status-permission-denied" /></td>
-                               <td nowrap="nowrap"><bu:spriteManagerIcon iconName="status-status-permission-granted" /></td>
-                               <td nowrap="nowrap"><bu:spriteManagerIcon iconName="status-status-permission-denied" /></td>
-                               <td nowrap="nowrap"><bu:spriteManagerIcon iconName="status-status-permission-denied" /></td>
+                               <td nowrap="nowrap"><bu:spriteManagerIcon iconName="status-status-permission-granted" options="{class:'text-success'}" /></td>
+                               <td nowrap="nowrap"><bu:spriteManagerIcon iconName="status-status-permission-denied" options="{class:'text-danger'}" /></td>
+                               <td nowrap="nowrap"><bu:spriteManagerIcon iconName="status-status-permission-granted" options="{class:'text-success'}" /></td>
+                               <td nowrap="nowrap"><bu:spriteManagerIcon iconName="status-status-permission-denied" options="{class:'text-danger'}" /></td>
+                               <td nowrap="nowrap"><bu:spriteManagerIcon iconName="status-status-permission-denied" options="{class:'text-danger'}" /></td>
                                <td nowrap="nowrap"><span class="number">5</span></td>
                                <td nowrap="nowrap"><strong><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:8" /></strong>: <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:8_t" /></td>
                        </tr>
        </div>
        <p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:def" /></p>
        <p>
-               <bu:spriteManagerIcon iconName="status-status-permission-granted" /> <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:A_Granted" /><br/>
-               <bu:spriteManagerIcon iconName="status-status-permission-denied" /> <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:A_Denied" />
+               <bu:spriteManagerIcon iconName="status-status-permission-granted" options="{class:'text-success'}" /> <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:A_Granted" /><br/>
+               <bu:spriteManagerIcon iconName="status-status-permission-denied" options="{class:'text-danger'}" /> <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:A_Denied" />
        </p>
 </f:section>