[TASK] Streamline icons and buttons in permission module 53/44153/5
authorFrank Nägler <frank.naegler@typo3.org>
Mon, 19 Oct 2015 11:39:53 +0000 (13:39 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 22 Oct 2015 10:56:27 +0000 (12:56 +0200)
Resolves: #70842
Releases: master
Change-Id: I0ebe1f4a79b854aa8ee16564cb596317a905eb68
Reviewed-on: https://review.typo3.org/44153
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/beuser/Classes/Controller/PermissionAjaxController.php
typo3/sysext/beuser/Resources/Private/Templates/Permission/Index.html
typo3/sysext/core/Classes/Imaging/IconRegistry.php

index 4f01ae0..4d0196b 100644 (file)
@@ -197,9 +197,15 @@ class PermissionAjaxController
         $elementId = 'o_' . $page;
         $options = '<option value="0"></option>' . $options;
         $selector = '<select name="new_page_owner" id="new_page_owner">' . $options . '</select>';
-        $saveButton = '<a class="saveowner" data-page="' . $page . '" data-owner="' . $ownerUid . '" data-element-id="' . $elementId . '" title="Change owner">' . $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)->render() . '</a>';
-        $cancelButton = '<a class="restoreowner" data-page="' . $page . '"  data-owner="' . $ownerUid . '" data-element-id="' . $elementId . '"' . (!empty($username) ? ' data-username="' . htmlspecialchars($username) . '"' : '') . ' title="Cancel">' . $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL)->render() . '</a>';
-        return '<span id="' . $elementId . '">' . $selector . $saveButton . $cancelButton . '</span>';
+        $saveButton = '<a class="saveowner btn btn-default" data-page="' . $page . '" data-owner="' . $ownerUid . '" data-element-id="' . $elementId . '" title="Change owner">' . $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)->render() . '</a>';
+        $cancelButton = '<a class="restoreowner btn btn-default" data-page="' . $page . '"  data-owner="' . $ownerUid . '" data-element-id="' . $elementId . '"' . (!empty($username) ? ' data-username="' . htmlspecialchars($username) . '"' : '') . ' title="Cancel">' . $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL)->render() . '</a>';
+        return '<span id="' . $elementId . '">'
+            . $selector
+            . '<span class="btn-group">'
+            . $saveButton
+            . $cancelButton
+            . '</span>'
+            . '</span>';
     }
 
     /**
@@ -240,9 +246,15 @@ class PermissionAjaxController
         $elementId = 'g_' . $page;
         $options = '<option value="0"></option>' . $options;
         $selector = '<select name="new_page_group" id="new_page_group">' . $options . '</select>';
-        $saveButton = '<a class="savegroup" data-page="' . $page . '" data-group="' . $groupUid . '" data-element-id="' . $elementId . '" title="Change group">' . $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)->render() . '</a>';
-        $cancelButton = '<a class="restoregroup" data-page="' . $page . '" data-group="' . $groupUid . '" data-element-id="' . $elementId . '"' . (!empty($groupname) ? ' data-groupname="' . htmlspecialchars($groupname) . '"' : '') . ' title="Cancel">' . $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL)->render() . '</a>';
-        return '<span id="' . $elementId . '">' . $selector . $saveButton . $cancelButton . '</span>';
+        $saveButton = '<a class="savegroup btn btn-default" data-page="' . $page . '" data-group="' . $groupUid . '" data-element-id="' . $elementId . '" title="Change group">' . $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)->render() . '</a>';
+        $cancelButton = '<a class="restoregroup btn btn-default" data-page="' . $page . '" data-group="' . $groupUid . '" data-element-id="' . $elementId . '"' . (!empty($groupname) ? ' data-groupname="' . htmlspecialchars($groupname) . '"' : '') . ' title="Cancel">' . $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL)->render() . '</a>';
+        return '<span id="' . $elementId . '">'
+            . $selector
+            . '<span class="btn-group">'
+            . $saveButton
+            . $cancelButton
+            . '</span>'
+            . '</span>';
     }
 
     /**
@@ -290,9 +302,9 @@ class PermissionAjaxController
     {
         $page = (int)$page;
         if ($editLockState === 1) {
-            $ret = '<span id="el_' . $page . '"><a class="editlock" data-page="' . $page . '" data-lockstate="1" title="The page and all content is locked for editing by all non-Admin users.">' . $this->iconFactory->getIcon('status-warning-lock', Icon::SIZE_SMALL)->render() . '</a></span>';
+            $ret = '<span id="el_' . $page . '"><a class="editlock btn btn-default" data-page="' . $page . '" data-lockstate="1" title="The page and all content is locked for editing by all non-Admin users.">' . $this->iconFactory->getIcon('actions-unlock', Icon::SIZE_SMALL)->render() . '</a></span>';
         } else {
-            $ret = '<span id="el_' . $page . '"><a class="editlock" data-page="' . $page . '" data-lockstate="0" title="Enable the &raquo;Admin-only&laquo; edit lock for this page">[+]</a></span>';
+            $ret = '<span id="el_' . $page . '"><a class="editlock btn btn-default" data-page="' . $page . '" data-lockstate="0" title="Enable the &raquo;Admin-only&laquo; edit lock for this page">' . $this->iconFactory->getIcon('actions-lock', Icon::SIZE_SMALL)->render() . '</a></span>';
         }
         return $ret;
     }
index ddfdd15..6585dc4 100644 (file)
@@ -57,6 +57,7 @@
                                                                                        <f:link.action
                                                                                                action="edit"
                                                                                                arguments="{id: data.row._ORIG_uid, depth: depth}"
+                                                                                               class="btn btn-default"
                                                                                                title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:ch_permissions')}"
                                                                                        >
                                                                                                <core:icon identifier="actions-document-open" />
@@ -66,6 +67,7 @@
                                                                                        <f:link.action
                                                                                                action="edit"
                                                                                                arguments="{id: data.row.uid, depth: depth}"
+                                                                                               class="btn btn-default"
                                                                                                title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:ch_permissions')}"
                                                                                        >
                                                                                                <core:icon identifier="actions-document-open" />
                                                                                <f:if condition="{data.row.editlock}">
                                                                                        <f:then>
                                                                                                <a
-                                                                                                       class="editlock"
+                                                                                                       class="editlock btn btn-default"
                                                                                                        data-page="{data.row.uid}"
                                                                                                        data-lockstate="1"
                                                                                                        title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:EditLock_descr')}"
                                                                                                >
-                                                                                                       <core:icon identifier="status-warning-lock" />
+                                                                                                       <core:icon identifier="actions-unlock" />
                                                                                                </a>
                                                                                        </f:then>
                                                                                        <f:else>
                                                                                                <a
-                                                                                                       class="editlock"
+                                                                                                       class="editlock btn btn-default"
                                                                                                        data-page="{data.row.uid}"
                                                                                                        data-lockstate="0"
                                                                                                        title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:EditLock_descr2')}"
                                                                                                >
-                                                                                                       [+]
+                                                                                                       <core:icon identifier="actions-lock" />
                                                                                                </a>
                                                                                        </f:else>
                                                                                </f:if>
index a3ecafa..39786d7 100644 (file)
@@ -717,6 +717,12 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface
                 'source' => 'EXT:core/Resources/Public/Icons/T3Icons/actions/actions-template-new.svg'
             )
         ),
+        'actions-unlock' => array(
+            'provider' => FontawesomeIconProvider::class,
+            'options' => array(
+                'name' => 'unlock',
+            )
+        ),
         'actions-unmarkstate' => array(
             'provider' => SvgIconProvider::class,
             'options' => array(
@@ -1987,7 +1993,6 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface
             )
         ),
 
-
         // Extensions
         'extensions-extensionmanager-update-script' => array(
             'provider' => FontawesomeIconProvider::class,