From 352d921b5b82dd287e9ac21cc8509c41546b1b10 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Frank=20Na=CC=88gler?= <frank.naegler@typo3.org>
Date: Mon, 26 Oct 2015 09:48:04 +0100
Subject: [PATCH] [TASK] Streamline icons in page module

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>
---
 .../backend/Classes/View/PageLayoutView.php   | 47 +++++++++++++------
 1 file changed, 32 insertions(+), 15 deletions(-)

diff --git a/typo3/sysext/backend/Classes/View/PageLayoutView.php b/typo3/sysext/backend/Classes/View/PageLayoutView.php
index cafce2bc576f..58e5bc76b07a 100644
--- a/typo3/sysext/backend/Classes/View/PageLayoutView.php
+++ b/typo3/sysext/backend/Classes/View/PageLayoutView.php
@@ -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>';
-- 
GitLab