From 67eecb957b801b02d6288431f9be473c70a8617b Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Sun, 15 Feb 2009 21:25:06 +0000 Subject: [PATCH] * Special:Prefixindex: Move table styling to shared.css * Add CSS IDs to tables * Use correct message 'allpagesprefix' for input form label * Replace _ with ' ' in next page link --- RELEASE-NOTES | 3 +++ includes/DefaultSettings.php | 2 +- includes/specials/SpecialPrefixindex.php | 28 ++++++++++++------------ skins/common/shared.css | 13 +++++++++++ skins/modern/rtl.css | 6 +++++ skins/monobook/rtl.css | 5 +++++ skins/simple/rtl.css | 5 +++++ 7 files changed, 47 insertions(+), 15 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index fe0dfdd8fd..a62c463f92 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -174,6 +174,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN maintenance/cleanupWatchlist.php * (bug 17488) RSS/Atom links in left toolbar are now localized * (bug 17472) use print << 'nsselect', 'class' => 'allpages' ) ); $out .= " " . - Xml::label( wfMsg( 'allpagesfrom' ), 'nsfrom' ) . + Xml::label( wfMsg( 'allpagesprefix' ), 'nsfrom' ) . " " . Xml::input( 'from', 30, str_replace('_',' ',$from), array( 'id' => 'nsfrom' ) ) . @@ -99,7 +96,6 @@ class SpecialPrefixindex extends SpecialAllpages { $fromList = $this->getNamespaceKeyAndText($namespace, $from); $prefixList = $this->getNamespaceKeyAndText($namespace, $prefix); $namespaces = $wgContLang->getNamespaces(); - $align = $wgContLang->isRtl() ? 'left' : 'right'; if ( !$prefixList || !$fromList ) { $out = wfMsgWikiHtml( 'allpagesbadtitle' ); @@ -134,7 +130,7 @@ class SpecialPrefixindex extends SpecialAllpages { $n = 0; if( $res->numRows() > 0 ) { - $out = ''; + $out = Xml::openElement( 'table', array( 'border' => '0', 'id' => 'mw-prefixindex-list-table' ) ); while( ( $n < $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) { $t = Title::makeTitle( $s->page_namespace, $s->page_title ); @@ -157,7 +153,7 @@ class SpecialPrefixindex extends SpecialAllpages { if( ($n % 3) != 0 ) { $out .= ''; } - $out .= '
'; + $out .= Xml::closeElement( 'table' ); } else { $out = ''; } @@ -168,23 +164,27 @@ class SpecialPrefixindex extends SpecialAllpages { } else { $nsForm = $this->namespacePrefixForm( $namespace, $prefix ); $self = $this->getTitle(); - $out2 = ''; - $out2 .= ' + +
' . $nsForm; - $out2 .= '' . - $sk->makeKnownLinkObj( $self, - wfMsg ( 'allpages' ) ); + $out2 = Xml::openElement( 'table', array( 'border' => '0', 'id' => 'mw-prefixindex-nav-table' ) ) . + '
' . + $nsForm . + '' . + $sk->makeKnownLinkObj( $self, wfMsg ( 'allpages' ) ); + if( isset( $res ) && $res && ( $n == $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) { $namespaceparam = $namespace ? "&namespace=$namespace" : ""; $out2 = $wgLang->pipeList( array( $out2, $sk->makeKnownLinkObj( $self, - wfMsgHtml( 'nextpage', htmlspecialchars( $s->page_title ) ), + wfMsgHtml( 'nextpage', str_replace( '_',' ', htmlspecialchars( $s->page_title ) ) ), "from=" . wfUrlEncode( $s->page_title ) . "&prefix=" . wfUrlEncode( $prefix ) . $namespaceparam ) ) ); } - $out2 .= "
"; + $out2 .= "" . + Xml::closeElement( 'table' ); } $wgOut->addHTML( $out2 . $out ); diff --git a/skins/common/shared.css b/skins/common/shared.css index 724b0f4e45..a053de9f8f 100644 --- a/skins/common/shared.css +++ b/skins/common/shared.css @@ -297,6 +297,19 @@ td#mw-emailuser-sender, td#mw-emailuser-recipient { font-weight: bold; } +/* Special:Prefixindex styling */ +table#mw-prefixindex-list-table, +table#mw-prefixindex-nav-table { + width: 98%; + background-color: transparent; +} +td#mw-prefixindex-nav-form { + font-size: smaller; + margin-bottom: 1em; + text-align: right; + vertical-align: top; +} + /* * Recreating deleted page warning * Reupload file warning diff --git a/skins/modern/rtl.css b/skins/modern/rtl.css index 1ea03bf2c6..d2dcacecec 100644 --- a/skins/modern/rtl.css +++ b/skins/modern/rtl.css @@ -151,3 +151,9 @@ html > body div.pBody ul li { html > body div#mw_contentholder ul#filetoc { display: block; } + +/* Special:Prefixindex styling */ +td#mw-prefixindex-nav-form { + text-align: left; +} + diff --git a/skins/monobook/rtl.css b/skins/monobook/rtl.css index 660b671a99..60ffb4699b 100644 --- a/skins/monobook/rtl.css +++ b/skins/monobook/rtl.css @@ -239,3 +239,8 @@ html > body div#bodyContent ul { html > body div#bodyContent ul#filetoc { display: block; } +/* Special:Prefixindex styling */ +td#mw-prefixindex-nav-form { + text-align: left; +} + diff --git a/skins/simple/rtl.css b/skins/simple/rtl.css index 9859ccd2c6..53b3dc0cf5 100644 --- a/skins/simple/rtl.css +++ b/skins/simple/rtl.css @@ -174,3 +174,8 @@ table.filehistory th { html > body div#bodyContent ul { display: table; } +/* Special:Prefixindex styling */ +td#mw-prefixindex-nav-form { + text-align: left; +} + -- 2.20.1