Commit a463a707 authored by Daniel Windloff's avatar Daniel Windloff Committed by Jan Helke
Browse files

[TASK] Make use of edit icons consistent

Use the following icons to indicate different kinds of "edit actions":
* actions-open: single edit action
* actions-document-open: multi edit action
* actions-page-open: edit page properties

Resolves: #77963
Releases: master
Change-Id: I2d3198b56755eef5eb715058caf5d8574124c9ca
Reviewed-on: https://review.typo3.org/49946

Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Frank Nägler's avatarFrank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Nägler's avatarFrank Naegler <frank.naegler@typo3.org>
Tested-by: default avatarTomasz Stępniak <stempl88@gmail.com>
Reviewed-by: Jan Helke's avatarJan Helke <typo3@helke.de>
Tested-by: Jan Helke's avatarJan Helke <typo3@helke.de>
parent 3c8356f0
......@@ -755,7 +755,11 @@ class ClickMenu
$newPageModule = trim($this->backendUser->getTSConfigVal('options.overridePageModule'));
$pageModule = BackendUtility::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
$loc = 'top.content.list_frame';
$theIcon = $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render();
$iconName = 'actions-open';
if ($table === 'pages') {
$iconName = 'actions-page-open';
}
$theIcon = $this->iconFactory->getIcon($iconName, Icon::SIZE_SMALL)->render();
$link = BackendUtility::getModuleUrl('record_edit', [
'edit[' . $table . '][' . $uid . ']' => 'edit'
......
......@@ -592,7 +592,7 @@ class ElementInformationController
$url = BackendUtility::getModuleUrl('record_edit', $urlParameters);
$pageActionIcons = '
<a class="btn btn-default btn-sm" href="' . htmlspecialchars($url) . '">
' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '
' . $this->iconFactory->getIcon('actions-open', Icon::SIZE_SMALL)->render() . '
</a>';
// History button
......
......@@ -1412,7 +1412,7 @@ class EditDocumentController extends AbstractModule
->setHref($this->R_URI . '&columnsOnly=')
->setTitle($lang->getLL('editWholeRecord'))
->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
'actions-document-open',
'actions-open',
Icon::SIZE_SMALL
));
$buttonBar->addButton($columnsOnlyButton, ButtonBar::BUTTON_POSITION_LEFT, 3);
......
......@@ -491,7 +491,7 @@ class InlineRecordContainer extends AbstractContainer
$title = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:cm.editMetadata');
$cells['editmetadata'] = '
<a class="btn btn-default" href="' . htmlspecialchars($url) . '" title="' . htmlspecialchars($title) . '">
' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '
' . $this->iconFactory->getIcon('actions-open', Icon::SIZE_SMALL)->render() . '
</a>';
}
}
......
......@@ -410,7 +410,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
];
$url = BackendUtility::getModuleUrl('record_edit', $urlParameters);
$eI = '<a href="' . htmlspecialchars($url)
$eI = '<a class="btn btn-default" href="' . htmlspecialchars($url)
. '" title="' . htmlspecialchars($iTitle) . '">'
. $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '</a>';
} else {
......@@ -418,9 +418,9 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
}
switch ($field) {
case 'title':
$theData[$field] = '&nbsp;<strong>'
$theData[$field] = '&nbsp;' . $eI . '<strong>'
. $lang->sL($GLOBALS['TCA']['pages']['columns'][$field]['label'])
. '</strong>' . $eI;
. '</strong>';
break;
case 'uid':
$theData[$field] = '&nbsp;<strong>ID:</strong>';
......@@ -437,9 +437,9 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
'</span>';
}
} else {
$theData[$field] = '&nbsp;&nbsp;<strong>'
$theData[$field] = '&nbsp;&nbsp;' . $eI . '<strong>'
. htmlspecialchars($lang->sL($GLOBALS['TCA']['pages']['columns'][$field]['label']))
. '</strong>' . $eI;
. '</strong>';
}
}
}
......@@ -1060,9 +1060,9 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
];
$url = BackendUtility::getModuleUrl('record_edit', $urlParameters);
$Nrow['__editIconLink__'] = '<a href="' . htmlspecialchars($url)
$Nrow['__editIconLink__'] = '<a class="btn btn-default" href="' . htmlspecialchars($url)
. '" title="' . htmlspecialchars($this->getLanguageService()->getLL('edit')) . '">'
. $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '</a>';
. $this->iconFactory->getIcon('actions-open', Icon::SIZE_SMALL)->render() . '</a>';
} else {
$Nrow['__editIconLink__'] = $this->noEditIcon();
}
......@@ -1371,13 +1371,13 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
];
$url = BackendUtility::getModuleUrl('record_edit', $urlParameters);
$eI = '<a href="' . htmlspecialchars($url)
$eI = '<a class="btn btn-default" href="' . htmlspecialchars($url)
. '" title="' . htmlspecialchars($this->getLanguageService()->getLL('editThisPage')) . '">'
. $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '</a>';
. $this->iconFactory->getIcon('actions-page-open', Icon::SIZE_SMALL)->render() . '</a>';
} else {
$eI = '';
}
$theData[$field] = '<span align="right">' . $row['uid'] . $eI . '</span>';
$theData[$field] = $eI . '<span align="right">' . $row['uid'] . '</span>';
break;
case 'shortcut':
case 'shortcut_mode':
......@@ -1543,7 +1543,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'))
. '">' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '</a>';
. '">' . $this->iconFactory->getIcon('actions-open', Icon::SIZE_SMALL)->render() . '</a>';
// Hide element:
$hiddenField = $GLOBALS['TCA']['tt_content']['ctrl']['enablecolumns']['disabled'];
if ($hiddenField && $GLOBALS['TCA']['tt_content']['columns'][$hiddenField]
......
......@@ -32,7 +32,7 @@
<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" /></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>
<a class="btn btn-default" href="{bu:editRecord(parameters: 'edit[be_users][{backendUser.uid}]=edit&returnUrl={returnUrl}')}"><core:icon identifier="actions-open" /></a>
<f:if condition="{backendUser.currentlyLoggedIn} == 1">
<f:then>
<span class="btn btn-default disabled"><core:icon identifier="empty-empty" /></span>
......
......@@ -25,7 +25,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" /></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>
<a class="btn btn-default" href="{bu:editRecord(parameters: 'edit[be_groups][{backendUserGroup.uid}]=edit&returnUrl={returnUrl}')}"><core:icon identifier="actions-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" /></a>
......
......@@ -56,7 +56,7 @@
class="btn btn-default"
title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:ch_permissions')}"
>
<core:icon identifier="actions-document-open" />
<core:icon identifier="actions-open" />
</f:link.action>
</td>
......
......@@ -694,7 +694,7 @@ class QueryView
. ');return false;">' . $this->iconFactory->getIcon('actions-document-info', Icon::SIZE_SMALL)->render()
. '</a>';
$out .= '<a class="btn btn-default" href="' . htmlspecialchars($url) . '">'
. $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '</a>';
. $this->iconFactory->getIcon('actions-open', Icon::SIZE_SMALL)->render() . '</a>';
} else {
$out .= '<a class="btn btn-default" href="' . htmlspecialchars(BackendUtility::getModuleUrl('tce_db', [
'cmd' => [
......
......@@ -46,7 +46,7 @@
</li>
<li>
<button class="btn btn-default distribution-openPageModule" onclick="top.goToModule('web_page');">
<core:icon identifier="actions-document-open" /><f:translate key="distribution.welcome.openPageModule" />
<f:translate key="distribution.welcome.openPageModule" />
</button>
</li>
</f:then>
......
......@@ -169,7 +169,7 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
$info = '<a href="' . htmlspecialchars($editUrl)
. '" class="btn btn-default" title="' . $lang->sL(
'LLL:EXT:frontend/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_editDefaultLanguagePage'
) . '">' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '</a>';
) . '">' . $this->iconFactory->getIcon('actions-page-open', Icon::SIZE_SMALL)->render() . '</a>';
$info .= str_replace('###LANG_UID###', '0', $viewPageLink);
$info .= '&nbsp;';
$info .= GeneralUtility::hideIfDefaultLanguage($data['row']['l18n_cfg']) ? '<span title="' . htmlspecialchars($lang->sL('LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.l18n_cfg.I.1')) . '">D</span>' : '&nbsp;';
......@@ -216,7 +216,7 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
$info = '<a href="' . htmlspecialchars($editUrl)
. '" class="btn btn-default" title="' . $lang->sL(
'LLL:EXT:frontend/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_editLanguageOverlayRecord'
) . '">' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '</a>';
) . '">' . $this->iconFactory->getIcon('actions-open', Icon::SIZE_SMALL)->render() . '</a>';
$info .= str_replace('###LANG_UID###', $langRow['uid'], $viewPageLink);
$tCells[] = '<td class="' . $status . '"><div class="btn-group">' . $info . '</div></td>';
$tCells[] = '<td class="' . $status . '" title="' . $lang->sL(
......
......@@ -702,7 +702,7 @@ class AdminPanelView
. '</a>';
}
if ($perms & Permission::PAGE_EDIT) {
$icon = $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render();
$icon = $this->iconFactory->getIcon('actions-page-open', Icon::SIZE_SMALL)->render();
$url = BackendUtility::getModuleUrl('record_edit', [
'edit[pages][' . $id . ']' => 'edit',
'noView' => 1,
......
......@@ -586,7 +586,7 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
$element .= ' ' . htmlspecialchars(sprintf($this->getLanguageService()->getLL('list.field'), $fieldName));
$markerArray['actionlinkOpen'] = $actionLinkOpen;
$markerArray['actionlinkClose'] = $actionLinkClose;
$markerArray['actionlinkIcon'] = $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render();
$markerArray['actionlinkIcon'] = $this->iconFactory->getIcon('actions-open', Icon::SIZE_SMALL)->render();
$markerArray['path'] = BackendUtility::getRecordPath($row['record_pid'], '', 0, 0);
$markerArray['element'] = $element;
$markerArray['headlink'] = htmlspecialchars($row['link_title']);
......
......@@ -1441,6 +1441,9 @@ class DatabaseRecordList extends AbstractDatabaseRecordList
if ($permsEdit) {
$params = '&edit[' . $table . '][' . $row['uid'] . ']=edit';
$iconIdentifier = 'actions-open';
if ($table === 'pages') {
$iconIdentifier = 'actions-page-open';
}
$overlayIdentifier = !$this->isEditable($table) ? 'overlay-readonly' : null;
$editAction = '<a class="btn btn-default" href="#" onclick="' . htmlspecialchars(BackendUtility::editOnClick($params, '', -1))
. '" title="' . htmlspecialchars($this->getLanguageService()->getLL('edit')) . '">' . $this->iconFactory->getIcon($iconIdentifier, Icon::SIZE_SMALL, $overlayIdentifier)->render() . '</a>';
......
......@@ -1031,7 +1031,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
// Define action icons
$link = htmlspecialchars($this->moduleUri . '&CMD=edit&tx_scheduler[uid]=' . $schedulerRecord['uid']);
$editAction = '<a class="btn btn-default" href="' . $link . '" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:edit')) . '" class="icon">' .
$this->moduleTemplate->getIconFactory()->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '</a>';
$this->moduleTemplate->getIconFactory()->getIcon('actions-open', Icon::SIZE_SMALL)->render() . '</a>';
if ((int)$schedulerRecord['disable'] === 1) {
$translationKey = 'enable';
$icon = $this->moduleTemplate->getIconFactory()->getIcon('actions-edit-unhide', Icon::SIZE_SMALL);
......
......@@ -227,7 +227,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface
);
$title = 'title="' . $this->getLanguageService()->getLL('edit-sys_action') . '"';
$icon = $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render();
$icon = $this->iconFactory->getIcon('actions-open', Icon::SIZE_SMALL)->render();
$editActionLink = '<a class="btn btn-default btn-sm" href="' . $link . '"' . $title . '>';
$editActionLink .= $icon . ' ' . $this->getLanguageService()->getLL('edit-sys_action') . '</a>';
}
......
......@@ -34,7 +34,7 @@
<div class="btn-group pull-right">
<a href="{notes:editLink(id:note.uid)}" class="btn btn-default btn-sm">
<core:icon identifier="actions-document-open" />
<core:icon identifier="actions-open" />
</a>
<a href="{notes:deleteLink(id:note.uid)}" class="btn btn-default btn-sm t3js-modal-trigger" data-severity="warning" data-title="{f:translate(key: 'LLL:EXT:lang/locallang_common.xlf:delete')}" data-content="{f:translate(key: 'LLL:EXT:lang/locallang_alt_doc.xlf:deleteWarning')}" data-button-close-text="{f:translate(key: 'LLL:EXT:lang/locallang_common.xlf:cancel')}">
<core:icon identifier="actions-edit-delete" />
......
......@@ -54,6 +54,6 @@
<tr>
<td><a href="{line.url}" title="{f:translate(key:'LLL:EXT:lang/locallang_common.xlf:editField')}"><strong>{line.label}</strong></a></td>
<td width="80%">{line.data}</td>
<td><a href="{line.url}" title="{f:translate(key:'LLL:EXT:lang/locallang_common.xlf:editField')}"><span class="btn btn-default"><core:icon identifier="actions-document-open" /></span></a></td>
<td><a href="{line.url}" title="{f:translate(key:'LLL:EXT:lang/locallang_common.xlf:editField')}"><span class="btn btn-default"><core:icon identifier="actions-open" /></span></a></td>
</tr>
</f:section>
......@@ -389,7 +389,7 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
<td>' . $row['pid'] . '</td>
<td>
<a href="' . htmlspecialchars($editUrl) . '" title="' . htmlspecialchars($lang->sL('LLL:EXT:lang/locallang_core.xlf:cm.edit')) . '">
' . $this->moduleTemplate->getIconFactory()->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '
' . $this->moduleTemplate->getIconFactory()->getIcon('actions-open', Icon::SIZE_SMALL)->render() . '
</a>' . htmlspecialchars($row['t3ver_label']) . '
</td>
<td class="col-control">' . $adminLinks . '</td>
......@@ -541,9 +541,11 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
],
'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
]);
$adminLink = '<a class="btn btn-default" href="' . htmlspecialchars($editUrl) . '" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:cm.edit')) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '</a>';
$adminLink = '<div class="btn-group btn-group-sm" role="group">';
$adminLink .= '<a class="btn btn-default" href="' . htmlspecialchars($editUrl) . '" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:cm.edit')) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-open', Icon::SIZE_SMALL)->render() . '</a>';
// Delete link:
$adminLink .= '<a class="btn btn-default" href="' . htmlspecialchars(BackendUtility::getLinkToDataHandlerAction('&cmd[' . $table . '][' . $row['uid'] . '][delete]=1')) . '" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:cm.delete')) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-edit-delete', Icon::SIZE_SMALL)->render() . '</a>';
$adminLink .= '</div>';
if ($table === 'pages') {
// If another page module was specified, replace the default Page module with the new one
$newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
......@@ -551,20 +553,22 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
// Perform some access checks:
$a_wl = $GLOBALS['BE_USER']->check('modules', 'web_list');
$a_wp = $GLOBALS['BE_USER']->check('modules', $pageModule);
$adminLink .= '<div class="btn-group btn-group-sm">';
$adminLink .= '<a class="btn btn-default" href="#" onclick="top.loadEditId(' . $row['uid'] . ');top.goToModule(' . GeneralUtility::quoteJSvalue($pageModule) . '); return false;">'
. $this->moduleTemplate->getIconFactory()->getIcon('actions-page-open', Icon::SIZE_SMALL)->render()
. '</a>';
$adminLink .= '<a class="btn btn-default" href="#" onclick="top.loadEditId(' . $row['uid'] . ');top.goToModule(\'web_list\'); return false;">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-system-list-open', Icon::SIZE_SMALL)->render() . '</a>';
// "View page" icon is added:
$adminLink .= '<a class="btn btn-default" href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($row['uid'], '', BackendUtility::BEgetRootLine($row['uid']))) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-document-view', Icon::SIZE_SMALL)->render() . '</a>';
$adminLink .= '</div>';
} else {
if ($row['pid'] == -1) {
$getVars = '&ADMCMD_vPrev[' . rawurlencode(($table . ':' . $row['t3ver_oid'])) . ']=' . $row['uid'];
// "View page" icon is added:
$adminLink .= '<a class="btn btn-default" href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($row['_REAL_PID'], '', BackendUtility::BEgetRootLine($row['_REAL_PID']), '', '', $getVars)) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-document-view', Icon::SIZE_SMALL)->render() . '</a>';
$adminLink .= '<div class="btn-group btn-group-sm" role="group"><a class="btn btn-default" href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($row['_REAL_PID'], '', BackendUtility::BEgetRootLine($row['_REAL_PID']), '', '', $getVars)) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-document-view', Icon::SIZE_SMALL)->render() . '</a></div>';
}
}
return '<div class="btn-group btn-group-sm" role="group">' . $adminLink . '</div>';
return $adminLink;
}
/**
......
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