r114706 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114705‎ | r114706 | r114707 >
Date:16:38, 4 April 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fixed issue on special:educationprogram when no data has been entered yet and follow up to r114705: new images
Modified paths:
  • /trunk/extensions/EducationProgram/EducationProgram.i18n.php (modified) (history)
  • /trunk/extensions/EducationProgram/EducationProgram.settings.php (modified) (history)
  • /trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-0.png (added) (history)
  • /trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-10.png (added) (history)
  • /trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-20.png (added) (history)
  • /trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-30.png (added) (history)
  • /trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-40.png (added) (history)
  • /trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-5.png (added) (history)
  • /trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-50.png (added) (history)
  • /trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-60.png (added) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialEducationProgram.php (modified) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialEnroll.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/EducationProgram.settings.php
@@ -38,7 +38,10 @@
3939 'wikimedia.org'
4040 ),
4141 'ambassadorCommonsUrl' => 'https://commons.wikimedia.org/wiki/Special:UploadWizard',
42 - 'citylessCountries' => array( 'BT', 'BV', 'IO', 'VG', 'TD', 'CX', 'CC', 'KM', 'DJ', 'GQ', 'FK', 'FX', 'TF', 'GW', 'HM', 'KI', 'YT', 'MS', 'NR', 'NU', 'NF', 'PN', 'SH', 'PM', 'WS', 'SC', 'GS', 'SJ', 'TK', 'TP', 'TV', 'UM', 'VU', 'EH' ),
 42+ 'citylessCountries' => array(
 43+ 'BT', 'BV', 'IO', 'VG', 'TD', 'CX', 'CC', 'KM', 'DJ', 'GQ', 'FK', 'FX', 'TF', 'GW', 'HM', 'KI', 'YT',
 44+ 'MS', 'NR', 'NU', 'NF', 'PN', 'SH', 'PM', 'WS', 'SC', 'GS', 'SJ', 'TK', 'TP', 'TV', 'UM', 'VU', 'EH'
 45+ ),
4346 'ambassadorImgWidth' => 140,
4447 'ambassadorImgHeight' => 140,
4548 'recentActivityLimit' => 24 * 60 * 60,
Index: trunk/extensions/EducationProgram/specials/SpecialEnroll.php
@@ -146,12 +146,13 @@
147147 'action' => $this->getTitle( $this->subPage )->getLocalURL(),
148148 )
149149 ) );
 150+ $lang = $this->getLanguage();
150151
151152 $out->addHTML( '<fieldset>' );
152153
153154 $out->addHTML( '<legend>' . wfMsgHtml( 'ep-enroll-add-token' ) . '</legend>' );
154155
155 - $out->addElement( 'p', array(), wfMsg( 'ep-enroll-add-token-doc' ) );
 156+ $out->addHTML( Html::element( 'p', array(), wfMsg( 'ep-enroll-add-token-doc' ) ) );
156157
157158 $out->addHTML( '&#160;' . Xml::inputLabel( wfMsg( 'ep-enroll-token' ), 'wptoken', 'wptoken' ) );
158159
Index: trunk/extensions/EducationProgram/specials/SpecialEducationProgram.php
@@ -133,15 +133,20 @@
134134 public function displayByTerm() {
135135 $termsData = $this->getTermData();
136136
137 - $html = Html::element( 'h2', array(), $this->msgTxt( 'by-term' ) );
 137+ if ( empty( $termsData['terms'] ) ) {
 138+ $html = $this->msgTxt( 'nodata' );
 139+ }
 140+ else {
 141+ $html = Html::element( 'h2', array(), $this->msgTxt( 'by-term' ) );
138142
139 - $html .= $this->getByTermTable( $termsData['terms'] );
 143+ $html .= $this->getByTermTable( $termsData['terms'] );
140144
141 - $html .= Html::element( 'h2', array(), $this->msgTxt( 'genders' ) );
 145+ $html .= Html::element( 'h2', array(), $this->msgTxt( 'genders' ) );
142146
143 - $html .= $this->getByGenderTable( $termsData['bygender'] );
 147+ $html .= $this->getByGenderTable( $termsData['bygender'] );
 148+ }
144149
145 - return $html;
 150+ return $html;
146151 }
147152
148153 protected function getByGenderTable( $terms ) {
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php
@@ -239,6 +239,7 @@
240240 'ep-educationprogram-female' => 'Female',
241241 'ep-educationprogram-unknown' => 'Unknown',
242242 'ep-educationprogram-genders' => 'Gender breakdown',
 243+ 'ep-educationprogram-nodata' => 'There is no data to display yet!',
243244
244245 // Special:Institutions
245246 'ep-institutions-noresults' => 'There are no institutions to list.',
Index: trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-60.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-60.png
___________________________________________________________________
Added: svn:mime-type
246247 + application/octet-stream
Index: trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-0.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-0.png
___________________________________________________________________
Added: svn:mime-type
247248 + application/octet-stream
Index: trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-10.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-10.png
___________________________________________________________________
Added: svn:mime-type
248249 + application/octet-stream
Index: trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-20.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-20.png
___________________________________________________________________
Added: svn:mime-type
249250 + application/octet-stream
Index: trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-30.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-30.png
___________________________________________________________________
Added: svn:mime-type
250251 + application/octet-stream
Index: trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-40.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-40.png
___________________________________________________________________
Added: svn:mime-type
251252 + application/octet-stream
Index: trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-5.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-5.png
___________________________________________________________________
Added: svn:mime-type
252253 + application/octet-stream
Index: trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-50.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-50.png
___________________________________________________________________
Added: svn:mime-type
253254 + application/octet-stream

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r114705kill images with text in themjeroendedauw16:36, 4 April 2012

Status & tagging log