html('specialpageattributes') ?>>
+
+
- html('userlangattributes') ?>>
+ data['sitenotice'] ): ?>
- data['sitenotice']) { ?>html('sitenotice') ?>
+ html( 'sitenotice' ) ?>
+
- html('title') ?>
+html( 'title' ) ?>
-
msg('tagline') ?>
+msg( 'tagline' ) ?>
- html('subtitle') ?>
+ html('userlangattributes') ?>>html( 'subtitle' ) ?>
- data['undelete']): ?>
+ data['undelete'] ): ?>
- html('undelete') ?>
+ html( 'undelete' ) ?>
data['newtalk'] ): ?>
- html('newtalk') ?>
+ html( 'newtalk' ) ?>
- data['showjumplinks']): ?>
+ data['showjumplinks'] ): ?>
- msg('jumpto') ?> msg('jumptonavigation') ?>,
- msg('jumptosearch') ?>
+ msg( 'jumpto' ) ?> msg( 'jumptonavigation' ) ?>,
+ msg( 'jumptosearch' ) ?>
- html('bodytext') ?>
+ html( 'bodytext' ) ?>
+ data['catlinks'] ): ?>
- data['catlinks']) { $this->html('catlinks'); } ?>
+ html( 'catlinks' ); ?>
+
+ data['dataAfterContent'] ): ?>
- data['dataAfterContent']) { $this->html('dataAfterContent'); } ?>
+ html( 'dataAfterContent' ); ?>
+
-
-
-
-
+ msg('personaltools') ?>
-- html('userlangattributes') ?>>
- data['personal_urls'] as $key => $item): ?>
-
- > class=""> - -
+ renderNavigation( 'PERSONAL' ); ?>
-
-
-
-
-
-
- data['variant_urls'] ) > 0 ): ?>
- msg('namespaces') ?>
-- html('userlangattributes') ?>>
- data['namespace_urls'] as $key => $link ): ?>
-
- >> - -
-
-
-
+ renderNavigation( array( 'NAMESPACES', 'VARIANTS' ) ); ?>
msg('variants') ?>
-
-
- - html('userlangattributes') ?>>
- data['variant_urls'] as $key => $link ): ?>
-
- class="">> - -
-
- data['view_urls'] ) > 0 ): ?>
-
-
-
-
-
- data['action_urls'] ) > 0 ): ?>
- msg('views') ?>
-- html('userlangattributes') ?>>
- data['view_urls'] as $key => $link ): ?>
-
- class="">> - -
-
-
-
-
- msg('actions') ?>
-
-
- - html('userlangattributes') ?>>
- data['action_urls'] as $key => $link ): ?>
-
- class="">> - -
-
-
+ renderNavigation( array( 'VIEWS', 'ACTIONS', 'SEARCH' ) ); ?>
html('userlangattributes') ?>>
- -
-
- data['sidebar'];
- $sidebar['TOOLBOX'] = ( !isset( $sidebar['TOOLBOX'] ) );
- $sidebar['LANGUAGES'] = ( !isset( $sidebar['LANGUAGES'] ) );
- foreach ( $sidebar as $name => $content ) {
- switch( $name ) {
- case 'SEARCH':
- break;
- case 'TOOLBOX':
- $this->toolBox();
- break;
- case 'LANGUAGES':
- $this->languageBox();
- break;
- default:
- $this->customBox( $name, $content );
- break;
- }
- }
- ?>
-
-
+
+
+
+
+ renderPortals( $this->data['sidebar'] ); ?>
+
-
-
-
+
+
html('userlangattributes') ?>>
$links ): ?>
0 ): ?>
-
-
-
-
-
+
-
+
html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?>
html( 'reporttime' ) ?>
data['debug'] ): ?>
-
+
$content ) {
+ echo "\n\n";
+ switch( $name ) {
+ case 'SEARCH':
+ break;
+ case 'TOOLBOX':
?>
- -
+
- html( $link ) ?> +
- html( $link ) ?>
- html( 'poweredbyico' ) ?> - - data['copyrightico'] ): ?> -
- html( 'copyrightico' ) ?> - -
- >
data[$link] ) && $this->data[$link] ): ?>
-
-
- data['poweredbyico'] ): ?>
-
-
html('userlangattributes') ?>>msg( 'toolbox' ) ?>
-
-
data['language_urls'] ) {
+ break;
+ case 'LANGUAGES':
+ if ( $this->data['language_urls'] ) {
?>
-
- data['notspecialpage'] ): ?>
-
- skin->tooltipAndAccesskey( 't-whatlinkshere' ) ?>>msg( 'whatlinkshere' ) ?> - data['nav_urls']['recentchangeslinked'] ): ?> -
- skin->tooltipAndAccesskey( 't-recentchangeslinked' ) ?>>msg( 'recentchangeslinked-toolbox' ) ?> - - - data['nav_urls']['trackbacklink'] ) ): ?> -
- skin->tooltipAndAccesskey( 't-trackbacklink' ) ?>>msg( 'trackbacklink' ) ?> - - data['feeds']): ?> -
- - data['feeds'] as $key => $feed ): ?> - " href="" rel="alternate" type="application/+xml" class="feedlink"skin->tooltipAndAccesskey( 'feed-' . $key ) ?>> - - +
- skin->tooltipAndAccesskey( 't-whatlinkshere' ) ?>>msg( 'whatlinkshere' ) ?> + data['nav_urls']['recentchangeslinked'] ): ?> +
- skin->tooltipAndAccesskey( 't-recentchangeslinked' ) ?>>msg( 'recentchangeslinked-toolbox' ) ?> - - data['nav_urls'][$special]): ?> -
- skin->tooltipAndAccesskey( 't-' . $special ) ?>>msg( $special ) ?> - + + data['nav_urls']['trackbacklink'] ) ): ?> +
- skin->tooltipAndAccesskey( 't-trackbacklink' ) ?>>msg( 'trackbacklink' ) ?> + + data['feeds']): ?> +
- + data['feeds'] as $key => $feed ): ?> + " href="" rel="alternate" type="application/+xml" class="feedlink"skin->tooltipAndAccesskey( 'feed-' . $key ) ?>> - data['nav_urls']['print']['href'] ) ): ?> -
- skin->tooltipAndAccesskey( 't-print' ) ?>>msg( 'printableversion' ) ?> - - data['nav_urls']['permalink']['href'] ) ): ?> -
- skin->tooltipAndAccesskey( 't-permalink' ) ?>>msg( 'permalink' ) ?> - data['nav_urls']['permalink']['href'] === '' ): ?> -
- skin->tooltip( 't-ispermalink' ) ?>>msg( 'permalink' ) ?> + + + + data['nav_urls'][$special]): ?> +
- skin->tooltipAndAccesskey( 't-' . $special ) ?>>msg( $special ) ?> - - -
- skin->tooltipAndAccesskey( 't-print' ) ?>>msg( 'printableversion' ) ?> + + data['nav_urls']['permalink']['href'] ) ): ?> +
- skin->tooltipAndAccesskey( 't-permalink' ) ?>>msg( 'permalink' ) ?> + data['nav_urls']['permalink']['href'] === '' ): ?> +
- skin->tooltip( 't-ispermalink' ) ?>>msg( 'permalink' ) ?> + + +
+
+html('userlangattributes') ?>>msg( 'toolbox' ) ?>
+
+
+
+ data['nav_urls']['print']['href'] ) ): ?>
+ -
+ data['notspecialpage'] ): ?>
+
-
-html('userlangattributes') ?>>msg( 'otherlanguages' ) ?>
+html('userlangattributes') ?>>msg( 'otherlanguages' ) ?>
skin->tooltip( 'p-' . $bar ) ?>>
-
html('userlangattributes') ?>>
+skin->tooltip( 'p-' . $name ) ?>>
+
\n";
+ }
+ }
+
+ /**
+ * Render one or more navigations elements by name, automatically reveresed
+ * when UI is in RTL mode
+ */
+ private function renderNavigation( $elements ) {
+ global $wgVectorUseSimpleSearch, $wgVectorShowVariantName, $wgUser;
+
+ // If only one element was given, wrap it in an array, allowing more
+ // flexible arguments
+ if ( !is_array( $elements ) ) {
+ $elements = array( $elements );
+ // If there's a series of elements, reverse them when in RTL mode
+ } else if ( wfUILang()->isRTL() ) {
+ $elements = array_reverse( $elements );
+ }
+ // Render elements
+ foreach ( $elements as $name => $element ) {
+ echo "\n\n";
+ switch ( $element ) {
+ case 'NAMESPACES':
+?>
+html('userlangattributes') ?>>
-
@@ -802,5 +663,127 @@ class VectorTemplate extends QuickTemplate {
+
+
+msg('namespaces') ?>
+- html('userlangattributes') ?>>
+ data['namespace_urls'] as $key => $link ): ?>
+
- >> + +
+
+
+
++ data['variant_urls'] as $key => $link ): ?> + + + + +
+ +msg('variants') ?>
+
+
+- html('userlangattributes') ?>>
+ data['variant_urls'] as $key => $link ): ?>
+
- >> + +
+
+
+msg('views') ?>
+- html('userlangattributes') ?>>
+ data['view_urls'] as $key => $link ): ?>
+
- >>' : htmlspecialchars( $link['text'] ) ) ?> + +
+
+
+msg('actions') ?>
+
+
+- html('userlangattributes') ?>>
+ data['action_urls'] as $key => $link ): ?>
+
- >> + +
+
+
+msg('personaltools') ?>
+- html('userlangattributes') ?>>
+ data['personal_urls'] as $key => $item): ?>
+
- > class=""> + +
+
+\n";
+ }
}
}