Commit 11869504 authored by Michael Oehlhof's avatar Michael Oehlhof Committed by Nicole Cordes
Browse files

[TASK] Replace icon by IconFactory: status-warning-in-use

Resolves: #69696
Releases: master
Change-Id: I34ad88ae8713e07b7a084b3ba3646b61176c0c1f
Reviewed-on: http://review.typo3.org/43228

Reviewed-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Jan Helke's avatarJan Helke <typo3@helke.de>
Reviewed-by: Nicole Cordes's avatarNicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes's avatarNicole Cordes <typo3@cordes.co>
parent 3a7dce5b
......@@ -662,7 +662,7 @@ class InlineRecordContainer extends AbstractContainer {
if ($lockInfo = BackendUtility::isRecordLocked($foreign_table, $rec['uid'])) {
$cells['locked'] = '
<a class="btn btn-default" href="#" onclick="alert(' . GeneralUtility::quoteJSvalue($lockInfo['msg']) . ');return false;">
' . IconUtility::getSpriteIcon('status-warning-in-use', array('title' => $lockInfo['msg'])) . '
' . '<span title="' . htmlspecialchars($lockInfo['msg']) . '">' . $this->iconFactory->getIcon('status-warning-in-use', Icon::SIZE_SMALL) . '</span>' . '
</a>';
}
// Hook: Post-processing of single controls for specific child records:
......
......@@ -329,9 +329,7 @@ class Commands {
$lockInfo = BackendUtility::isRecordLocked('pages', $record['uid']);
if (is_array($lockInfo)) {
$qtip .= '<br />' . htmlspecialchars($lockInfo['msg']);
$prefix .= IconUtility::getSpriteIcon('status-warning-in-use', array(
'class' => 'typo3-pagetree-status'
));
$prefix .= '<span class="typo3-pagetree-status">' . $iconFactory->getIcon('status-warning-in-use', Icon::SIZE_SMALL) . '</span>';
}
// Call stats information hook
$stat = '';
......
......@@ -1288,7 +1288,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
if ($lockInfo = BackendUtility::isRecordLocked('tt_content', $row['uid'])) {
$additionalIcons[] = '<a href="#" onclick="alert(' . GeneralUtility::quoteJSvalue($lockInfo['msg'])
. ');return false;" title="' . htmlspecialchars($lockInfo['msg']) . '">'
. IconUtility::getSpriteIcon('status-warning-in-use') . '</a>';
. $this->iconFactory->getIcon('status-warning-in-use', Icon::SIZE_SMALL) . '</a>';
}
// Call stats information hook
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'])) {
......
......@@ -16,7 +16,8 @@ namespace TYPO3\CMS\Backend\View;
use TYPO3\CMS\Backend\Tree\View\BrowseTreeView;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Backend\Utility\IconUtility;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
......@@ -71,10 +72,13 @@ class PageTreeView extends BrowseTreeView {
* @return string Page icon
*/
public function wrapIcon($thePageIcon, &$row) {
/** @var $iconFactory IconFactory */
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);;
// If the record is locked, present a warning sign.
if ($lockInfo = BackendUtility::isRecordLocked('pages', $row['uid'])) {
$aOnClick = 'alert(' . GeneralUtility::quoteJSvalue($lockInfo['msg']) . ');return false;';
$lockIcon = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">' . IconUtility::getSpriteIcon('status-warning-in-use', array('title' => $lockInfo['msg'])) . '</a>';
$lockIcon = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">'
. '<span title="' . htmlspecialchars($lockInfo['msg']) . '">' . $iconFactory->getIcon('status-warning-in-use', Icon::SIZE_SMALL) . '</span></a>';
} else {
$lockIcon = '';
}
......
......@@ -774,6 +774,12 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
'source' => 'EXT:t3skin/images/icons/status/warning-lock.png',
)
),
'status-warning-in-use' => array(
'provider' => BitmapIconProvider::class,
'options' => array(
'source' => 'EXT:t3skin/images/icons/status/warning-in-use.png',
)
),
'status-status-permission-granted' => array(
'provider' => FontawesomeIconProvider::class,
'options' => array(
......
......@@ -758,7 +758,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList {
$warning = '<a href="#" onclick="alert('
. GeneralUtility::quoteJSvalue($lockInfo['msg']) . '); return false;" title="'
. htmlspecialchars($lockInfo['msg']) . '">'
. IconUtility::getSpriteIcon('status-warning-in-use') . '</a>';
. $this->iconFactory->getIcon('status-warning-in-use', Icon::SIZE_SMALL) . '</a>';
}
$theData[$fCol] = $theData['__label'] = $warning . $this->linkWrapItems($table, $row['uid'], $recTitle, $row);
// Render thumbnails, if:
......
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