From 5ecf2e3fb07700b040f4eae45ae9920a8518c82e Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 28 Jun 2005 18:04:09 +0000 Subject: [PATCH] * Move MonoBook printable link from tab to sidebar --- RELEASE-NOTES | 2 ++ includes/SkinTemplate.php | 18 +++++++++--------- skins/MonoBook.php | 5 +++++ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 621fe1cf89..c75d9ffbe9 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -404,6 +404,8 @@ Various bugfixes, small features, and a few experimental things: * (bug 2577) Allow sysops to enter non-standard block times * Fixed a bug where Special:Contributions wouldn't remember the 'invert' status between next/previous buttons. +* Move MonoBook printable link from tab to sidebar + === Caveats === diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 9ee175e9a0..4672018da0 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -705,15 +705,6 @@ class SkinTemplate extends Skin { $vcount ++; } } - - // A print stylesheet is attached to all pages, but nobody ever - // figures that out. :) Add a link... - if( $this->iscontent && ($action == '' || $action == 'view' || $action == 'purge' ) ) { - $content_actions['print'] = array( - 'class' => false, - 'text' => wfMsg( 'print' ), - 'href' => $wgRequest->appendQuery( 'printable=yes' ) ); - } wfProfileOut( $fname ); return $content_actions; @@ -758,6 +749,15 @@ class SkinTemplate extends Skin { } $nav_urls['specialpages'] = array('href' => $this->makeSpecialUrl('Specialpages')); + + // A print stylesheet is attached to all pages, but nobody ever + // figures that out. :) Add a link... + if( $this->iscontent && ($action == '' || $action == 'view' || $action == 'purge' ) ) { + $nav_urls['print'] = array( + 'text' => wfMsg( 'printableversion' ), + 'href' => $wgRequest->appendQuery( 'printable=yes' ) ); + } + if( $this->mTitle->getNamespace() != NS_SPECIAL) { $nav_urls['whatlinkshere'] = array( 'href' => $this->makeSpecialUrl("Whatlinkshere/$this->thispage") diff --git a/skins/MonoBook.php b/skins/MonoBook.php index 66c1c8eb63..5d94cff2e0 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -170,6 +170,11 @@ class MonoBookTemplate extends QuickTemplate { echo htmlspecialchars($this->data['nav_urls'][$special]['href']) ?>">msg($special) ?> + data['nav_urls']['print']['href'])) { ?> +
  • msg('printableversion') ?>
  • + -- 2.20.1