mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-24 07:43:47 +00:00
Merge "Languages should be in HTML at top whenever languages are added to page"
This commit is contained in:
commit
137a8fb6be
|
@ -65,9 +65,6 @@ class SkinVector22 extends SkinMustache {
|
|||
* @return bool
|
||||
*/
|
||||
private function canHaveLanguages(): bool {
|
||||
if ( $this->getContext()->getActionName() !== 'view' ) {
|
||||
return false;
|
||||
}
|
||||
$title = $this->getTitle();
|
||||
// Defensive programming - if a special page has added languages explicitly, best to show it.
|
||||
if ( $title && $title->isSpecialPage() && empty( $this->getLanguagesCached() ) ) {
|
||||
|
|
|
@ -125,3 +125,13 @@
|
|||
.mixin-vector-menu-heading-arrow();
|
||||
}
|
||||
}
|
||||
|
||||
// Hide the "Add languages" on pages which are not action=view where there are 0 languages
|
||||
.vector-dropdown > .vector-menu-heading.mw-portlet-lang-heading-0 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
// Show it on view pages where there are 0 languages so user can add languages (JavaScript required)
|
||||
.client-js .action-view .vector-dropdown > .vector-menu-heading.mw-portlet-lang-heading-0 {
|
||||
display: flex;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue