Merge "Languages should be in HTML at top whenever languages are added to page"

This commit is contained in:
jenkins-bot 2023-02-06 23:52:36 +00:00 committed by Gerrit Code Review
commit 137a8fb6be
2 changed files with 10 additions and 3 deletions

View file

@ -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() ) ) {

View file

@ -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;
}