From 38848e8f4aaabc8a1e7294cfa3a421f2b3563057 Mon Sep 17 00:00:00 2001 From: "This, that and the other" Date: Thu, 12 Jan 2017 14:33:59 +1100 Subject: [PATCH] Arrange Special:Version/credits into columns and remove space at top Make the long list of names more manageable and readable. Change-Id: I3bb5da73ecf0c46b77a675324dcd62c9c4ea60da --- CREDITS | 7 +++---- includes/specials/SpecialVersion.php | 7 +++++++ .../src/mediawiki.special/mediawiki.special.version.css | 6 ++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CREDITS b/CREDITS index d9ff9709f1..b37edf2a36 100644 --- a/CREDITS +++ b/CREDITS @@ -1,10 +1,9 @@ -{{int:version-credits-summary}} - - + +The following list can be found parsed under Special:Version/Credits --> == Contributors == diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index 272f07415f..708eced849 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -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( + [ '', '' ], + [ '
', '
' ], + $wikiText ); } elseif ( ( $extNode !== null ) && isset( $extNode['path'] ) ) { $file = $this->getExtAuthorsFileName( dirname( $extNode['path'] ) ); if ( $file ) { diff --git a/resources/src/mediawiki.special/mediawiki.special.version.css b/resources/src/mediawiki.special/mediawiki.special.version.css index 5b259e70ab..ebb6b486c9 100644 --- a/resources/src/mediawiki.special/mediawiki.special.version.css +++ b/resources/src/mediawiki.special/mediawiki.special.version.css @@ -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; +} -- 2.20.1