Commit 7580a73d authored by Markus Guenther's avatar Markus Guenther Committed by Frank Nägler
Browse files

[TASK] Replace sprite icon "actions-document-open" with IconFactory

Replaces all IconUtility::getSpriteIcon calls for the icon
actions-document-open with the new IconFactory.

Change-Id: I8bdff1bb752f2735d553da859cec71256ceb2d2c
Resolves: #68845
Releases: master
Reviewed-on: http://review.typo3.org/42411

Reviewed-by: Jan Helke's avatarJan Helke <typo3@helke.de>
Tested-by: Jan Helke's avatarJan Helke <typo3@helke.de>
Reviewed-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Frank Nägler's avatarFrank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler's avatarFrank Nägler <frank.naegler@typo3.org>
parent 027c5f54
......@@ -131,8 +131,10 @@ class ShortcutToolbarItem implements ToolbarItemInterface {
$shortcutGroup = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.bookmarksGroup', TRUE);
$shortcutEdit = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.bookmarksEdit', TRUE);
$shortcutDelete = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.bookmarksDelete', TRUE);
$editIcon = '<a href="#" class="dropdown-list-link-edit shortcut-edit">' . IconUtility::getSpriteIcon('actions-document-open', array('title' => $shortcutEdit)) . '</a>';
$deleteIcon = '<a href="#" class="dropdown-list-link-delete shortcut-delete" title="' . $shortcutDelete . '">' . $this->iconFactory->getIcon('actions-edit-delete', Icon::SIZE_SMALL) . '</a>';
$editIcon = '<a href="#" class="dropdown-list-link-edit shortcut-edit" ' . $shortcutEdit . '>'
. $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</a>';
$deleteIcon = '<a href="#" class="dropdown-list-link-delete shortcut-delete" title="' . $shortcutDelete . '">'
. $this->iconFactory->getIcon('actions-edit-delete', Icon::SIZE_SMALL) . '</a>';
$shortcutMenu[] = '<ul class="dropdown-list">';
......
......@@ -696,7 +696,7 @@ class ClickMenu {
$newPageModule = trim($this->backendUser->getTSConfigVal('options.overridePageModule'));
$pageModule = BackendUtility::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
$loc = 'top.content.list_frame';
$theIcon = 'actions-document-open';
$theIcon = $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL);
$link = BackendUtility::getModuleUrl('record_edit', array(
'edit[' . $table . '][' . $uid . ']' => 'edit'
......@@ -706,7 +706,7 @@ class ClickMenu {
$this->editPageIconSet = TRUE;
}
$editOnClick = 'if(' . $loc . '){' . $loc . '.location.href=' . GeneralUtility::quoteJSvalue($link . '&returnUrl=') . '+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search);}';
return $this->linkItem($this->label('edit'), IconUtility::getSpriteIcon($theIcon), $editOnClick . ';');
return $this->linkItem($this->label('edit'), $theIcon, $editOnClick . ';');
}
/**
......
......@@ -587,7 +587,7 @@ class ElementInformationController implements \TYPO3\CMS\Core\Http\ControllerInt
$editOnClick = BackendUtility::editOnClick('&edit[' . $table . '][' . $uid . ']=edit');
$pageActionIcons = '
<a class="btn btn-default btn-sm" href="#" onclick="' . htmlspecialchars($editOnClick) . '">
' . IconUtility::getSpriteIcon('actions-document-open') . '
' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '
</a>';
// History button
......
......@@ -1201,7 +1201,7 @@ class EditDocumentController implements \TYPO3\CMS\Core\Http\ControllerInterface
}
// If only SOME fields are shown in the form, this will link the user to the FULL form:
if ($this->columnsOnly) {
$buttons['columns_only'] = '<a href="' . htmlspecialchars(($this->R_URI . '&columnsOnly=')) . '" title="' . $lang->getLL('editWholeRecord', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-open') . '</a>';
$buttons['columns_only'] = '<a href="' . htmlspecialchars(($this->R_URI . '&columnsOnly=')) . '" title="' . $lang->getLL('editWholeRecord', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</a>';
}
}
}
......
......@@ -550,7 +550,7 @@ class InlineRecordContainer extends AbstractContainer {
$title = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:cm.editMetadata');
$cells['editmetadata'] = '
<a class="btn btn-default" href="#" class="btn" onclick="' . htmlspecialchars($editOnClick) . '" title="' . htmlspecialchars($title) . '">
' . IconUtility::getSpriteIcon('actions-document-open') . '
' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '
</a>';
}
}
......
......@@ -341,7 +341,8 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
rtrim(trim($this->getLanguageService()->sL(BackendUtility::getItemLabel('pages', $field))), ':')
);
$eI = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::editOnClick($params))
. '" title="' . htmlspecialchars($iTitle) . '">' . IconUtility::getSpriteIcon('actions-document-open') . '</a>';
. '" title="' . htmlspecialchars($iTitle) . '">'
. $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</a>';
} else {
$eI = '';
}
......@@ -710,7 +711,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
) . $viewLink . ($this->getBackendUser()->check('tables_modify', 'pages_language_overlay')
? '<a href="#" onclick="' . htmlspecialchars(BackendUtility::editOnClick($params))
. '" title="' . $this->getLanguageService()->getLL('edit', TRUE) . '">'
. IconUtility::getSpriteIcon('actions-document-open') . '</a>'
. $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</a>'
: ''
) . htmlspecialchars(GeneralUtility::fixed_lgd_cs($lpRecord['title'], 20));
} else {
......@@ -844,7 +845,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
if ($this->doEdit) {
$Nrow['__editIconLink__'] = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::editOnClick($params))
. '" title="' . $this->getLanguageService()->getLL('edit', TRUE) . '">'
. IconUtility::getSpriteIcon('actions-document-open') . '</a>';
. $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</a>';
} else {
$Nrow['__editIconLink__'] = $this->noEditIcon();
}
......@@ -1049,7 +1050,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
$eI = '<a href="#" onclick="'
. htmlspecialchars(BackendUtility::editOnClick($params))
. '" title="' . $this->getLanguageService()->getLL('editThisPage', TRUE) . '">'
. IconUtility::getSpriteIcon('actions-document-open') . '</a>';
. $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</a>';
} else {
$eI = '';
}
......@@ -1112,7 +1113,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
$iconsArr['edit'] = '<a href="#" onclick="'
. htmlspecialchars(BackendUtility::editOnClick($editParams)) . '" title="'
. $this->getLanguageService()->getLL('editColumn', TRUE) . '">'
. IconUtility::getSpriteIcon('actions-document-open') . '</a>';
. $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</a>';
}
if ($pasteParams) {
$elFromTable = $this->clipboard->elFromTable('tt_content');
......@@ -1206,7 +1207,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
)) . '" title="' . htmlspecialchars($this->nextThree > 1
? sprintf($this->getLanguageService()->getLL('nextThree'), $this->nextThree)
: $this->getLanguageService()->getLL('edit'))
. '">' . IconUtility::getSpriteIcon('actions-document-open') . '</a>';
. '">' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</a>';
// Hide element:
$hiddenField = $GLOBALS['TCA']['tt_content']['ctrl']['enablecolumns']['disabled'];
if (
......
......@@ -32,7 +32,7 @@
<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>
<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}')}"><be:spriteManagerIcon iconName="actions-document-open" /></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>
<f:if condition="{backendUser.currentlyLoggedIn} == 1">
<f:then>
<span class="btn btn-default disabled"><be:spriteManagerIcon iconName="empty-empty" /></span>
......
......@@ -26,7 +26,7 @@
<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}')}"><be:spriteManagerIcon iconName="actions-document-open" /></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>
<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>
......
......@@ -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')}"
>
<be:spriteManagerIcon iconName="actions-document-open" />
<core:icon identifier="actions-document-open" size="small"/>
</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')}"
>
<be:spriteManagerIcon iconName="actions-document-open" />
<core:icon identifier="actions-document-open" size="small"/>
</f:link.action>
</f:else>
</f:if>
......
......@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Core\Database;
* 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;
use TYPO3\CMS\Backend\Utility\BackendUtility;
......@@ -524,6 +526,8 @@ class QueryView {
* @return string
*/
public function resultRowDisplay($row, $conf, $table) {
/** @var IconFactory $iconFactory */
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$SET = $GLOBALS['SOBE']->MOD_SETTINGS;
$out = '<tr>';
foreach ($row as $fieldName => $fieldValue) {
......@@ -540,7 +544,7 @@ class QueryView {
$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>';
$out .= '<a class="btn btn-default" href="#" onClick="' . htmlspecialchars(BackendUtility::editOnClick($params, '', GeneralUtility::getIndpEnv('REQUEST_URI') . GeneralUtility::implodeArrayForUrl('SET', (array)GeneralUtility::_POST('SET')))) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open') . '</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(
('cmd[' . $table . '][' . $row['uid'] . '][undelete]') => '1',
......
......@@ -694,15 +694,16 @@ class FileList extends AbstractRecordList {
$languageId = $language['uid'];
$flagIcon = $language['flagIcon'];
if (array_key_exists($languageId, $translations)) {
$flagButtonIcon = IconUtility::getSpriteIcon(
'actions-document-open',
array('title' => sprintf($GLOBALS['LANG']->getLL('editMetadataForLanguage'), $language['title'])),
array($flagIcon . '-overlay' => array()));
$title = htmlspecialchars(sprintf($GLOBALS['LANG']->getLL('editMetadataForLanguage'), $language['title']));
// @todo the overlay for the flag needs to be added ($flagIcon . '-overlay')
$flagButtonIcon = $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL);
$data = array(
'sys_file_metadata' => array($translations[$languageId]['uid'] => 'edit')
);
$editOnClick = BackendUtility::editOnClick(GeneralUtility::implodeArrayForUrl('edit', $data), '', $this->listUrl());
$languageCode .= '<a href="#" class="btn btn-default" onclick="' . htmlspecialchars($editOnClick) . '">' . $flagButtonIcon . '</a>';
$languageCode .= '<a href="#" class="btn btn-default" onclick="'
. htmlspecialchars($editOnClick) . '" title="' . $title . '">'
. $flagButtonIcon . '</a>';
} else {
$parameters = [
'justLocalized' => 'sys_file_metadata:' . $metaDataRecord['uid'] . ':' . $languageId,
......@@ -1030,4 +1031,4 @@ class FileList extends AbstractRecordList {
return $GLOBALS['BE_USER'];
}
}
}
\ No newline at end of file
......@@ -152,7 +152,7 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
$info .= '<a href="#" onclick="' . htmlspecialchars(BackendUtility::editOnClick($params))
. '" title="' . $lang->sL(
'LLL:EXT:frontend/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_editDefaultLanguagePage'
) . '">' . IconUtility::getSpriteIcon('actions-document-open') . '</a>';
) . '">' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</a>';
$info .= str_replace('###LANG_UID###', '0', $viewPageLink);
$info .= '&nbsp;';
$info .= $data['row']['l18n_cfg'] & 1 ? '<span title="' . $lang->sL('LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.l18n_cfg.I.1', TRUE) . '">D</span>' : '&nbsp;';
......@@ -197,7 +197,7 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
$info .= '<a href="#" onclick="' . htmlspecialchars(BackendUtility::editOnClick($params))
. '" title="' . $lang->sL(
'LLL:EXT:frontend/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_editLanguageOverlayRecord'
) . '">' . IconUtility::getSpriteIcon('actions-document-open') . '</a>';
) . '">' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</a>';
$info .= str_replace('###LANG_UID###', $langRow['uid'], $viewPageLink);
$tCells[] = '<td class="' . $status . '">' . $info . '</td>';
$tCells[] = '<td class="' . $status . '" title="' . $lang->sL(
......@@ -239,7 +239,7 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
$editIco = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::editOnClick($params))
. '" title="' . $lang->sL(
'LLL:EXT:frontend/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_editPageProperties'
) . '">' . IconUtility::getSpriteIcon('actions-document-open') . '</a>';
) . '">' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</a>';
} else {
$editIco = '';
}
......@@ -258,7 +258,7 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
$tCells[] = '<td><a href="#" onclick="' . htmlspecialchars(BackendUtility::editOnClick($params))
. '" title="' . $lang->sL(
'LLL:EXT:frontend/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_editLangOverlays'
) . '">' . IconUtility::getSpriteIcon('actions-document-open') . '</a></td>';
) . '">' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</a></td>';
} else {
$tCells[] = '<td>&nbsp;</td>';
}
......@@ -382,4 +382,4 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
return $GLOBALS['BE_USER'];
}
}
}
\ No newline at end of file
......@@ -643,7 +643,7 @@ class AdminPanelView {
$toolBar .= '<a class="t3-icon btn btn-default" href="' . htmlspecialchars(BackendUtility::getModuleUrl('db_new', ['id' => $id, 'pagesOnly' => 1, 'returnUrl' => $returnUrl])) . '">' . $icon . '</a>';
}
if ($perms & Permission::PAGE_EDIT) {
$icon = IconUtility::getSpriteIcon('actions-document-open', array('title' => $this->extGetLL('edit_editPageProperties', FALSE)));
$icon = $iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL);
$url = BackendUtility::getModuleUrl('record_edit', array(
'edit[pages][' . $id . ']' => 'edit',
'noView' => 1,
......
......@@ -16,6 +16,8 @@ namespace TYPO3\CMS\InfoPagetsconfig\Controller;
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\MathUtility;
......@@ -23,11 +25,16 @@ use TYPO3\CMS\Core\Utility\MathUtility;
* Page TSconfig viewer
*/
class InfoPageTyposcriptConfigController extends \TYPO3\CMS\Backend\Module\AbstractFunctionModule {
/**
* @var IconFactory
*/
protected $iconFactory;
/**
* Constructor
*/
public function __construct() {
$this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$this->getLanguageService()->includeLLFile('EXT:info_pagetsconfig/Resources/Private/Language/locallang.xlf');
}
......@@ -70,7 +77,6 @@ class InfoPageTyposcriptConfigController extends \TYPO3\CMS\Backend\Module\Abstr
* @return string HTML output
*/
public function main() {
if ((int)(GeneralUtility::_GP('id')) === 0) {
$lang = $this->getLanguageService();
return $this->pObj->doc->section(
......@@ -111,7 +117,7 @@ class InfoPageTyposcriptConfigController extends \TYPO3\CMS\Backend\Module\Abstr
$editIdList = substr($k, 4);
$params = '&edit[pages][' . $editIdList . ']=edit&columnsOnly=TSconfig';
$onclickUrl = BackendUtility::editOnClick($params);
$editIcon = '<a href="#" onclick="' . htmlspecialchars($onclickUrl) . '" title="' . $this->getLanguageService()->getLL('editTSconfig', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open') . '</a>';
$editIcon = '<a href="#" onclick="' . htmlspecialchars($onclickUrl) . '" title="' . $this->getLanguageService()->getLL('editTSconfig', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</a>';
}
$TScontent = nl2br(htmlspecialchars(trim($v) . LF));
$tsparser = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::class);
......@@ -127,7 +133,7 @@ class InfoPageTyposcriptConfigController extends \TYPO3\CMS\Backend\Module\Abstr
if (!empty($pUids)) {
$params = '&edit[pages][' . implode(',', $pUids) . ']=edit&columnsOnly=TSconfig';
$onclickUrl = BackendUtility::editOnClick($params);
$editIcon = '<a href="#" onclick="' . htmlspecialchars($onclickUrl) . '" title="' . $this->getLanguageService()->getLL('editTSconfig_all', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open') . '<strong>' . $this->getLanguageService()->getLL('editTSconfig_all', TRUE) . '</strong>' . '</a>';
$editIcon = '<a href="#" onclick="' . htmlspecialchars($onclickUrl) . '" title="' . $this->getLanguageService()->getLL('editTSconfig_all', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '<strong>' . $this->getLanguageService()->getLL('editTSconfig_all', TRUE) . '</strong>' . '</a>';
} else {
$editIcon = '';
}
......
......@@ -17,6 +17,8 @@ namespace TYPO3\CMS\Linkvalidator\Report;
use TYPO3\CMS\Backend\Template\DocumentTemplate;
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\Messaging\FlashMessage;
use TYPO3\CMS\Core\Service\MarkerBasedTemplateService;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
......@@ -460,6 +462,9 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
* @return string HTML of the rendered row
*/
protected function renderTableRow($table, array $row, $brokenLinksItemTemplate) {
/** @var IconFactory $iconFactory */
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$markerArray = array();
$fieldName = '';
// Restore the linktype object
......@@ -476,7 +481,7 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
$requestUri
));
$actionLink .= '" title="' . $this->getLanguageService()->getLL('list.edit') . '">';
$actionLink .= IconUtility::getSpriteIcon('actions-document-open');
$actionLink .= $iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL);
$actionLink .= '</a>';
$elementHeadline = $row['headline'];
if (empty($elementHeadline)) {
......
......@@ -936,7 +936,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList {
$onClick = implode('?', $onClickArray);
$cells['edit'] = '<a class="btn btn-default" href="#" onclick="' . htmlspecialchars($onClick) . '" title="'
. $lang->getLL('clip_editMarked', TRUE) . '">'
. IconUtility::getSpriteIcon('actions-document-open') . '</a>';
. $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</a>';
// The "Delete marked" link:
$cells['delete'] = $this->linkClipboardHeaderIcon(
IconUtility::getSpriteIcon('actions-edit-delete', array('title' => $lang->getLL('clip_deleteMarked', TRUE))),
......@@ -1013,7 +1013,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList {
$params = '&edit[' . $table . '][' . $editIdList . ']=edit&columnsOnly=' . implode(',', $this->fieldArray);
$icon .= '<a class="btn btn-default" href="#" onclick="' . htmlspecialchars(BackendUtility::editOnClick($params, '', -1))
. '" title="' . $lang->getLL('editShownColumns', TRUE) . '">'
. IconUtility::getSpriteIcon('actions-document-open') . '</a>';
. $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</a>';
$icon = '<div class="btn-group" role="group">' . $icon . '</div>';
}
// Add an empty entry, so column count fits again after moving this into $icon
......@@ -1054,7 +1054,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList {
$iTitle = sprintf($lang->getLL('editThisColumn'), $sortLabel);
$theData[$fCol] .= '<a class="btn btn-default" href="#" onclick="' . htmlspecialchars(BackendUtility::editOnClick($params, '', -1))
. '" title="' . htmlspecialchars($iTitle) . '">'
. IconUtility::getSpriteIcon('actions-document-open') . '</a>';
. $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</a>';
}
if(strlen($theData[$fCol]) > 0){
$theData[$fCol] = '<div class="btn-group" role="group">' . $theData[$fCol] . '</div> ';
......@@ -1242,9 +1242,9 @@ class DatabaseRecordList extends AbstractDatabaseRecordList {
// "Edit" link: ( Only if permissions to edit the page-record of the content of the parent page ($this->id)
if ($permsEdit) {
$params = '&edit[' . $table . '][' . $row['uid'] . ']=edit';
$spriteIcon = (!$this->isEditable($table) ? 'actions-document-open-read-only' : 'actions-document-open');
$icon = (!$this->isEditable($table) ? IconUtility::getSpriteIcon('actions-document-open-read-only') : $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL));
$editAction = '<a class="btn btn-default" href="#" onclick="' . htmlspecialchars(BackendUtility::editOnClick($params, '', -1))
. '" title="' . $this->getLanguageService()->getLL('edit', TRUE) . '">' . IconUtility::getSpriteIcon($spriteIcon) . '</a>';
. '" title="' . $this->getLanguageService()->getLL('edit', TRUE) . '">' . $icon . '</a>';
} else {
$editAction = $this->spaceIcon;
}
......
......@@ -955,7 +955,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
foreach ($taskGroup['tasks'] as $schedulerRecord) {// Define action icons
$link = htmlspecialchars($this->moduleUri . '&CMD=edit&tx_scheduler[uid]=' . $schedulerRecord['uid']);
$editAction = '<a class="btn btn-default" href="' . $link . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:edit', TRUE) . '" class="icon">' .
IconUtility::getSpriteIcon('actions-document-open') . '</a>';
$this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</a>';
if ((int)$schedulerRecord['disable'] === 1) {
$translationKey = 'enable';
$icon = $this->iconFactory->getIcon('actions-edit-unhide', Icon::SIZE_SMALL);
......
......@@ -15,6 +15,8 @@ namespace TYPO3\CMS\Tstemplate\Controller;
*/
use TYPO3\CMS\Core\DataHandling\DataHandler;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\TypoScript\ExtendedTemplateService;
use TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser;
use TYPO3\CMS\Core\Utility\GeneralUtility;
......@@ -42,6 +44,18 @@ class TypoScriptTemplateInformationModuleFunctionController extends AbstractFunc
*/
public $pObj;
/**
* @var IconFactory
*/
protected $iconFactory;
/**
* Constructor
*/
public function __construct() {
$this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
}
/**
* Creates a row for a HTML table
*
......@@ -54,21 +68,19 @@ class TypoScriptTemplateInformationModuleFunctionController extends AbstractFunc
public function tableRow($label, $data, $field, $id) {
$lang = $this->getLanguageService();
$ret = '<tr><td>';
$title = $lang->sL('LLL:EXT:lang/locallang_common.xlf:editField', TRUE);
if ($field === 'config' || $field === 'constants') {
$urlParameters = array(
'id' => $this->pObj->id
);
$aHref = BackendUtility::getModuleUrl('web_ts', $urlParameters);
$startAnchor = '<a href="' . htmlspecialchars(($aHref . '&e[' . $field . ']=1')) . '">';
$startAnchor = '<a href="' . htmlspecialchars(($aHref . '&e[' . $field . ']=1')) . '" title="' . $title . '">';
} else {
$params = '&columnsOnly=' . $field . '&createExtension=0' . '&edit[sys_template][' . $id . ']=edit';
$editOnClick = BackendUtility::editOnClick($params);
$startAnchor = '<a href="#" onclick="' . htmlspecialchars($editOnClick) . '">';
$startAnchor = '<a href="#" onclick="' . htmlspecialchars($editOnClick) . '" title="' . $title . '>';
}
$icon = IconUtility::getSpriteIcon(
'actions-document-open',
array('title' => $lang->sL('LLL:EXT:lang/locallang_common.xlf:editField', TRUE))
);
$icon = $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL);
$ret .= $startAnchor . '<strong>' . $label . '</strong></a>';
$ret .= '</td><td width="80%">' . $data . '</td><td>' . $startAnchor . '<span class="btn btn-default">' . $icon . '</span></a></td></tr>';
return $ret;
......@@ -272,8 +284,10 @@ class TypoScriptTemplateInformationModuleFunctionController extends AbstractFunc
// Edit all icon:
$editOnClick = BackendUtility::editOnClick('&createExtension=0&edit[sys_template][' . $tplRow['uid'] . ']=edit');
$icon = IconUtility::getSpriteIcon('actions-document-open', array('title' => $lang->getLL('editTemplateRecord'))) . '&nbsp;' . $lang->getLL('editTemplateRecord');
$outCode .= '<br /><a class="btn btn-default" href="#" onclick="' . htmlspecialchars($editOnClick) . '"><strong>' . $icon . '</strong></a>';
$title = $lang->getLL('editTemplateRecord', TRUE);
$icon = $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL);
$outCode .= '<br /><a class="btn btn-default" href="#" onclick="' . htmlspecialchars($editOnClick)
. '"><strong>' . $icon . '&nbsp;' . $title . '</strong></a>';
$theOutput .= $this->pObj->doc->section('', $outCode);
// hook after compiling the output
......
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