Commit a4180e00 authored by Frank Nägler's avatar Frank Nägler Committed by Christian Kuhn
Browse files

[TASK] Remove SpriteManagerIconViewHelper

This patch removes the SpriteManagerIconViewHelper and all
usages within the core.

Resolves: #69531
Releases: master
Change-Id: I75e3c345973a9b51fb26cc1aeb305536e8c77d14
Reviewed-on: http://review.typo3.org/43019

Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 039143d3
......@@ -134,6 +134,21 @@
.icon-actions-edit-copy-release,
.icon-actions-edit-cut-release,
.icon-overlay-read-only,
.icon-status-status-current {
.icon-status-status-current,
.icon-status-dialog-error,
.icon-status-status-permission-denied {
color: @brand-danger;
}
.icon-status-dialog-ok,
.icon-status-status-permission-granted {
color: @brand-success;
}
.icon-status-dialog-notification {
color: @brand-notice;
}
.icon-status-dialog-warning {
color: @brand-warning;
}
......@@ -778,7 +778,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface {
// @todo: hardcoded width as we don't have a way to address module icons with an API yet.
$icon = '<img src="' . htmlspecialchars($icon) . '" alt="' . $titleAttribute . '" width="16">';
} else {
$icon = IconUtility::getSpriteIcon('empty-empty', array('title' => $titleAttribute));
$icon = '<span title="' . $titleAttribute . '">' . $this->iconFactory->getIcon('empty-empty', Icon::SIZE_SMALL)->render() . '</span>';
}
}
return $icon;
......
......@@ -493,8 +493,8 @@ class InlineRecordContainer extends AbstractContainer {
$table = $foreign_table;
}
$cells['info'] = '
<a class="btn btn-default" href="#" onclick="' . htmlspecialchars(('top.launchView(' . GeneralUtility::quoteJSvalue($table) . ', ' . GeneralUtility::quoteJSvalue($uid) . '); return false;')) . '">
' . IconUtility::getSpriteIcon('status-dialog-information', array('title' => $languageService->sL('LLL:EXT:lang/locallang_mod_web_list.xlf:showInfo', TRUE))) . '
<a class="btn btn-default" href="#" onclick="' . htmlspecialchars(('top.launchView(' . GeneralUtility::quoteJSvalue($table) . ', ' . GeneralUtility::quoteJSvalue($uid) . '); return false;')) . '" title="' . $languageService->sL('LLL:EXT:lang/locallang_mod_web_list.xlf:showInfo', TRUE) . '">
' . $this->iconFactory->getIcon('actions-document-info', Icon::SIZE_SMALL)->render() . '
</a>';
}
// If the table is NOT a read-only table, then show these links:
......@@ -508,8 +508,8 @@ class InlineRecordContainer extends AbstractContainer {
$style = ' style="' . $config['inline']['inlineNewButtonStyle'] . '"';
}
$cells['new'] = '
<a class="btn btn-default inlineNewButton ' . $this->inlineData['config'][$nameObject]['md5'] . '" href="#" onclick="' . htmlspecialchars($onClick) . '"' . $style . '>
' . IconUtility::getSpriteIcon(('actions-' . ($isPagesTable ? 'page' : 'document') . '-new'), array('title' => $languageService->sL(('LLL:EXT:lang/locallang_mod_web_list.xlf:new' . ($isPagesTable ? 'Page' : 'Record')), TRUE))) . '
<a class="btn btn-default inlineNewButton ' . $this->inlineData['config'][$nameObject]['md5'] . '" href="#" onclick="' . htmlspecialchars($onClick) . '" title="' . $languageService->sL(('LLL:EXT:lang/locallang_mod_web_list.xlf:new' . ($isPagesTable ? 'Page' : 'Record')), TRUE) . '" ' . $style . '>
' . $this->iconFactory->getIcon('actions-' . ($isPagesTable ? 'page' : 'document') . '-new', Icon::SIZE_SMALL)->render() . '
</a>';
}
}
......
......@@ -151,7 +151,7 @@ class SelectCheckBoxElement extends AbstractFormElement {
'checked' => $checked,
'disabled' => $disabled,
'class' => '',
'icon' => (!empty($p[2]) ? FormEngineUtility::getIconHtml($p[2]) : IconUtility::getSpriteIcon('empty-empty')),
'icon' => (!empty($p[2]) ? FormEngineUtility::getIconHtml($p[2]) : $this->iconFactory->getIcon('empty-empty', Icon::SIZE_SMALL)->render()),
'title' => htmlspecialchars($p[0], ENT_COMPAT, 'UTF-8', FALSE),
'help' => $help
);
......
......@@ -16,6 +16,7 @@ namespace TYPO3\CMS\Backend\RecordList;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Backend\Utility\IconUtility;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Recordlist\Browser\ElementBrowser;
use TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList;
......@@ -110,10 +111,10 @@ class ElementBrowserRecordList extends DatabaseRecordList {
$title = BackendUtility::getRecordTitle($table, $row, FALSE, TRUE);
$ficon = IconUtility::getSpriteIconForRecord($table, $row);
$aOnClick = 'return insertElement(' . GeneralUtility::quoteJSvalue($table) . ', ' . GeneralUtility::quoteJSvalue($row['uid']) . ', \'db\', ' . GeneralUtility::quoteJSvalue($title) . ', \'\', \'\', ' . GeneralUtility::quoteJSvalue($ficon) . ');';
$ATag = '<a href="#" onclick="' . $aOnClick . '">';
$ATag = '<a href="#" onclick="' . $aOnClick . '" title="' . $this->getLanguageService()->getLL('addToList', TRUE) . '">';
$ATag_alt = substr($ATag, 0, -4) . ',\'\',1);">';
$ATag_e = '</a>';
return $ATag . IconUtility::getSpriteIcon('actions-edit-add', array('title' => $this->getLanguageService()->getLL('addToList', TRUE))) . $ATag_e . $ATag_alt . $code . $ATag_e;
return $ATag . $this->iconFactory->getIcon('actions-edit-add', Icon::SIZE_SMALL) . $ATag_e . $ATag_alt . $code . $ATag_e;
}
/**
......
......@@ -1287,7 +1287,7 @@ function jumpToUrl(URL) {
// Do nothing
}
if ($icon) {
return IconUtility::getSpriteIcon($icon);
return $this->iconFactory->getIcon($icon, Icon::SIZE_SMALL)->render();
}
}
......
......@@ -1226,7 +1226,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
. '][' . $hiddenField . ']=' . $value;
$out .= '<a class="btn btn-default" href="' . htmlspecialchars($this->getPageLayoutController()->doc->issueCommand($params))
. '" title="' . $this->getLanguageService()->getLL($label, TRUE) . '">'
. IconUtility::getSpriteIcon('actions-edit-' . strtolower($label)) . '</a>';
. $this->iconFactory->getIcon('actions-edit-' . strtolower($label), Icon::SIZE_SMALL) . '</a>';
}
// Delete
$params = '&cmd[tt_content][' . $row['uid'] . '][delete]=1';
......@@ -1258,7 +1258,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
$displayMoveButtons = TRUE;
}
} else {
$moveButtonContent .= '<span class="btn btn-default disabled">' . IconUtility::getSpriteIcon('empty-empty') . '</span>';
$moveButtonContent .= '<span class="btn btn-default disabled">' . $this->iconFactory->getIcon('empty-empty', Icon::SIZE_SMALL)->render() . '</span>';
}
// Move element down:
if ($this->tt_contentData['next'][$row['uid']]) {
......@@ -1271,7 +1271,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
$displayMoveButtons = TRUE;
}
} else {
$moveButtonContent .= '<span class="btn btn-default disabled">' . IconUtility::getSpriteIcon('empty-empty') . '</span>';
$moveButtonContent .= '<span class="btn btn-default disabled">' . $this->iconFactory->getIcon('empty-empty', Icon::SIZE_SMALL)->render() . '</span>';
}
if ($displayMoveButtons) {
$out .= '<div class="btn-group btn-group-sm" role="group">' . $moveButtonContent . '</div>';
......
<?php
namespace TYPO3\CMS\Backend\ViewHelpers;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Backend\Utility\IconUtility;
use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
/**
* Displays sprite icon identified by iconName key
* @internal
*/
class SpriteManagerIconViewHelper extends AbstractViewHelper implements CompilableInterface {
/**
* Prints sprite icon html for $iconName key
*
* @param string $iconName
* @param array $options
* @return string
*/
public function render($iconName, $options = array()) {
return static::renderStatic(
array(
'iconName' => $iconName,
'options' => $options
),
$this->buildRenderChildrenClosure(),
$this->renderingContext
);
}
/**
* Print sprite icon html for $iconName key
*
* @param array $arguments
* @param \Closure $renderChildrenClosure
* @param RenderingContextInterface $renderingContext
* @return string
*/
static public function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) {
$iconName = $arguments['iconName'];
$options = $arguments['options'];
return IconUtility::getSpriteIcon($iconName, $options);
}
}
{namespace be = TYPO3\CMS\Backend\ViewHelpers}
{namespace core = TYPO3\CMS\Core\ViewHelpers}
<f:switch expression="{item.stateIcon}">
<f:case value="-1"><be:spriteManagerIcon iconName="status-dialog-ok" /></f:case>
<f:case value="1"><be:spriteManagerIcon iconName="status-dialog-notification" /></f:case>
<f:case value="2"><be:spriteManagerIcon iconName="status-dialog-warning" /></f:case>
<f:case value="3"><be:spriteManagerIcon iconName="status-dialog-error" /></f:case>
<f:case value="-1"><core:icon identifier="status-dialog-ok" /></f:case>
<f:case value="1"><core:icon identifier="status-dialog-notification" /></f:case>
<f:case value="2"><core:icon identifier="status-dialog-warning" /></f:case>
<f:case value="3"><core:icon identifier="status-dialog-error" /></f:case>
</f:switch>
......@@ -65,7 +65,7 @@ class RemoveUserViewHelper extends AbstractViewHelper implements CompilableInter
/** @var IconFactory $iconFactory */
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
if ($backendUser->getUid() === (int)$beUser->user['uid']) {
return '<span class="btn btn-default disabled">' . IconUtility::getSpriteIcon('empty-empty') . '</span>';
return '<span class="btn btn-default disabled">' . $iconFactory->getIcon('empty-empty', Icon::SIZE_SMALL)->render() . '</span>';
}
$urlParameters = [
......
......@@ -16,6 +16,8 @@ namespace TYPO3\CMS\Beuser\ViewHelpers;
use TYPO3\CMS\Backend\Utility\IconUtility;
use TYPO3\CMS\Beuser\Domain\Model\BackendUser;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
......@@ -54,7 +56,8 @@ class SwitchUserViewHelper extends AbstractViewHelper implements CompilableInter
$backendUser = $arguments['backendUser'];
if ($backendUser->getUid() == $GLOBALS['BE_USER']->user['uid'] || !$backendUser->isActive()) {
return '<span class="btn btn-default disabled">' . IconUtility::getSpriteIcon('empty-empty') . '</span>';
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
return '<span class="btn btn-default disabled">' . $iconFactory->getIcon('empty-empty', Icon::SIZE_SMALL)->render() . '</span>';
}
$title = LocalizationUtility::translate('switchBackMode', 'beuser');
return '<a class="btn btn-default" href="' .
......
......@@ -29,21 +29,21 @@
</f:if>
</td>
<td class="col-control">
<f:link.action action="addToCompareList" arguments="{uid: backendUser.uid}" class="btn btn-default"><be:spriteManagerIcon iconName="actions-edit-add"/> <f:translate key="compare" /></f:link.action>
<f:link.action action="addToCompareList" arguments="{uid: backendUser.uid}" class="btn btn-default"><core:icon identifier="actions-edit-add" size="small"/> <f:translate key="compare" /></f:link.action>
<div class="btn-group" role="group">
<a class="btn btn-default" href="#" onclick="top.launchView('be_users', '{backendUser.uid}'); return false;"><core:icon identifier="actions-document-info" size="small"/></a>
<a class="btn btn-default" href="{bu:editRecord(parameters: 'edit[be_users][{backendUser.uid}]=edit&returnUrl={returnUrl}')}"><core:icon identifier="actions-document-open" size="small"/></a>
<a class="btn btn-default" href="#" onclick="top.launchView('be_users', '{backendUser.uid}'); return false;"><core:icon identifier="actions-document-info" /></a>
<a class="btn btn-default" href="{bu:editRecord(parameters: 'edit[be_users][{backendUser.uid}]=edit&returnUrl={returnUrl}')}"><core:icon identifier="actions-document-open" /></a>
<f:if condition="{backendUser.currentlyLoggedIn} == 1">
<f:then>
<span class="btn btn-default disabled"><be:spriteManagerIcon iconName="empty-empty" /></span>
<span class="btn btn-default disabled"><core:icon identifier="empty-empty" /></span>
</f:then>
<f:else>
<f:if condition="{backendUser.isDisabled} == 1">
<f:then>
<a class="btn btn-default" href="{bu:issueCommand(parameters: 'data[be_users][{backendUser.uid}][disable]=0', redirectUrl: redirectUrl)}" title="{f:translate(key:'visibility.unhide')}"><core:icon identifier="actions-edit-unhide" size="small"/></a>
<a class="btn btn-default" href="{bu:issueCommand(parameters: 'data[be_users][{backendUser.uid}][disable]=0', redirectUrl: redirectUrl)}" title="{f:translate(key:'visibility.unhide')}"><core:icon identifier="actions-edit-unhide" /></a>
</f:then>
<f:else>
<a class="btn btn-default" href="{bu:issueCommand(parameters: 'data[be_users][{backendUser.uid}][disable]=1', redirectUrl: redirectUrl)}" title="{f:translate(key:'visibility.hide')}"><core:icon identifier="actions-edit-hide" size="small"/></a>
<a class="btn btn-default" href="{bu:issueCommand(parameters: 'data[be_users][{backendUser.uid}][disable]=1', redirectUrl: redirectUrl)}" title="{f:translate(key:'visibility.hide')}"><core:icon identifier="actions-edit-hide" /></a>
</f:else>
</f:if>
</f:else>
......
......@@ -37,13 +37,13 @@
arguments="{backendUser: onlineUser.backendUser, sessionId: session.id}"
data="{severity: 'warning', title: '{f:translate(key: \'endSession\')}', content: '{f:translate(key: \'reallyLogout\')} {onlineUser.backendUser.userName}?', button-close-text: '{f:translate(key: \'LLL:EXT:lang/locallang_common.xlf:cancel\')}'}"
>
<core:icon identifier="actions-document-close" size="small"/>
<core:icon identifier="actions-document-close" />
<f:translate key="endSession" />
</f:link.action>
</f:else>
</f:if>
<a class="btn btn-default" href="#" onclick="top.launchView('be_users', '{onlineUser.backendUser.uid}',''); return false;">
<core:icon identifier="actions-document-info" size="small"/>
<core:icon identifier="actions-document-info" />
</a>
</div>
</td>
......
{namespace be = TYPO3\CMS\Backend\ViewHelpers}
{namespace bu = TYPO3\CMS\Beuser\ViewHelpers}
{namespace core = TYPO3\CMS\Core\ViewHelpers}
......@@ -25,14 +24,14 @@
</td>
<td class="col-control">
<div class="btn-group" role="group">
<a class="btn btn-default" href="#" onclick="top.launchView('be_groups', '{backendUserGroup.uid}'); return false;"><core:icon identifier="actions-document-info" size="small"/></a>
<a class="btn btn-default" href="{bu:editRecord(parameters: 'edit[be_groups][{backendUserGroup.uid}]=edit&returnUrl={returnUrl}')}"><core:icon identifier="actions-document-open" size="small"/></a>
<a class="btn btn-default" href="#" onclick="top.launchView('be_groups', '{backendUserGroup.uid}'); return false;"><core:icon identifier="actions-document-info" /></a>
<a class="btn btn-default" href="{bu:editRecord(parameters: 'edit[be_groups][{backendUserGroup.uid}]=edit&returnUrl={returnUrl}')}"><core:icon identifier="actions-document-open" /></a>
<f:if condition="{backendUserGroup.hidden}">
<f:then>
<a class="btn btn-default" href="{bu:issueCommand(parameters: 'data[be_groups][{backendUserGroup.uid}][hidden]=0', redirectUrl: redirectUrl)}" title="{f:translate(key:'visibility.unhide')}"><core:icon identifier="actions-edit-unhide" size="small"/></a>
<a class="btn btn-default" href="{bu:issueCommand(parameters: 'data[be_groups][{backendUserGroup.uid}][hidden]=0', redirectUrl: redirectUrl)}" title="{f:translate(key:'visibility.unhide')}"><core:icon identifier="actions-edit-unhide" /></a>
</f:then>
<f:else>
<a class="btn btn-default" href="{bu:issueCommand(parameters: 'data[be_groups][{backendUserGroup.uid}][hidden]=1', redirectUrl: redirectUrl)}" title="{f:translate(key:'visibility.hide')}"><core:icon identifier="actions-edit-hide" size="small"/></a>
<a class="btn btn-default" href="{bu:issueCommand(parameters: 'data[be_groups][{backendUserGroup.uid}][hidden]=1', redirectUrl: redirectUrl)}" title="{f:translate(key:'visibility.hide')}"><core:icon identifier="actions-edit-hide" /></a>
</f:else>
</f:if>
</div>
......
......@@ -5,7 +5,7 @@
<f:layout name="Default" />
<f:section name="iconButtons">
<f:link.action action="index"><be:spriteManagerIcon iconName="actions-view-go-back" /></f:link.action>
<f:link.action action="index"><core:icon identifier="actions-view-go-back" /></f:link.action>
</f:section>
<f:section name="headline">
......@@ -68,12 +68,12 @@
<f:if condition="{compareUser.isDisabled} == 1">
<f:then>
<a class="btn btn-default" href="{bu:issueCommand(parameters: 'data[be_users][{compareUser.uid}][disable]=0', redirectUrl: redirectUrl)}" title="{f:translate(key: 'visibility.unhide')}">
<core:icon identifier="actions-edit-unhide" size="small"/>
<core:icon identifier="actions-edit-unhide" />
</a>
</f:then>
<f:else>
<a class="btn btn-default" href="{bu:issueCommand(parameters: 'data[be_users][{compareUser.uid}][disable]=1', redirectUrl: redirectUrl)}" title="{f:translate(key: 'visibility.hide')}">
<core:icon identifier="actions-edit-hide" size="small"/>
<core:icon identifier="actions-edit-hide" />
</a>
</f:else>
</f:if>
......
......@@ -34,7 +34,7 @@
</td>
<td>
<f:link.action action="removeFromCompareList" arguments="{uid: compareUser.uid}" class="pull-right">
<be:spriteManagerIcon iconName="actions-selection-delete" />
<core:icon identifier="actions-selection-delete" />
</f:link.action>
</td>
</tr>
......
......@@ -6,7 +6,7 @@
<f:section name="iconButtons">
<a href="#" onclick="{previewUrl}" title="{f:translate(key: 'LLL:EXT:lang/locallang_core.xlf:labels.showPage')}">
<core:icon identifier="actions-document-view" size="small" />
<core:icon identifier="actions-document-view" />
</a>
</f:section>
......@@ -65,7 +65,7 @@
arguments="{id: data.row._ORIG_uid, depth: depth}"
title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:ch_permissions')}"
>
<core:icon identifier="actions-document-open" size="small"/>
<core:icon identifier="actions-document-open" />
</f:link.action>
</f:then>
<f:else>
......@@ -74,7 +74,7 @@
arguments="{id: data.row.uid, depth: depth}"
title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:ch_permissions')}"
>
<core:icon identifier="actions-document-open" size="small"/>
<core:icon identifier="actions-document-open" />
</f:link.action>
</f:else>
</f:if>
......@@ -118,7 +118,7 @@
data-lockstate="1"
title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:EditLock_descr')}"
>
<be:spriteManagerIcon iconName="status-warning-lock" />
<core:icon identifier="status-warning-lock" />
</a>
</f:then>
<f:else>
......@@ -199,11 +199,11 @@
<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"><be:spriteManagerIcon iconName="status-status-permission-granted" options="{class:'text-success'}" /></td>
<td nowrap="nowrap"><be:spriteManagerIcon iconName="status-status-permission-denied" options="{class:'text-danger'}" /></td>
<td nowrap="nowrap"><be:spriteManagerIcon iconName="status-status-permission-granted" options="{class:'text-success'}" /></td>
<td nowrap="nowrap"><be:spriteManagerIcon iconName="status-status-permission-denied" options="{class:'text-danger'}" /></td>
<td nowrap="nowrap"><be:spriteManagerIcon iconName="status-status-permission-denied" options="{class:'text-danger'}" /></td>
<td nowrap="nowrap"><core:icon identifier="status-status-permission-granted" /></td>
<td nowrap="nowrap"><core:icon identifier="status-status-permission-denied" /></td>
<td nowrap="nowrap"><core:icon identifier="status-status-permission-granted" /></td>
<td nowrap="nowrap"><core:icon identifier="status-status-permission-denied" /></td>
<td nowrap="nowrap"><core:icon identifier="status-status-permission-denied" /></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>
......@@ -211,7 +211,7 @@
</div>
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:def" /></p>
<p>
<be: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/>
<be: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" />
<core:icon identifier="status-status-permission-granted" /> <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:A_Granted" /><br/>
<core:icon identifier="status-status-permission-denied" /> <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:A_Denied" />
</p>
</f:section>
......@@ -549,7 +549,8 @@ class QueryView {
$params = '&edit[' . $table . '][' . $row['uid'] . ']=edit';
$out .= '<td><div class="btn-group">';
if (!$row['deleted']) {
$out .= '<a class="btn btn-default" href="#" onClick="top.launchView(\'' . $table . '\',' . $row['uid'] . ',\'' . $GLOBALS['BACK_PATH'] . '\');return false;">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('status-dialog-information') . '</a>';
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$out .= '<a class="btn btn-default" href="#" onClick="top.launchView(\'' . $table . '\',' . $row['uid'] . ',\'' . $GLOBALS['BACK_PATH'] . '\');return false;">' . $iconFactory->getIcon('actions-document-info', Icon::SIZE_SMALL)->render() . '</a>';
$out .= '<a class="btn btn-default" href="#" onClick="' . htmlspecialchars(BackendUtility::editOnClick($params, '', GeneralUtility::getIndpEnv('REQUEST_URI') . GeneralUtility::implodeArrayForUrl('SET', (array)GeneralUtility::_POST('SET')))) . '">' . $iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</a>';
} else {
$out .= '<a class="btn btn-default" href="' . GeneralUtility::linkThisUrl(BackendUtility::getModuleUrl('tce_db'), array(
......
......@@ -226,6 +226,12 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
'name' => 'download',
)
),
'actions-edit-add' => array(
'provider' => FontawesomeIconProvider::class,
'options' => array(
'name' => 'plus-circle',
)
),
'actions-edit-delete' => array(
'provider' => FontawesomeIconProvider::class,
'options' => array(
......@@ -385,7 +391,7 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
'actions-selection-delete' => array(
'provider' => FontawesomeIconProvider::class,
'options' => array(
'name' => 'remove',
'name' => 'trash',
)
),
'actions-system-cache-clear-impact-low' => array(
......@@ -533,10 +539,11 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
)
),
'mimetypes-word' => array(
// specials
'empty-empty' => array(
'provider' => FontawesomeIconProvider::class,
'options' => array(
'name' => 'file-word-o',
'name' => 'empty-empty',
)
),
......@@ -547,6 +554,48 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
'name' => 'caret-right',
)
),
'status-dialog-ok' => array(
'provider' => FontawesomeIconProvider::class,
'options' => array(
'name' => 'check-circle',
)
),
'status-dialog-notification' => array(
'provider' => FontawesomeIconProvider::class,
'options' => array(
'name' => 'exclamation-circle',
)
),
'status-dialog-warning' => array(
'provider' => FontawesomeIconProvider::class,
'options' => array(
'name' => 'exclamation-triangle',
)
),
'status-dialog-error' => array(
'provider' => FontawesomeIconProvider::class,
'options' => array(
'name' => 'exclamation-circle',
)
),
'status-warning-lock' => array(
'provider' => BitmapIconProvider::class,
'options' => array(
'source' => 'EXT:t3skin/images/icons/status/warning-lock.png',
)
),
'status-status-permission-granted' => array(
'provider' => FontawesomeIconProvider::class,
'options' => array(
'name' => 'check',
)
),
'status-status-permission-denied' => array(
'provider' => FontawesomeIconProvider::class,
'options' => array(
'name' => 'times',
)
),
// Mimetypes
'mimetypes-text-html' => array(
......@@ -555,6 +604,12 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
'name' => 'file-text-o',
)
),
'mimetypes-word' => array(
'provider' => FontawesomeIconProvider::class,
'options' => array(
'name' => 'file-word-o',
)
),
// Overlays
'overlay-read-only' => array(
......
......@@ -13,7 +13,9 @@ namespace TYPO3\CMS\Core\TimeTracker;
*
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Backend\Utility\IconUtility;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
* Frontend Timetracking functions
......@@ -188,7 +190,8 @@ class TimeTracker {
if (strlen($content) > 30) {
$placeholder = '<br /><span style="width: 300px; height: 1px; display: inline-block;"></span>';
}
$this->tsStackLog[$k]['message'][] = IconUtility::getSpriteIcon($this->wrapIcon[$num]) . $this->wrapError[$num][0] . htmlspecialchars($content) . $this->wrapError[$num][1] . $placeholder;
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$this->tsStackLog[$k]['message'][] = $iconFactory->getIcon($this->wrapIcon[$num], Icon::SIZE_SMALL) . $this->wrapError[$num][0] . htmlspecialchars($content) . $this->wrapError[$num][1] . $placeholder;
}
/**
......@@ -327,7 +330,7 @@ class TimeTracker {
if (!$flag_tree && $data['stackPointer']) {
$temp = array();
foreach ($data['tsStack'] as $k => $v) {
$temp[] = \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs(implode($v, $k ? '.' : '/'), -$keyLgd);
$temp[] = GeneralUtility::fixed_lgd_cs(implode($v, $k ? '.' : '/'), -$keyLgd);
}
array_pop($temp);
$temp = array_reverse($temp);
......@@ -337,12 +340,12 @@ class TimeTracker {
}
}
if ($flag_tree) {
$tmp = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('.', $data['key'], TRUE);
$tmp = GeneralUtility::trimExplode('.', $data['key'], TRUE);
$theLabel = end($tmp);
} else {
$theLabel = $data['key'];
}
$theLabel = \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($theLabel, -$keyLgd);
$theLabel = GeneralUtility::fixed_lgd_cs($theLabel, -$keyLgd);
$theLabel = $data['stackPointer'] ? '<span class="stackPointer">' . $theLabel . '</span>' : $theLabel;
$keyLabel = $theLabel . $keyLabel;
$item .= '<td class="' . $logRowClass . '">' . ($flag_tree ? $data['icons'] : '') . $this->fw($keyLabel) . '</td>';
......@@ -462,7 +465,7 @@ class TimeTracker {
protected function fixCLen($c, $v) {
$len = $v == 'FILE' ? $this->printConf['contentLength_FILE'] : $this->printConf['contentLength'];
if (strlen($c) > $len) {
$c = '<span style="color:green;">' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($c, $len)) . '</span>';
$c = '<span style="color:green;">' . htmlspecialchars(GeneralUtility::fixed_lgd_cs($c, $len)) . '</span>';
} else {
$c = htmlspecialchars($c);
}
......