[TASK] Streamline icons in page module 79/44279/3
authorFrank Nägler <frank.naegler@typo3.org>
Mon, 26 Oct 2015 08:48:04 +0000 (09:48 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Mon, 26 Oct 2015 13:22:00 +0000 (14:22 +0100)
Resolves: #71016
Releases: master
Change-Id: I104615227758379ec039619d59b81c54833de43b
Reviewed-on: https://review.typo3.org/44279
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/backend/Classes/View/PageLayoutView.php

index cafce2b..58e5bc7 100644 (file)
@@ -720,35 +720,52 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                 $viewLink = '';
                 if (!VersionState::cast($this->getPageLayoutController()->pageinfo['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)) {
                     $onClick = BackendUtility::viewOnClick($this->id, '', BackendUtility::BEgetRootLine($this->id), '', '', ('&L=' . $lP));
-                    $viewLink = '<a href="#" onclick="' . htmlspecialchars($onClick) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', true) . '">' . $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL)->render() . '</a>';
+                    $viewLink = '<a href="#" class="btn btn-default btn-sm" onclick="' . htmlspecialchars($onClick) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', true) . '">' . $this->iconFactory->getIcon('actions-view', Icon::SIZE_SMALL)->render() . '</a>';
                 }
                 // Language overlay page header:
                 if ($lP) {
                     list($lpRecord) = BackendUtility::getRecordsByField('pages_language_overlay', 'pid', $id, 'AND sys_language_uid=' . $lP);
                     BackendUtility::workspaceOL('pages_language_overlay', $lpRecord);
                     $params = '&edit[pages_language_overlay][' . $lpRecord['uid'] . ']=edit&overrideVals[pages_language_overlay][sys_language_uid]=' . $lP;
-                    $lPLabel = BackendUtility::wrapClickMenuOnIcon(
+                    $recordIcon = BackendUtility::wrapClickMenuOnIcon(
                         $this->iconFactory->getIconForRecord('pages_language_overlay', $lpRecord, Icon::SIZE_SMALL)->render(),
                         'pages_language_overlay',
                         $lpRecord['uid']
-                    ) . $viewLink . ($this->getBackendUser()->check('tables_modify', 'pages_language_overlay')
-                            ? '<a href="#" onclick="' . htmlspecialchars(BackendUtility::editOnClick($params))
-                                . '" title="' . $this->getLanguageService()->getLL('edit', true) . '">'
-                                . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '</a>'
-                            : ''
-                        ) . htmlspecialchars(GeneralUtility::fixed_lgd_cs($lpRecord['title'], 20));
+                    );
+                    $editLink = ($this->getBackendUser()->check('tables_modify', 'pages_language_overlay')
+                        ? '<a href="#" class="btn btn-default btn-sm" onclick="' . htmlspecialchars(BackendUtility::editOnClick($params))
+                        . '" title="' . $this->getLanguageService()->getLL('edit', true) . '">'
+                        . $this->iconFactory->getIcon('actions-open', Icon::SIZE_SMALL)->render() . '</a>'
+                        : ''
+                    );
+
+                    $lPLabel =
+                        '<div class="btn-group">'
+                            . $viewLink
+                            . $editLink
+                        . '</div>'
+                        . ' ' . $recordIcon . ' ' . htmlspecialchars(GeneralUtility::fixed_lgd_cs($lpRecord['title'], 20));
                 } else {
                     $params = '&edit[pages][' . $this->id . ']=edit';
-                    $lPLabel = BackendUtility::wrapClickMenuOnIcon(
+
+                    $recordIcon = BackendUtility::wrapClickMenuOnIcon(
                         $this->iconFactory->getIconForRecord('pages', $this->pageRecord, Icon::SIZE_SMALL)->render(),
                         'pages',
                         $this->id
-                    ) . $viewLink . ($this->getBackendUser()->check('tables_modify', 'pages_language_overlay')
-                            ? '<a href="#" onclick="' . htmlspecialchars(BackendUtility::editOnClick($params))
-                            . '" title="' . $this->getLanguageService()->getLL('edit', true) . '">'
-                            . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '</a>'
-                            : ''
-                        ) . htmlspecialchars(GeneralUtility::fixed_lgd_cs($this->pageRecord['title'], 20));
+                    );
+                    $editLink = ($this->getBackendUser()->check('tables_modify', 'pages_language_overlay')
+                        ? '<a href="#" class="btn btn-default btn-sm" onclick="' . htmlspecialchars(BackendUtility::editOnClick($params))
+                        . '" title="' . $this->getLanguageService()->getLL('edit', true) . '">'
+                        . $this->iconFactory->getIcon('actions-open', Icon::SIZE_SMALL)->render() . '</a>'
+                        : ''
+                    );
+
+                    $lPLabel =
+                        '<div class="btn-group">'
+                            . $viewLink
+                            . $editLink
+                        . '</div>'
+                        . ' ' . $recordIcon . ' ' . htmlspecialchars(GeneralUtility::fixed_lgd_cs($this->pageRecord['title'], 20));
                 }
                 $sCont[$lP] = '
                                        <td nowrap="nowrap" class="t3-page-column t3-page-lang-label">' . $lPLabel . '</td>';