[TASK] Replace sprite icon "actions-system-extension-*" with the new IconFactory 49/42949/4
authorWouter Wolters <typo3@wouterwolters.nl>
Mon, 31 Aug 2015 21:23:18 +0000 (23:23 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Tue, 1 Sep 2015 18:16:51 +0000 (20:16 +0200)
Resolves: #69445
Releases: master
Change-Id: I0061a8eef57f60479f0dc51b82bac3d1b5afcfca
Reviewed-on: http://review.typo3.org/42949
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/core/Classes/Imaging/IconRegistry.php
typo3/sysext/documentation/Resources/Private/Templates/Document/Download.html
typo3/sysext/extensionmanager/Classes/ViewHelpers/DownloadExtensionDataViewHelper.php
typo3/sysext/extensionmanager/Classes/ViewHelpers/ToggleExtensionInstallationStateViewHelper.php
typo3/sysext/extensionmanager/Resources/Private/Partials/List/Distribution.html
typo3/sysext/extensionmanager/Resources/Private/Templates/Distribution/Show.html
typo3/sysext/extensionmanager/Resources/Private/Templates/List/Distributions.html
typo3/sysext/extensionmanager/Resources/Private/Templates/List/Index.html
typo3/sysext/lang/Resources/Private/Partials/Icons.html
typo3/sysext/lang/Resources/Private/Templates/Language/ListLanguages.html

index 1e0a83b..a81e478 100644 (file)
@@ -215,6 +215,48 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                                'source' => 'EXT:backend/Resources/Public/Icons/Action/actions-system-cache-clear-impact-high.svg',
                        )
                ),
+               'actions-system-extension-configure' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'gear',
+                       )
+               ),
+               'actions-system-extension-download' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'download',
+                       )
+               ),
+               'actions-system-extension-install' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'plus-circle',
+                       )
+               ),
+               'actions-system-extension-import' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'cloud-download',
+                       )
+               ),
+               'actions-system-extension-uninstall' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'minus-square',
+                       )
+               ),
+               'actions-system-extension-sqldump' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'database',
+                       )
+               ),
+               'actions-system-extension-update' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'refresh',
+                       )
+               ),
                'actions-system-list-open' => array(
                        'provider' => FontawesomeIconProvider::class,
                        'options' => array(
index 0bad6d4..8004950 100644 (file)
@@ -1,3 +1,5 @@
+{namespace core=TYPO3\CMS\Core\ViewHelpers}
+
 <f:layout name="Default"/>
 
 <f:section name="module-headline">
                                <td class="hidden-xs">{document.shortcut}</td>
                                <td class="hidden-xs">{document.type}</td>
                                <td class="col-nowrap">
-                                       <f:be.buttons.icon uri="{f:uri.action(action:'fetch',arguments:'{url:document.url, key:document.key, version:document.version}')}" icon="actions-system-extension-download" title="{f:translate(key:'documentation.actions.download')}" additionalAttributes="{class: 'btn btn-default'}" />
+                                       <f:link.action action="fetch" arguments="{url:document.url, key:document.key, version:document.version}" class="btn btn-default">
+                                               <span title="{f:translate(key:'documentation.actions.download')}">
+                                                       <core:icon identifier="actions-system-extension-download" />
+                                               </span>
+                                       </f:link.action>
                                </td>
                        </tr>
                </f:for>
                </tbody>
        </table>
-</f:section>
\ No newline at end of file
+</f:section>
index b5ae30e..d2829a1 100644 (file)
@@ -15,6 +15,9 @@ namespace TYPO3\CMS\Extensionmanager\ViewHelpers;
  */
 
 use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
  * view helper for displaying a download extension data link
@@ -34,6 +37,9 @@ class DownloadExtensionDataViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Link\
         * @return string the rendered a tag
         */
        public function render($extension) {
+               /** @var IconFactory $iconFactory */
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+
                $filePrefix = PATH_site . $extension['siteRelPath'];
                if (!file_exists(($filePrefix . 'ext_tables.sql')) && !file_exists(($filePrefix . 'ext_tables_static+adt.sql'))) {
                        return '<span class="btn btn-default disabled">' . IconUtility::getSpriteIcon('empty-empty') . '</span>';
@@ -47,7 +53,7 @@ class DownloadExtensionDataViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Link\
                $cssClass = 'downloadExtensionData btn btn-default';
                $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'));
+               $this->tag->setContent($iconFactory->getIcon('actions-system-extension-sqldump', Icon::SIZE_SMALL)->render());
                return $this->tag->render();
        }
 
index 0540881..4239806 100644 (file)
@@ -14,6 +14,10 @@ namespace TYPO3\CMS\Extensionmanager\ViewHelpers;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Display a deactivate / activate link
  * @internal
@@ -50,7 +54,10 @@ class ToggleExtensionInstallationStateViewHelper extends \TYPO3\CMS\Fluid\ViewHe
                $this->tag->addAttribute('title', \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('extensionList.' . $label, 'extensionmanager'));
                $icon = $extension['installed'] ? 'uninstall' : 'install';
                $this->tag->addAttribute('class', 'onClickMaskExtensionManager btn btn-default');
-               $this->tag->setContent(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-system-extension-' . $icon));
+
+               /** @var IconFactory $iconFactory */
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+               $this->tag->setContent($iconFactory->getIcon('actions-system-extension-' . $icon, Icon::SIZE_SMALL)->render());
                return $this->tag->render();
        }
 
index 536d0a1..35bc3c3 100644 (file)
@@ -1,4 +1,5 @@
 {namespace em=TYPO3\CMS\Extensionmanager\ViewHelpers}
+{namespace core=TYPO3\CMS\Core\ViewHelpers}
 <f:layout name="main" />
 
 <f:section name="docheader-buttons">
@@ -30,7 +31,7 @@
                                        <f:else>
                                                <li>
                                                        <f:link.action action="installDistribution" controller="Download" arguments="{extension:extension}" class="btn btn-default t3-button-action-installdistribution">
-                                                               <f:be.buttons.icon icon="actions-system-extension-import" /> <f:translate key="extensionList.installDistribution">Install</f:translate>
+                                                               <core:icon identifier="actions-system-extension-import" /><f:translate key="extensionList.installDistribution">Install</f:translate>
                                                        </f:link.action>
                                                </li>
                                        </f:else>
@@ -38,7 +39,7 @@
                                                <f:if condition="{configurationLink}">
                                                        <li>
                                                                <a href="{configurationLink}" class="btn btn-default distribution-openViewModule " onclick="top.goToModule('web_ViewpageView');">
-                                                                       <f:be.buttons.icon icon="actions-system-extension-configure" /><f:translate key="extensionList.configure" />
+                                                                       <core:icon identifier="actions-system-extension-configure" /><f:translate key="extensionList.configure" />
                                                                </a>
                                                        </li>
                                                </f:if>
index 73d89d5..1001c93 100644 (file)
@@ -42,4 +42,4 @@
                        </f:link.action>
                </f:else>
        </f:if>
-</f:section>
+</f:section>
\ No newline at end of file
index 4491752..c16d264 100644 (file)
@@ -1,4 +1,5 @@
 {namespace em=TYPO3\CMS\Extensionmanager\ViewHelpers}
+{namespace core=TYPO3\CMS\Core\ViewHelpers}
 
 <f:layout name="main" />
 
                                                <div class="btn-group">
                                                        <f:if condition="{extension.state} == 'excludeFromUpdates'">
                                                                <f:then>
-                                                                       <span class="btn btn-default disabled">
-                                                                               <f:be.buttons.icon
-                                                                                       icon="actions-system-extension-update"
-                                                                                       title="{f:translate(key:'extensionList.updateDisabled')}"
-                                                                               />
+                                                                       <span class="btn btn-default disabled" title="{f:translate(key:'extensionList.updateDisabled')}">
+                                                                               <core:icon identifier="actions-system-extension-update" />
                                                                        </span>
                                                                </f:then>
                                                                <f:else>
                                                                        <span class="btn btn-default">
-                                                                               <f:be.buttons.icon
-                                                                                       uri="{f:uri.action(action:'updateCommentForUpdatableVersions',controller:'Download',arguments:{extension:extension.key, integerVersionStart: extension.terObject.integerVersion, integerVersionStop: extension.updateToVersion.integerVersion},format:'json')}"
-                                                                                       icon="actions-system-extension-update"
-                                                                                       title="{f:translate(key:'extensionList.updateToVersion', arguments:{0:extension.updateToVersion.version})}"
+                                                                               <f:link.action action="updateCommentForUpdatableVersions"
                                                                                        additionalAttributes="{data-action:'update-extension'}"
-                                                                               />
+                                                                                       format="json" controller="Download"
+                                                                                       arguments="{extension:extension.key, integerVersionStart: extension.terObject.integerVersion, integerVersionStop: extension.updateToVersion.integerVersion}"
+                                                                                       title="{f:translate(key:'extensionList.updateToVersion', arguments:{0:extension.updateToVersion.version})}"
+                                                                               >
+                                                                                       <core:icon identifier="actions-system-extension-update" />
+                                                                               </f:link.action>
                                                                        </span>
                                                                </f:else>
                                                        </f:if>
                                <td>
                                        <div class="btn-group">
                                                <em:processAvailableActions extension="{extension}">
-                                                       <em:configureExtension class="btn btn-default" extension="{extension}"><f:be.buttons.icon icon="actions-system-extension-configure" title="{f:translate(key:'extensionList.configure')}" /></em:configureExtension>
+                                                       <em:configureExtension class="btn btn-default" extension="{extension}" title="{f:translate(key:'extensionList.configure')}">
+                                                               <core:icon identifier="actions-system-extension-configure" />
+                                                       </em:configureExtension>
                                                        <em:updateScript class="btn btn-default" extensionKey="{extension.key}" />
                                                        <em:removeExtension class="btn btn-default" extension="{extension}" />
-                                                       <span class="btn btn-default"><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>
+                                                       <span class="btn btn-default">
+                                                               <f:link.action action="downloadExtensionZip" controller="Action" arguments="{extension:extension.key}" title="{f:translate(key:'extensionList.downloadzip')}">
+                                                                       <core:icon identifier="actions-system-extension-download" />
+                                                               </f:link.action>
+                                                       </span>
                                                        <em:downloadExtensionData class="btn btn-default" extension="{extension}" />
                                                </em:processAvailableActions>
                                        </div>
                </tbody>
        </table>
        </div>
-</f:section>
-
-
+</f:section>
\ No newline at end of file
index 6026c9c..198c052 100644 (file)
@@ -1,7 +1,9 @@
+{namespace core=TYPO3\CMS\Core\ViewHelpers}
+
 <div style="display:none">
-       <span class="activateIcon"><span class="btn btn-default"><f:be.buttons.icon icon="actions-system-extension-install" title="{f:translate(key:'button.activate')}" /></span></span>
-       <span class="deactivateIcon"><span class="btn btn-default"><f:be.buttons.icon icon="actions-system-extension-uninstall" title="{f:translate(key:'button.deactivate')}" /></span></span>
-       <span class="downloadIcon"><span class="btn btn-default"><f:be.buttons.icon icon="actions-system-extension-download" title="{f:translate(key:'button.download')}" /></span></span>
+       <span class="activateIcon"><span class="btn btn-default" title="{f:translate(key:'button.activate')}"><core:icon identifier="actions-system-extension-install" /></span></span>
+       <span class="deactivateIcon"><span class="btn btn-default" title="{f:translate(key:'button.deactivate')}"><core:icon identifier="actions-system-extension-uninstall" /></span></span>
+       <span class="downloadIcon"><span class="btn btn-default" title="{f:translate(key:'button.download')}"><core:icon identifier="actions-system-extension-download" /></span></span>
        <span class="completeIcon"><span class="t3-icon fa fa-check" title="{f:translate(key:'button.complete')}">&nbsp;</span></span>
        <span class="loadingIcon"><span class="t3-icon fa fa-spin fa-circle-o-notch" title="{f:translate(key:'button.loading')}">&nbsp;</span></span>
        <div class="progressBar">
@@ -9,5 +11,4 @@
                        <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div>
                </div>
        </div>
-</div>
-
+</div>
\ No newline at end of file
index 6f3adaa..a3b7636 100644 (file)
@@ -1,3 +1,4 @@
+{namespace core=TYPO3\CMS\Core\ViewHelpers}
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en"
@@ -6,9 +7,8 @@
 
 <f:section name="iconButtons">
        <div class="menuItems">
-               <span class="menuItem updateItem" data-action="updateActiveLanguages">
-                       <f:be.buttons.icon icon="actions-system-extension-download"
-                                                          title="{f:translate(key:'button.downloadAll')}"/>
+               <span class="menuItem updateItem" data-action="updateActiveLanguages" title="{f:translate(key:'button.downloadAll')}">
+                       <core:icon identifier="actions-system-extension-download" />
                </span>
                <span class="menuItem loadingItem">
                        <span title="" class="t3-icon fa fa-spin fa-circle-o-notch">&nbsp;</span>