https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114706
Revision: 114706
Author: jeroendedauw
Date: 2012-04-04 16:38:24 +0000 (Wed, 04 Apr 2012)
Log Message:
-----------
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
trunk/extensions/EducationProgram/EducationProgram.settings.php
trunk/extensions/EducationProgram/specials/SpecialEducationProgram.php
trunk/extensions/EducationProgram/specials/SpecialEnroll.php
Added Paths:
-----------
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-0.png
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-10.png
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-20.png
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-30.png
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-40.png
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-5.png
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-50.png
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-60.png
Modified: trunk/extensions/EducationProgram/EducationProgram.i18n.php
===================================================================
--- trunk/extensions/EducationProgram/EducationProgram.i18n.php 2012-04-04
16:36:31 UTC (rev 114705)
+++ trunk/extensions/EducationProgram/EducationProgram.i18n.php 2012-04-04
16:38:24 UTC (rev 114706)
@@ -239,6 +239,7 @@
'ep-educationprogram-female' => 'Female',
'ep-educationprogram-unknown' => 'Unknown',
'ep-educationprogram-genders' => 'Gender breakdown',
+ 'ep-educationprogram-nodata' => 'There is no data to display yet!',
// Special:Institutions
'ep-institutions-noresults' => 'There are no institutions to list.',
Modified: trunk/extensions/EducationProgram/EducationProgram.settings.php
===================================================================
--- trunk/extensions/EducationProgram/EducationProgram.settings.php
2012-04-04 16:36:31 UTC (rev 114705)
+++ trunk/extensions/EducationProgram/EducationProgram.settings.php
2012-04-04 16:38:24 UTC (rev 114706)
@@ -38,7 +38,10 @@
'wikimedia.org'
),
'ambassadorCommonsUrl' =>
'https://commons.wikimedia.org/wiki/Special:UploadWizard',
- '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' ),
+ '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'
+ ),
'ambassadorImgWidth' => 140,
'ambassadorImgHeight' => 140,
'recentActivityLimit' => 24 * 60 * 60,
Added:
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-0.png
===================================================================
(Binary files differ)
Property changes on:
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-0.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-10.png
===================================================================
(Binary files differ)
Property changes on:
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-10.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-20.png
===================================================================
(Binary files differ)
Property changes on:
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-20.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-30.png
===================================================================
(Binary files differ)
Property changes on:
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-30.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-40.png
===================================================================
(Binary files differ)
Property changes on:
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-40.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-5.png
===================================================================
(Binary files differ)
Property changes on:
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-5.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-50.png
===================================================================
(Binary files differ)
Property changes on:
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-50.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-60.png
===================================================================
(Binary files differ)
Property changes on:
trunk/extensions/EducationProgram/resources/images/student-o-meter_morethan-60.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/extensions/EducationProgram/specials/SpecialEducationProgram.php
===================================================================
--- trunk/extensions/EducationProgram/specials/SpecialEducationProgram.php
2012-04-04 16:36:31 UTC (rev 114705)
+++ trunk/extensions/EducationProgram/specials/SpecialEducationProgram.php
2012-04-04 16:38:24 UTC (rev 114706)
@@ -133,15 +133,20 @@
public function displayByTerm() {
$termsData = $this->getTermData();
- $html = Html::element( 'h2', array(), $this->msgTxt( 'by-term'
) );
+ if ( empty( $termsData['terms'] ) ) {
+ $html = $this->msgTxt( 'nodata' );
+ }
+ else {
+ $html = Html::element( 'h2', array(), $this->msgTxt( 'by-term' ) );
- $html .= $this->getByTermTable( $termsData['terms'] );
+ $html .= $this->getByTermTable( $termsData['terms'] );
- $html .= Html::element( 'h2', array(), $this->msgTxt( 'genders'
) );
+ $html .= Html::element( 'h2', array(), $this->msgTxt( 'genders' )
);
- $html .= $this->getByGenderTable( $termsData['bygender'] );
+ $html .= $this->getByGenderTable( $termsData['bygender'] );
+ }
- return $html;
+ return $html;
}
protected function getByGenderTable( $terms ) {
Modified: trunk/extensions/EducationProgram/specials/SpecialEnroll.php
===================================================================
--- trunk/extensions/EducationProgram/specials/SpecialEnroll.php
2012-04-04 16:36:31 UTC (rev 114705)
+++ trunk/extensions/EducationProgram/specials/SpecialEnroll.php
2012-04-04 16:38:24 UTC (rev 114706)
@@ -146,12 +146,13 @@
'action' => $this->getTitle( $this->subPage
)->getLocalURL(),
)
) );
+ $lang = $this->getLanguage();
$out->addHTML( '<fieldset>' );
$out->addHTML( '<legend>' . wfMsgHtml( 'ep-enroll-add-token' )
. '</legend>' );
- $out->addElement( 'p', array(), wfMsg(
'ep-enroll-add-token-doc' ) );
+ $out->addHTML( Html::element( 'p', array(), wfMsg(
'ep-enroll-add-token-doc' ) ) );
$out->addHTML( ' ' . Xml::inputLabel( wfMsg(
'ep-enroll-token' ), 'wptoken', 'wptoken' ) );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs