Commit f4de6926 authored by Patricia Tiedemann's avatar Patricia Tiedemann Committed by Andreas Fernandez
Browse files

[TASK] Render backend icon list by existing files

Until now all of the backend icons were a manually edited array of file
paths. With this patch defined icon folders in the core are scanned
for existing icon files and build most of that static array
automatically.

For historic reason (and hopefully soon to be removed alltogether) a
second array of statically declared icons is added and merged into.

Some icons that were in the original static list but whose files
actually are missing or misnamed are marked as deprecated.

Resolves: #82348
Releases: master
Change-Id: I8dc4fbbe815d923eda55e1c1b072369e62f66d87
Reviewed-on: https://review.typo3.org/54020

Reviewed-by: Benjamin Kott's avatarBenjamin Kott <benjamin.kott@outlook.com>
Tested-by: Benjamin Kott's avatarBenjamin Kott <benjamin.kott@outlook.com>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
parent a9f7ec32
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M3 3h10v2H3V3z" fill="#fff"/><path d="M15 0h-5v1h5v6H1V1h1V0H0v8h16V0h-1zm-2 2H2v4h12V2h-1zm0 3H3V3h10v2z" fill="#fff"/><path d="M3 0h6v1H3V0zm7.5 11.5h-2v-2h-1v2h-2v1h2v2h1v-2h2v-1z" fill="#fff"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M3 3h10v2H3V3z" fill="#fff"/><path d="M15 0h-5v1h5v14H1V1h1V0H0v16h16V0h-1zm-2 2H2v4h12V2h-1zm0 3H3V3h10v2z" fill="#fff"/><path d="M3 0h6v1H3V0zm7.5 9.8h-2v-2h-1v2h-2v1h2v2h1v-2h2v-1z" fill="#fff"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M4.3 16h7.5V8.5H4.3V16zm1-6.4h5.4V15H5.3V9.6zM4.3 0v7.5h7.5V0H4.3zm6.4 6.4H5.3V1.1h5.4v5.3z" fill="#9a9999"/><path d="M7.3 12.9l-.9-.9-.5.5 1.4 1.4.5-.5 2.3-2.3-.5-.5-2.3 2.3zm.5-8l2.3-2.3-.5-.5-2.3 2.3-.9-.9-.5.5 1.4 1.4.5-.5z" fill="#676767"/><path d="M5.3 14.9h5.4V9.6H5.3v5.3zM6.4 12l.9.9 2.3-2.3.5.5-2.3 2.3-.5.5-1.4-1.4.5-.5zM5.3 1.1v5.4h5.4V1.1H5.3zm2.5 3.8l-.5.5L5.9 4l.5-.5.9.9 2.3-2.3.5.5-2.3 2.3z" fill="#fff"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M4.3 16h7.5V8.5H4.3V16zm1-6.4h5.4V15H5.3V9.6zM4.3 0v7.5h7.5V0H4.3zm6.4 6.4H5.3V1.1h5.4v5.3z" fill="#9a9999"/><path d="M8 13.4l-.9-.9-.5.5L8 14.4 9.4 13l-.5-.5-.9.9zm-1.4-1.9l.5.5.9-.9.9.9.5-.5L8 10.1l-1.4 1.4zM8 4.9L7.1 4l-.5.5L8 5.9l1.4-1.4-.5-.5-.9.9zm0-2.3l.9.9.5-.5L8 1.6 6.6 3l.5.5.9-.9z" fill="#676767"/><g fill="#fff"><path d="M5.3 1.1v5.4h5.4V1.1H5.3zM8 5.9L6.6 4.5l.5-.5.9.9.9-.9.5.5L8 5.9zm.9-2.4L8 2.6l-.9.9-.5-.5L8 1.6 9.4 3l-.5.5zM5.3 14.9h5.4V9.6H5.3v5.3zM8 10.1l1.4 1.4-.5.5-.9-.9-.9.9-.5-.5L8 10.1zm-.9 2.4l.9.9.9-.9.5.5L8 14.4 6.6 13l.5-.5z"/></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M3 15V1h6v4h4v1.6h1V4l-4-4H2v16h3v-1H3zm7-13.6L12.6 4H10V1.4z" fill="#999"/><path d="M9.5 5.7l1-.7H9l.5.7zm1-.7l2.2 1.6h.3V5h-2.5z" fill="#cbcbcb"/><path d="M5.8 9.5l.8.6V8.7l-.8.6v.2zm3.8-2.9h1.7l-.8-.6-.9.6zm4.8 2.3v1.3l.8-.6v-.1l-.8-.6z" fill="#ffe6bb"/><path d="M9.5 5.7L9 5V1H3v14h2V8.9l1.6-1.1V6.6h1.6l1.3-.9zm.5-4.3V4h2.6L10 1.4zm-2.6 6v3.3l3.1 2.3 3.1-2.2V7.4H7.4z" fill="#fff"/><path fill="#666" d="M6.6 6.6v3.5l.8.6V7.4h6.2v3.4l.8-.6V6.6z"/><path d="M9.3 12.1h2.5l1.1-.8H8.2l1.1.8zm-1.1-1.6h4.7v-.8H8.2v.8zm0-2.3V9h4.7v-.8H8.2z" fill="#b9b9b9"/><path d="M5.8 10.4v4.8l2.7-2.8-2.7-2zm6.7 2.1l2.7 2.8v-4.8l-2.7 2zm-2 1.3l-1.3-.9-2.3 2.3h7.2l-2.3-2.3-1.3.9z" fill="#ffc857"/><path d="M10.5 6l.8.6h1.4L10.5 5 8.2 6.6h1.4l.9-.6zm3.9 1.8v1.1l.8.6v.1L10.5 13 5.8 9.5v-.2l.8-.6v-1L5 8.9V16h11V8.9l-1.6-1.1zm-8.6 2.6l2.7 2-2.7 2.8v-4.8zm1.1 4.8l2.3-2.3 1.3.9 1.3-.9 2.3 2.3H6.9zm8.3.1l-2.7-2.8 2.7-2v4.8z" fill="#e8a33d"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#676767" d="M2 7.2h1.6v1.6H2zM4.5 7.2h1.6v1.6H4.5zM7 7.2h1.6v1.6H7z"/><path d="M0 5.5v5h16v-5h-1m0 4H1v-3h14v3z" fill="#9a9999"/><path d="M1 6.5v3h14v-3H1zm2.6 2.3H2V7.2h1.6v1.6zm2.5 0H4.5V7.2h1.6v1.6zm2.5 0H7V7.2h1.6v1.6z" fill="#fff"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 15c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7z" fill="#9a9999"/><path d="M8 1C4.1 1 1 4.1 1 8s3.1 7 7 7 7-3.1 7-7-3.1-7-7-7zm0 11c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z" fill="#fff"/><path d="M8 4c2.2 0 4 1.8 4 4s-1.8 4-4 4-4-1.8-4-4 1.8-4 4-4z" fill="#676767"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M1 1v14h14V1H1zm7 11.9L4.5 9.4l.7-.7L8 11.5l2.8-2.8.7.7L8 12.9zm2.8-5.6L8 4.4 5.2 7.3l-.7-.7 2.8-2.9L8 3l.7.7 2.8 2.9-.7.7z" fill="#fff"/><path d="M15 0H0v16h16V0h-1zm0 15H1V1h14v14z" fill="#9a9999"/><path d="M8 4.4l2.8 2.9.7-.7-2.8-2.9L8 3l-.7.7-2.8 2.9.7.7L8 4.4zm0 7.1L5.2 8.7l-.7.7L8 12.9l3.5-3.5-.7-.7L8 11.5z" fill="#676767"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M1 1v14h14V1H1zm13 13H2v-1h12v1zm0-2H2v-1h12v1zm0-2H2V9h12v1zm0-2H2V7h12v1zm0-2H2V5h12v1zm0-2H2V2h12v2z" fill="#fff"/><path d="M15 0H0v16h16V0h-1zm0 15H1V1h14v14z" fill="#9a9999"/><path d="M2 2v2h12V2H2zm0 4h12V5H2v1zm0 2h12V7H2v1zm0 2h12V9H2v1zm0 2h12v-1H2v1zm0 2h12v-1H2v1z" fill="#676767"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M8.8 6.8L7.6 8l-.5-.5-.3.3.8.8.3-.3 1.2-1.2-.3-.3zm0 2.4l-1.2 1.3-.5-.5-.3.3.8.8.3-.3 1.2-1.2-.3-.4zm0 2.6L7.6 13l-.5-.5-.3.3.8.8.3-.3 1.2-1.2-.3-.3z" fill="#79a548"/><path d="M3 1v14h2V5h4V1H3zm7 3V1.4L12.6 4H10zM6 15h9V6H6v9zm3.2-7.6h5v1.2h-5V7.4zm0 2.5h5v1.2h-5V9.9zm0 2.5h5v1.2h-5v-1.2zM7.1 7.5l.5.5 1.2-1.2.3.3-1.2 1.2-.3.3-.8-.8.3-.3zm0 2.5l.5.5 1.2-1.3.3.4-1.2 1.2-.3.3-.8-.8.3-.3zm0 2.5l.5.5 1.2-1.2.3.3-1.2 1.2-.3.3-.8-.8.3-.3z" fill="#fff"/><path d="M9.2 7.4h5v1.2h-5V7.4zm0 2.5h5v1.2h-5V9.9zm0 2.5h5v1.2h-5v-1.2zM15 6v9H6V6h9m1-1H5v11h11V5z" fill="#676767"/><path d="M3 15V1h6v4h5V4l-4-4H2v16h3v-1H3zm7-13.6L12.6 4H10V1.4z" fill="#999"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M1 9.5h3v-3H1v3zm4-3v3h10v-3H5z" fill="#fff"/><path d="M0 10.5h4v-1H1v-3h3v-1H0v5zm5-5v1h10v3H5v1h11v-5H5z" fill="#9a9999"/><path fill="#676767" d="M6.5 4.5v-1h-4v1H4v7H2.5v1h4v-1H5v-7z"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M1 1v14h14V1H1zm9 12H2v-1h8v1zm4-2H2v-1h12v1zm0-2H2V8h12v1zm0-2H2V6h12v1zm0-2H2V4h12v1zm0-2H2V2h12v1z" fill="#fff"/><path d="M15 0H0v16h16V0h-1zm0 15H1V1h14v14z" fill="#9a9999"/><path d="M2 2v1h12V2H2zm0 3h12V4H2v1zm0 2h12V6H2v1zm0 2h12V8H2v1zm0 2h12v-1H2v1zm0 2h8v-1H2v1z" fill="#676767"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M14 0H1v8c0 4.5 6.5 7.7 6.8 7.8l.2.1.2-.1c.3-.1 6.8-3.4 6.8-7.8V0h-1zM8 14.8c-1.1-.6-6-3.3-6-6.8V1h12v7c0 3.4-4.9 6.2-6 6.8z" fill="#0078e6"/><path d="M14 8V1H8v13.8c1.1-.6 6-3.4 6-6.8z" fill="#fff"/><path d="M2 1v7c0 3.5 4.9 6.2 6 6.8V1H2z" fill="#0078e6"/></svg>
\ No newline at end of file
......@@ -620,7 +620,7 @@ abstract class ImportExport
$preCode_B = $preCode . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
foreach ($record['softrefs'] as $info) {
$pInfo = [];
$pInfo['preCode'] = $preCode_A . $this->iconFactory->getIcon('status-status-reference-soft', Icon::SIZE_SMALL)->render();
$pInfo['preCode'] = $preCode_A . $this->iconFactory->getIcon('status-reference-soft', Icon::SIZE_SMALL)->render();
$pInfo['title'] = '<em>' . $info['field'] . ', "' . $info['spKey'] . '" </em>: <span title="' . htmlspecialchars($info['matchString']) . '">' . htmlspecialchars(GeneralUtility::fixed_lgd_cs($info['matchString'], 60)) . '</span>';
if ($info['subst']['type']) {
if (strlen($info['subst']['title'])) {
......@@ -743,7 +743,7 @@ abstract class ImportExport
return;
}
}
$pInfo['preCode'] = $preCode . '&nbsp;&nbsp;&nbsp;&nbsp;' . $this->iconFactory->getIcon('status-status-reference-hard', Icon::SIZE_SMALL)->render();
$pInfo['preCode'] = $preCode . '&nbsp;&nbsp;&nbsp;&nbsp;' . $this->iconFactory->getIcon('status-reference-hard', Icon::SIZE_SMALL)->render();
$pInfo['title'] = htmlspecialchars($fI['filename']);
$pInfo['ref'] = 'FILE';
$pInfo['size'] = $fI['filesize'];
......@@ -793,7 +793,7 @@ abstract class ImportExport
$this->error('MISSING RTE original FILE: ' . $ID);
}
$pInfo['showDiffContent'] = PathUtility::stripPathSitePrefix($this->fileIDMap[$ID]);
$pInfo['preCode'] = $preCode . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . $this->iconFactory->getIcon('status-status-reference-hard', Icon::SIZE_SMALL)->render();
$pInfo['preCode'] = $preCode . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . $this->iconFactory->getIcon('status-reference-hard', Icon::SIZE_SMALL)->render();
$pInfo['title'] = htmlspecialchars($fI['filename']) . ' <em>(Original)</em>';
$pInfo['ref'] = 'FILE';
$pInfo['size'] = $fI['filesize'];
......
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path fill="#FF8700" d="M0 0h64v64H0z"/><path fill="#FFF" d="M49.535 29.295l-5.457-1.558a12.594 12.594 0 0 0-.517-1.27l2.751-4.953a.642.642 0 0 0-.108-.766l-2.952-2.952a.643.643 0 0 0-.766-.108l-4.953 2.751a12.69 12.69 0 0 0-1.27-.517l-1.558-5.457a.645.645 0 0 0-.62-.465h-4.171c-.288 0-.54.19-.617.465l-1.561 5.459c-.435.154-.859.319-1.27.517l-4.953-2.751a.64.64 0 0 0-.766.108l-2.949 2.949a.64.64 0 0 0-.108.766l2.751 4.953a12.69 12.69 0 0 0-.517 1.27l-5.459 1.558a.647.647 0 0 0-.465.621v4.173c0 .288.19.54.465.617l5.457 1.558c.154.435.319.859.517 1.27l-2.751 4.953a.642.642 0 0 0 .108.766l2.952 2.952a.643.643 0 0 0 .766.108l4.953-2.751c.411.198.836.363 1.27.517l1.558 5.457c.08.275.332.465.62.465h4.173c.288 0 .54-.19.617-.465l1.558-5.457c.435-.154.859-.319 1.27-.517l4.953 2.751a.642.642 0 0 0 .766-.108l2.952-2.952a.643.643 0 0 0 .108-.766l-2.751-4.953c.198-.411.363-.836.517-1.27l5.457-1.558a.645.645 0 0 0 .465-.62v-4.171a.645.645 0 0 0-.465-.619zM32 39.714c-4.261 0-7.714-3.453-7.714-7.714s3.453-7.714 7.714-7.714 7.714 3.453 7.714 7.714-3.453 7.714-7.714 7.714z"/><path fill="#FFF" d="M32 32h24v24H32z"/><path fill="#FF8700" d="M54 34v20H34V34h20m4-4H30v28h28V30z"/><path fill="#FF8700" d="M36 36h16v2H36zM36 40h16v12H36z"/><path fill="#FFF" d="M42.391 49.625a.574.574 0 0 0 .804-.002l5.636-5.636a.563.563 0 0 0-.003-.809l-.798-.798a.574.574 0 0 0-.802-.011l-4.04 4.04a.557.557 0 0 1-.794-.004l-1.618-1.618a.561.561 0 0 0-.805.007l-.798.798a.566.566 0 0 0-.006.807l3.224 3.226z"/></svg>
\ No newline at end of file
......@@ -1352,7 +1352,7 @@ class DatabaseRecordList
$lockInfo = BackendUtility::isRecordLocked($table, $row['uid']);
if ($lockInfo) {
$warning = '<span data-toggle="tooltip" data-placement="right" data-title="' . htmlspecialchars($lockInfo['msg']) . '">'
. $this->iconFactory->getIcon('status-warning-in-use', Icon::SIZE_SMALL)->render() . '</span>';
. $this->iconFactory->getIcon('warning-in-use', Icon::SIZE_SMALL)->render() . '</span>';
}
$theData[$fCol] = $theData['__label'] = $warning . $this->linkWrapItems($table, $row['uid'], $recTitle, $row);
// Render thumbnails, if:
......
......@@ -39,4 +39,11 @@ if (TYPO3_MODE === 'BE') {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/tree/pagetree/class.t3lib_tree_pagetree_dataprovider.php']['postProcessCollections'][] = \TYPO3\CMS\Workspaces\Hooks\PagetreeCollectionsProcessor::class;
$GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433114] = \TYPO3\CMS\Workspaces\Backend\ToolbarItems\WorkspaceSelectorToolbarItem::class;
// Registers preview link icon
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class)->registerIcon(
'module-workspaces-action-preview-link',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:workspaces/Resources/Public/Images/generate-ws-preview-link.png']
);
}
......@@ -23,10 +23,4 @@ if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) {
);
}
// Registers preview link icon
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class)->registerIcon(
'module-workspaces-action-preview-link',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:workspaces/Resources/Public/Images/generate-ws-preview-link.png']
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('sys_workspace_stage', 'EXT:workspaces/Resources/Private/Language/locallang_csh_sysws_stage.xlf');
Markdown is supported
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