Arrange Special:Version/credits into columns and remove space at top
authorThis, that and the other <at.light@live.com.au>
Thu, 12 Jan 2017 03:33:59 +0000 (14:33 +1100)
committerThis, that and the other <at.light@live.com.au>
Thu, 12 Jan 2017 03:33:59 +0000 (14:33 +1100)
Make the long list of names more manageable and readable.

Change-Id: I3bb5da73ecf0c46b77a675324dcd62c9c4ea60da

CREDITS
includes/specials/SpecialVersion.php
resources/src/mediawiki.special/mediawiki.special.version.css

diff --git a/CREDITS b/CREDITS
index d9ff970..b37edf2 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -1,10 +1,9 @@
-{{int:version-credits-summary}}
-<!--
+{{int:version-credits-summary}} <!--
 MediaWiki 1.28 is a collaborative project released under the
 GNU General Public License v2. We would like to recognize the
 following names for their contribution to the product.
--->
-<!-- Please notice that the following can be found parsed under Special:Version/Credits -->
+
+The following list can be found parsed under Special:Version/Credits -->
 
 == Contributors ==
 <!-- Updates to this list made with maintenance/updateCredits.php -->
index 272f074..708eced 100644 (file)
@@ -78,9 +78,16 @@ class SpecialVersion extends SpecialPage {
                // Now figure out what to do
                switch ( strtolower( $parts[0] ) ) {
                        case 'credits':
+                               $out->addModuleStyles( 'mediawiki.special.version' );
+
                                $wikiText = '{{int:version-credits-not-found}}';
                                if ( $extName === 'MediaWiki' ) {
                                        $wikiText = file_get_contents( $IP . '/CREDITS' );
+                                       // Put the contributor list into columns
+                                       $wikiText = str_replace(
+                                               [ '<!-- BEGIN CONTRIBUTOR LIST -->', '<!-- END CONTRIBUTOR LIST -->' ],
+                                               [ '<div class="mw-version-credits">', '</div>' ],
+                                               $wikiText );
                                } elseif ( ( $extNode !== null ) && isset( $extNode['path'] ) ) {
                                        $file = $this->getExtAuthorsFileName( dirname( $extNode['path'] ) );
                                        if ( $file ) {
index 5b259e7..ebb6b48 100644 (file)
@@ -18,3 +18,9 @@ th.mw-version-ext-col-label {
 .mw-version-ext-vcs-version {
        unicode-bidi: embed;
 }
+
+.mw-version-credits {
+       column-width: 18em;
+       -moz-column-width: 18em;
+       -webkit-column-width: 18em;
+}