Commit 4e31e612 authored by Wouter Wolters's avatar Wouter Wolters Committed by Markus Klein
Browse files

[TASK] Replace sprite icon "actions-system-extension-*" with the new IconFactory

Resolves: #69445
Releases: master
Change-Id: I0061a8eef57f60479f0dc51b82bac3d1b5afcfca
Reviewed-on: http://review.typo3.org/42949

Reviewed-by: default avatarDaniel Goerz <ervaude@gmail.com>
Tested-by: default avatarDaniel Goerz <ervaude@gmail.com>
Reviewed-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
parent 5231d25a
......@@ -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(
......
{namespace core=TYPO3\CMS\Core\ViewHelpers}
<f:layout name="Default"/>
<f:section name="module-headline">
......@@ -35,10 +37,14 @@
<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>
......@@ -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();
}
......
......@@ -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();
}
......
......@@ -57,4 +57,4 @@
</f:if>
</div>
</div>
</div>
</div>
\ No newline at end of file
{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>
......
......@@ -42,4 +42,4 @@
</f:link.action>
</f:else>
</f:if>
</f:section>
</f:section>
\ No newline at end of file
{namespace em=TYPO3\CMS\Extensionmanager\ViewHelpers}
{namespace core=TYPO3\CMS\Core\ViewHelpers}
<f:layout name="main" />
......@@ -50,21 +51,20 @@
<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>
......@@ -99,10 +99,16 @@
<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>
......@@ -112,6 +118,4 @@
</tbody>
</table>
</div>
</f:section>
</f:section>
\ No newline at end of file
{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
{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>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment