jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376479 )

Change subject: Add breadcrumb as subpage subtitle, to go back to Preferences
......................................................................


Add breadcrumb as subpage subtitle, to go back to Preferences

Add a breadcrumb link for navigating back to local Preferences
page to the subpage subtitle area of Special:GlobalPreferences.

Bug: T173873
Change-Id: I1f43643d42e739c190951ef55dc6d596d1a3b31c
---
M includes/SpecialGlobalPreferences.php
1 file changed, 9 insertions(+), 0 deletions(-)

Approvals:
  jenkins-bot: Verified
  Kaldari: Looks good to me, approved



diff --git a/includes/SpecialGlobalPreferences.php 
b/includes/SpecialGlobalPreferences.php
index 8c41fdf..2daafa4 100644
--- a/includes/SpecialGlobalPreferences.php
+++ b/includes/SpecialGlobalPreferences.php
@@ -30,6 +30,15 @@
                        $this->setHeaders();
                        throw new ErrorPageError( 'globalprefs-error-header', 
'globalprefs-notglobal' );
                }
+
+               // Add link back to (local) Preferences.
+               $link = $this->getLinkRenderer()->makeKnownLink(
+                       static::getSafeTitleFor( 'Preferences' ),
+                       $this->msg( 'mypreferences' )->escaped()
+               );
+               // Same left-arrow as used in Skin::subPageSubtitle().
+               $this->getOutput()->addSubtitle( "< $link" );
+
                // Add module styles and scripts separately
                // so non-JS users get the styles quicker and to avoid a FOUC.
                $this->getOutput()->addModuleStyles( 
'ext.GlobalPreferences.special.nojs' );

-- 
To view, visit https://gerrit.wikimedia.org/r/376479
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f43643d42e739c190951ef55dc6d596d1a3b31c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/GlobalPreferences
Gerrit-Branch: master
Gerrit-Owner: Samwilson <s...@samwilson.id.au>
Gerrit-Reviewer: Kaldari <rkald...@wikimedia.org>
Gerrit-Reviewer: MaxSem <maxsem.w...@gmail.com>
Gerrit-Reviewer: Niharika29 <nko...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to