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