[TASK] Table cell icons as btn-group 17/34517/4
authorFrank Nägler <typo3@naegler.net>
Sun, 23 Nov 2014 21:26:52 +0000 (22:26 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Wed, 26 Nov 2014 10:09:01 +0000 (11:09 +0100)
Extension module: Table cell icons as btn-group with
empty-empty / order

Resolves: #63236
Releases: master
Change-Id: I83f3dbdf2ad3b7fee3d882ff02633ca590d45d76
Reviewed-on: http://review.typo3.org/34517
Reviewed-by: Sebastian Fischer <typo3@evoweb.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/extensionmanager/Classes/ViewHelpers/ConfigureExtensionViewHelper.php
typo3/sysext/extensionmanager/Classes/ViewHelpers/DownloadExtensionDataViewHelper.php
typo3/sysext/extensionmanager/Classes/ViewHelpers/RemoveExtensionViewHelper.php
typo3/sysext/extensionmanager/Classes/ViewHelpers/UpdateScriptViewHelper.php
typo3/sysext/extensionmanager/Resources/Private/Templates/List/Index.html

index 21d1900..a436615 100644 (file)
@@ -13,6 +13,8 @@ namespace TYPO3\CMS\Extensionmanager\ViewHelpers;
  *
  * The TYPO3 project - inspiring people to share!
  */
+use TYPO3\CMS\Backend\Utility\IconUtility;
+
 /**
  * View helper for configure extension link
  *
@@ -56,7 +58,7 @@ class ConfigureExtensionViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Link\Act
                        $this->tag->setContent($content);
                        $content = $this->tag->render();
                } elseif ($forceConfiguration) {
-                       $content = '';
+                       $content = '<span class="btn disabled">' . IconUtility::getSpriteIcon('empty-empty') . '</span>';
                }
 
                return $content;
index 8d1e372..7327ecc 100644 (file)
@@ -13,6 +13,8 @@ namespace TYPO3\CMS\Extensionmanager\ViewHelpers;
  *
  * The TYPO3 project - inspiring people to share!
  */
+use TYPO3\CMS\Backend\Utility\IconUtility;
+
 /**
  * view helper for displaying a download extension data link
  *
@@ -35,7 +37,7 @@ class DownloadExtensionDataViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Link\
        public function render($extension) {
                $filePrefix = PATH_site . $extension['siteRelPath'];
                if (!file_exists(($filePrefix . 'ext_tables.sql')) && !file_exists(($filePrefix . 'ext_tables_static+adt.sql'))) {
-                       return '';
+                       return '<span class="btn disabled">' . IconUtility::getSpriteIcon('empty-empty') . '</span>';
                }
                $uriBuilder = $this->controllerContext->getUriBuilder();
                $uriBuilder->reset();
@@ -43,7 +45,7 @@ class DownloadExtensionDataViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Link\
                        'extension' => $extension['key']
                ), 'Action');
                $this->tag->addAttribute('href', $uri);
-               $cssClass = 'downloadExtensionData';
+               $cssClass = 'downloadExtensionData btn';
                $this->tag->addAttribute('class', $cssClass);
                $this->tag->addAttribute('title', \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('extensionList.downloadsql', 'extensionmanager'));
                $this->tag->setContent(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-system-extension-sqldump'));
index a175221..f87a0a2 100644 (file)
@@ -13,6 +13,8 @@ namespace TYPO3\CMS\Extensionmanager\ViewHelpers;
  *
  * The TYPO3 project - inspiring people to share!
  */
+use TYPO3\CMS\Backend\Utility\IconUtility;
+
 /**
  * view helper for displaying a remove extension link
  *
@@ -34,13 +36,13 @@ class RemoveExtensionViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Link\Action
         */
        public function render($extension) {
                if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($extension['key'])) {
-                       return '';
+                       return '<span class="btn disabled">' . IconUtility::getSpriteIcon('empty-empty') . '</span>';
                }
                if (
                        !in_array($extension['type'], \TYPO3\CMS\Extensionmanager\Domain\Model\Extension::returnAllowedInstallTypes()) ||
                        $extension['type'] === 'System'
                ) {
-                       return '';
+                       return '<span class="btn disabled">' . IconUtility::getSpriteIcon('empty-empty') . '</span>';
                }
                $uriBuilder = $this->controllerContext->getUriBuilder();
                $action = 'removeExtension';
@@ -50,7 +52,7 @@ class RemoveExtensionViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Link\Action
                        'extension' => $extension['key']
                ), 'Action');
                $this->tag->addAttribute('href', $uri);
-               $cssClass = 'removeExtension';
+               $cssClass = 'removeExtension btn';
                $this->tag->addAttribute('class', $cssClass);
                $this->tag->addAttribute('title', \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('extensionList.remove', 'extensionmanager'));
                $this->tag->setContent(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-edit-delete'));
index c21e79e..78f0c8a 100644 (file)
@@ -13,6 +13,7 @@ namespace TYPO3\CMS\Extensionmanager\ViewHelpers;
  *
  * The TYPO3 project - inspiring people to share!
  */
+use TYPO3\CMS\Backend\Utility\IconUtility;
 
 /**
  * View helper for update script link
@@ -57,6 +58,8 @@ class UpdateScriptViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Link\ActionVie
                        $this->tag->addAttribute('title', \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('extensionList.update.script', 'extensionmanager'));
                        $this->tag->setContent(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('extensions-extensionmanager-update-script'));
                        $tag = $this->tag->render();
+               } else {
+                       return '<span class="btn disabled">' . IconUtility::getSpriteIcon('empty-empty') . '</span>';
                }
                return $tag;
        }
index be7a798..9fbbea1 100644 (file)
                                        {extension.version}
                                </td>
                                <td class="icons">
-                                       <em:processAvailableActions extension="{extension}">
-                                               <em:configureExtension extension="{extension}"><f:be.buttons.icon icon="actions-system-extension-configure" title="{f:translate(key:'extensionList.configure')}" /></em:configureExtension>
-                                               <em:updateScript extensionKey="{extension.key}" />
-                                               <em:removeExtension extension="{extension}" />
-                                               <f:be.buttons.icon uri="{f:uri.action(action:'downloadExtensionZip',controller:'Action',arguments:'{extension:extension.key}')}" icon="actions-system-extension-download" title="{f:translate(key:'extensionList.downloadzip')}"/>
-                                               <em:downloadExtensionData extension="{extension}" />
-                                       </em:processAvailableActions>
+                                       <div class="btn-group">
+                                               <em:processAvailableActions extension="{extension}">
+                                                       <em:configureExtension class="btn" extension="{extension}"><f:be.buttons.icon icon="actions-system-extension-configure" title="{f:translate(key:'extensionList.configure')}" /></em:configureExtension>
+                                                       <em:updateScript class="btn" extensionKey="{extension.key}" />
+                                                       <em:removeExtension class="btn" extension="{extension}" />
+                                                       <span class="btn"><f:be.buttons.icon uri="{f:uri.action(action:'downloadExtensionZip',controller:'Action',arguments:'{extension:extension.key}')}" icon="actions-system-extension-download" title="{f:translate(key:'extensionList.downloadzip')}"/></span>
+                                                       <em:downloadExtensionData class="btn" extension="{extension}" />
+                                               </em:processAvailableActions>
+                                       </div>
                                </td>
                                <td class="state {extension.state}">
                                        {extension.state}