* (bug 13880) "Printable" link in Modern skin now formats as print mode
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 30 Apr 2008 18:29:38 +0000 (18:29 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 30 Apr 2008 18:29:38 +0000 (18:29 +0000)
Problem was that the Modern skin uses a different way of setting up the print stylesheet from the other skins.

Others:
* always include main stylesheet
* override that stuff with print stylesheet for print media or ?printable=yes

Modern:
* include main stylesheet only for screen & projection media only
* add some additional print styles for print media or ?printable=yes

The screen stylesheet was still being used when ?printable=yes is set, but would be hidden when actually printing. I've changed it to now exclude the screen stylesheets when ?printable=yes is switched in, so it looks the same on screen as when actually printing.

RELEASE-NOTES
skins/Modern.php

index 3a0d2a9..0d9f110 100644 (file)
@@ -228,6 +228,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 13168) accessibility links in Modern skin link to wrong anchor id
 * (bug 13185) No line break after 'subpages' class in Modern skin
 * (bug 13583) No "poweredby" in Modern skin
+* (bug 13880) "Printable" link in Modern skin now formats as print mode
+
 
 === API changes in 1.13 ===
 
index 433d14b..351372f 100644 (file)
@@ -61,10 +61,12 @@ class ModernTemplate extends QuickTemplate {
                <meta http-equiv="Content-Type" content="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" />
                <?php $this->html('headlinks') ?>
                <title><?php $this->text('pagetitle') ?></title>
+               <?php if(empty($this->data['printable']) ) { ?>
                <style type="text/css" media="screen, projection">/*<![CDATA[*/
                        @import "<?php $this->text('stylepath') ?>/common/shared.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";
                        @import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";
                /*]]>*/</style>
+               <?php } ?>
                <link rel="stylesheet" type="text/css" <?php if(empty($this->data['printable']) ) { ?>media="print"<?php } ?> href="<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/print.css?<?php echo $GLOBALS['wgStyleVersion'] ?>" />
                <!--[if lt IE 7]><meta http-equiv="imagetoolbar" content="no" /><![endif]-->