Commit a4cd49c3 authored by Daniel Windloff's avatar Daniel Windloff Committed by Susanne Moog
Browse files

[TASK] Streamline preview icons

Usage:
- actions-view-page
Preview a single page record
- actions-view
Preview a single record (except pages)
- actions-document-view
Preview images or documents.
(Preview multiple records)

Resolves: #81429
Releases: master
Change-Id: I7a537b8b171981bcfe3b55d4d4156192f660ba3c
Reviewed-on: https://review.typo3.org/53057

Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Mona Muzaffar's avatarMona Muzaffar <mona.muzaffar@gmx.de>
Tested-by: Mona Muzaffar's avatarMona Muzaffar <mona.muzaffar@gmx.de>
Reviewed-by: Susanne Moog's avatarSusanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog's avatarSusanne Moog <susanne.moog@typo3.org>
parent fb2fb5c4
......@@ -33,7 +33,7 @@ class PageProvider extends RecordProvider
protected $itemsConfiguration = [
'view' => [
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.view',
'iconIdentifier' => 'actions-document-view',
'iconIdentifier' => 'actions-view-page',
'callbackAction' => 'viewRecord'
],
'edit' => [
......
......@@ -53,7 +53,7 @@ class RecordProvider extends AbstractProvider
protected $itemsConfiguration = [
'view' => [
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.view',
'iconIdentifier' => 'actions-document-view',
'iconIdentifier' => 'actions-view',
'callbackAction' => 'viewRecord'
],
'edit' => [
......
......@@ -368,7 +368,7 @@ class NewRecordController extends AbstractModule
))
->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showPage'))
->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
'actions-document-view',
'actions-view-page',
Icon::SIZE_SMALL
));
$buttonBar->addButton($viewButton, ButtonBar::BUTTON_POSITION_LEFT, 30);
......
......@@ -957,7 +957,7 @@ class PageLayoutController
$viewButton = $this->buttonBar->makeLinkButton()
->setOnClick(BackendUtility::viewOnClick($this->pageinfo['uid'], '', BackendUtility::BEgetRootLine($this->pageinfo['uid'])))
->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showPage'))
->setIcon($this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL))
->setIcon($this->iconFactory->getIcon('actions-view-page', Icon::SIZE_SMALL))
->setHref('#');
$this->buttonBar->addButton($viewButton, ButtonBar::BUTTON_POSITION_LEFT, 3);
......
......@@ -155,7 +155,7 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
$viewPageLink = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick(
$data['row']['uid'], '', '', '', '', '&L=###LANG_UID###')
) . '" class="btn btn-default" title="' . $lang->sL('LLL:EXT:frontend/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_viewPage') . '">' .
$this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL)->render() . '</a>';
$this->iconFactory->getIcon('actions-view', Icon::SIZE_SMALL)->render() . '</a>';
$status = GeneralUtility::hideIfDefaultLanguage($data['row']['l18n_cfg']) ? 'danger' : 'success';
// Create links:
$editUrl = BackendUtility::getModuleUrl('record_edit', [
......@@ -166,7 +166,10 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
],
'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
]);
$info = str_replace('###LANG_UID###', '0', $viewPageLink);
$info = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick(
$data['row']['uid'], '', '', '', '', '')
) . '" class="btn btn-default" title="' . $lang->sL('LLL:EXT:frontend/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_viewPage') . '">' .
$this->iconFactory->getIcon('actions-view-page', Icon::SIZE_SMALL)->render() . '</a>';
$info .= '<a href="' . htmlspecialchars($editUrl)
. '" class="btn btn-default" title="' . $lang->sL(
'LLL:EXT:frontend/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_editDefaultLanguagePage'
......
......@@ -201,7 +201,7 @@ class PageFunctionsController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
$viewButton = $buttonBar->makeLinkButton()
->setOnClick(BackendUtility::viewOnClick($this->pageinfo['uid'], '', BackendUtility::BEgetRootLine($this->pageinfo['uid'])))
->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showPage'))
->setIcon($this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL))
->setIcon($this->iconFactory->getIcon('actions-view-page', Icon::SIZE_SMALL))
->setHref('#');
$buttonBar->addButton($viewButton);
// Shortcut
......
......@@ -325,7 +325,7 @@ class ImportExportController extends BaseScriptClass
$viewButton = $buttonBar->makeLinkButton()
->setTitle($this->lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showPage'))
->setHref('#')
->setIcon($this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL))
->setIcon($this->iconFactory->getIcon('actions-view-page', Icon::SIZE_SMALL))
->setOnClick($onClick);
$buttonBar->addButton($viewButton);
}
......
......@@ -165,7 +165,7 @@ class InfoModuleController extends BaseScriptClass
BackendUtility::BEgetRootLine($this->pageinfo['uid'])
))
->setTitle($this->languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showPage'))
->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-view', Icon::SIZE_SMALL));
->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-view-page', Icon::SIZE_SMALL));
$buttonBar->addButton($viewButton, ButtonBar::BUTTON_POSITION_LEFT, 1);
// Shortcut
$shortCutButton = $buttonBar->makeShortcutButton()
......
......@@ -397,7 +397,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList
->setHref('#')
->setOnClick($onClick)
->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showPage'))
->setIcon($this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL));
->setIcon($this->iconFactory->getIcon('actions-view-page', Icon::SIZE_SMALL));
$buttonBar->addButton($viewButton, ButtonBar::BUTTON_POSITION_LEFT, 20);
}
// If edit permissions are set, see
......@@ -1470,8 +1470,13 @@ class DatabaseRecordList extends AbstractDatabaseRecordList
'',
($table === 'tt_content' ? '#c' . $row['uid'] : '')
)
) . '" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showPage')) . '">'
. $this->iconFactory->getIcon('actions-view', Icon::SIZE_SMALL)->render() . '</a>';
) . '" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showPage')) . '">';
if ($table === 'pages') {
$viewAction .= $this->iconFactory->getIcon('actions-view-page', Icon::SIZE_SMALL)->render();
} else {
$viewAction .= $this->iconFactory->getIcon('actions-view', Icon::SIZE_SMALL)->render();
}
$viewAction .= '</a>';
$this->addActionToCellGroup($cells, $viewAction, 'view');
}
// "Edit" link: ( Only if permissions to edit the page-record of the content of the parent page ($this->id)
......
......@@ -308,7 +308,7 @@ class TypoScriptTemplateModuleController extends BaseScriptClass
BackendUtility::BEgetRootLine($this->pageinfo['uid'])
))
->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showPage'))
->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-view', Icon::SIZE_SMALL));
->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-view-page', Icon::SIZE_SMALL));
$buttonBar->addButton($viewButton, ButtonBar::BUTTON_POSITION_LEFT, 99);
if ($this->extClassConf['name'] === TypoScriptTemplateInformationModuleFunctionController::class) {
......
......@@ -63,7 +63,7 @@ class ViewModuleController extends ActionController
->setHref($this->getTargetUrl())
->setOnClick('window.open(this.href, \'newTYPO3frontendWindow\').focus();return false;')
->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showPage'))
->setIcon($this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-document-view', Icon::SIZE_SMALL));
->setIcon($this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-view-page', Icon::SIZE_SMALL));
$buttonBar->addButton($showButton);
$refreshButton = $buttonBar->makeLinkButton()
......
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