mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-28 08:00:32 +00:00
Add IDs to page-action menu items.
Bug: T215890 Change-Id: I3330f3ccc8226605f44745befc34dcfcc7c474d8
This commit is contained in:
parent
784d3fa5ae
commit
a809420f8d
|
@ -1197,6 +1197,7 @@ class SkinMinerva extends SkinTemplate {
|
|||
$userCanEdit = $userQuickEditCheck && !$userBlockInfo;
|
||||
|
||||
return [
|
||||
'item-id' => 'page-actions-edit',
|
||||
'id' => 'ca-edit',
|
||||
'href' => $title->getLocalURL( $editArgs ),
|
||||
'class' => 'edit-page '
|
||||
|
@ -1225,6 +1226,7 @@ class SkinMinerva extends SkinTemplate {
|
|||
$icon = 'watch';
|
||||
}
|
||||
$baseResult = [
|
||||
'item-id' => 'page-actions-watch',
|
||||
'id' => 'ca-watch',
|
||||
// Use blank icon to reserve space for watchstar icon once JS loads
|
||||
'class' => MinervaUI::iconClass( $icon, 'element', 'watch-this-article' ) . ' jsonly',
|
||||
|
@ -1268,6 +1270,7 @@ class SkinMinerva extends SkinTemplate {
|
|||
$languageSwitcherClasses .= ' disabled';
|
||||
}
|
||||
return [
|
||||
'item-id' => 'page-actions-languages',
|
||||
'class' => MinervaUI::iconClass( 'language-switcher', 'element', $languageSwitcherClasses ),
|
||||
'href' => $languageSwitcherLink,
|
||||
'title' => $this->msg( 'mobile-frontend-language-article-heading' ),
|
||||
|
@ -1283,6 +1286,7 @@ class SkinMinerva extends SkinTemplate {
|
|||
*/
|
||||
protected function getHistoryPageAction() {
|
||||
return [
|
||||
'item-id' => 'page-actions-history',
|
||||
'class' => MinervaUI::iconClass( 'clock' ),
|
||||
'text' => $this->msg( 'mobile-frontend-history' ),
|
||||
'href' => $this->getHistoryUrl( $this->getTitle() )
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<nav class="page-actions-menu">
|
||||
<ul id="page-actions" class="page-actions-menu__list">
|
||||
{{#pageactions}}
|
||||
<li class="page-actions-menu__list-item">
|
||||
<li id="{{item-id}}" class="page-actions-menu__list-item">
|
||||
<a id="{{id}}" href="{{href}}" class="{{class}}" role="button" title="{{title}}">
|
||||
{{text}}
|
||||
</a>
|
||||
|
|
Loading…
Reference in a new issue