X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=skins%2FModern.php;h=74f9b304f0665ad921ffcf71da488de04fc242af;hb=34e6fba175cc339856422e3bb5331e3251e0991c;hp=752d0ded258e1210b7eeee24510e64856513a474;hpb=2ef6a1a46ea9a03d62c66ec80d69fca25961ab66;p=lhc%2Fweb%2Fwiklou.git diff --git a/skins/Modern.php b/skins/Modern.php index 752d0ded25..74f9b304f0 100644 --- a/skins/Modern.php +++ b/skins/Modern.php @@ -21,12 +21,12 @@ class SkinModern extends SkinTemplate { var $skinname = 'modern', $stylename = 'modern', $template = 'ModernTemplate', $useHeadElement = true; + /** + * @param $out OutputPage + */ function setupSkinUserCss( OutputPage $out ){ - // Do not call parent::setupSkinUserCss(), we have our own print style - $out->addStyle( 'common/shared.css', 'screen' ); - $out->addStyle( 'modern/main.css', 'screen' ); - $out->addStyle( 'modern/print.css', 'print' ); - $out->addStyle( 'modern/rtl.css', 'screen', '', 'rtl' ); + parent::setupSkinUserCss( $out ); + $out->addModuleStyles ('skins.modern'); } } @@ -35,7 +35,7 @@ class SkinModern extends SkinTemplate { * @ingroup Skins */ class ModernTemplate extends MonoBookTemplate { - var $skin; + /** * Template filter callback for Modern skin. * Takes an associative array of data set from a SkinTemplate-based @@ -45,25 +45,9 @@ class ModernTemplate extends MonoBookTemplate { * @access private */ function execute() { - global $wgRequest; - $this->skin = $skin = $this->data['skin']; - $action = $wgRequest->getText( 'action' ); - // Suppress warnings to prevent notices about missing indexes in $this->data wfSuppressWarnings(); - // Generate additional footer links - $footerlinks = $this->data["footerlinks"]; - // fold footerlinks into a single array using a bit of trickery - $footerlinks = call_user_func_array('array_merge', array_values($footerlinks)); - // Generate additional footer icons - $footericons = $this->data["footericons"]; - // Unset copyright.copyright since we don't need the icon and already output a copyright from footerlinks - unset($footericons["copyright"]["copyright"]); - if ( count($footericons["copyright"]) <= 0 ) { - unset($footericons["copyright"]); - } - $this->html( 'headelement' ); ?> @@ -73,41 +57,14 @@ class ModernTemplate extends MonoBookTemplate {
-
-
msg('views') ?>
- -
+cactions(); ?>
-
html("specialpageattributes") ?>> +
msg('tagline') ?>
@@ -135,24 +92,7 @@ class ModernTemplate extends MonoBookTemplate {
html("userlangattributes") ?>> - data['sidebar']; - if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true; - if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true; - if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true; - - foreach ($sidebar as $boxName => $cont) { - if ( $boxName == 'SEARCH' ) { - $this->searchBox(); - } elseif ( $boxName == 'TOOLBOX' ) { - $this->toolbox(); - } elseif ( $boxName == 'LANGUAGES' ) { - $this->languageBox(); - } else { - $this->customBox( $boxName, $cont ); - } - } - ?> + renderPortals( $this->data['sidebar'] ); ?>
@@ -166,14 +106,10 @@ class ModernTemplate extends MonoBookTemplate {
msg('personaltools') ?>
@@ -183,7 +119,7 @@ class ModernTemplate extends MonoBookTemplate {