diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php index 445115f..55a1505 100644 --- a/includes/skins/SkinMinerva.php +++ b/includes/skins/SkinMinerva.php @@ -1158,6 +1158,12 @@ class SkinMinerva extends SkinTemplate { $menu[] = $this->createWatchPageAction( $actions ); } + if ( + MediaWikiServices::getInstance()->getService( 'MobileFrontend.AMC.UserMode' )->isEnabled() + ) { + $menu[] = $this->getHistoryPageAction( $actions ); + } + if ( $this->isAllowedPageAction( 'edit' ) ) { $menu[] = $this->createEditPageAction(); } @@ -1265,6 +1271,22 @@ class SkinMinerva extends SkinTemplate { ]; } + /** + * Creates a history action: An icon that links to the mobile history page. + * + * @return array A map of HTML attributes and a 'text' property to be used with the + * pageActionMenu.mustache template. + */ + protected function getHistoryPageAction() { + $baseResult = [ + 'class' => MinervaUI::iconClass( 'clock-gray' ), + 'text' => $this->msg( 'mobile-frontend-history' ), + 'href' => $this->getHistoryUrl( $this->getTitle() ) + ]; + + return $baseResult; + } + /** * Checks whether the editor can handle the existing content handler type. * diff --git a/resources/skins.minerva.base.styles/pageactions.less b/resources/skins.minerva.base.styles/pageactions.less index 79f3e9d..c319aca 100644 --- a/resources/skins.minerva.base.styles/pageactions.less +++ b/resources/skins.minerva.base.styles/pageactions.less @@ -65,7 +65,8 @@ } } -// default layout - spacing out the first menu item +// Layout for less than 5 items - one item at the beginning, rest at the end. +// |1-----2--3--4| .page-actions-menu__list-item:first-child { flex-grow: 1; justify-content: flex-start;