Index: trunk/extensions/EducationProgram/specials/SpecialInstitution.php |
— | — | @@ -96,10 +96,35 @@ |
97 | 97 | $countries = CountryNames::getNames( $this->getLanguage()->getCode() ); |
98 | 98 | $stats['country'] = $countries[$org->getField( 'country' )]; |
99 | 99 | |
| 100 | + $stats['status'] = wfMsgHtml( $org->getField( 'active' ) ? 'ep-institution-active' : 'ep-institution-inactive' ); |
| 101 | + |
| 102 | + $stats['courses'] = $this->getLanguage()->formatNum( $org->getField( 'courses' ) ); |
| 103 | + $stats['terms'] = $this->getLanguage()->formatNum( $org->getField( 'terms' ) ); |
| 104 | + $stats['ambassadors'] = $this->getLanguage()->formatNum( $org->getField( 'mentors' ) ); |
| 105 | + $stats['students'] = $this->getLanguage()->formatNum( $org->getField( 'students' ) ); |
| 106 | + |
100 | 107 | foreach ( $stats as &$stat ) { |
101 | 108 | $stat = htmlspecialchars( $stat ); |
102 | 109 | } |
103 | 110 | |
| 111 | + if ( $org->getField( 'courses' ) > 0 ) { |
| 112 | + $stats['courses'] = Linker::linkKnown( |
| 113 | + SpecialPage::getTitleFor( 'Courses' ), |
| 114 | + $stats['courses'], |
| 115 | + array(), |
| 116 | + array( 'org_id' => $org->getId() ) |
| 117 | + ); |
| 118 | + } |
| 119 | + |
| 120 | + if ( $org->getField( 'terms' ) > 0 ) { |
| 121 | + $stats['terms'] = Linker::linkKnown( |
| 122 | + SpecialPage::getTitleFor( 'Terms' ), |
| 123 | + $stats['terms'], |
| 124 | + array(), |
| 125 | + array( 'org_id' => $org->getId() ) |
| 126 | + ); |
| 127 | + } |
| 128 | + |
104 | 129 | return $stats; |
105 | 130 | } |
106 | 131 | |
Index: trunk/extensions/EducationProgram/specials/SpecialCourse.php |
— | — | @@ -103,6 +103,24 @@ |
104 | 104 | htmlspecialchars( $org ) |
105 | 105 | ); |
106 | 106 | |
| 107 | + $lang = $this->getLanguage(); |
| 108 | + |
| 109 | + $stats['students'] = htmlspecialchars( $lang->formatNum( $course->getField( 'students' ) ) ); |
| 110 | + |
| 111 | + $stats['status'] = wfMsgHtml( $course->getField( 'active' ) ? 'ep-course-active' : 'ep-course-inactive' ); |
| 112 | + |
| 113 | + $termCount = EPTerm::count( array( 'course_id' => $course->getId() ) ); |
| 114 | + $stats['terms'] = htmlspecialchars( $lang->formatNum( $termCount ) ); |
| 115 | + |
| 116 | + if ( $termCount > 0 ) { |
| 117 | + $stats['terms'] = Linker::linkKnown( |
| 118 | + SpecialPage::getTitleFor( 'Terms' ), |
| 119 | + $stats['terms'], |
| 120 | + array(), |
| 121 | + array( 'course_id' => $course->getId() ) |
| 122 | + ); |
| 123 | + } |
| 124 | + |
107 | 125 | return $stats; |
108 | 126 | } |
109 | 127 | |
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php |
— | — | @@ -224,8 +224,15 @@ |
225 | 225 | 'specialinstitution-summary-name' => 'Name', |
226 | 226 | 'specialinstitution-summary-city' => 'City', |
227 | 227 | 'specialinstitution-summary-country' => 'Country', |
| 228 | + 'specialinstitution-summary-status' => 'Status', |
| 229 | + 'specialinstitution-summary-courses' => 'Course count', |
| 230 | + 'specialinstitution-summary-terms' => 'Term count', |
| 231 | + 'specialinstitution-summary-students' => 'Student count', |
| 232 | + 'specialinstitution-summary-ambassadors' => 'Ambassador count', |
228 | 233 | 'ep-institution-nav-edit' => 'Edit this institution', |
229 | 234 | 'ep-institution-add-course' => 'Add a course', |
| 235 | + 'ep-institution-inactive' => 'Inactive', |
| 236 | + 'ep-institution-active' => 'Active', |
230 | 237 | |
231 | 238 | // Special:Course |
232 | 239 | 'ep-course-title' => 'Course: $1', |
— | — | @@ -234,9 +241,14 @@ |
235 | 242 | 'ep-course-create' => 'There is no course with name "$1" yet, but you can create it.', |
236 | 243 | 'specialcourse-summary-name' => 'Name', |
237 | 244 | 'specialcourse-summary-org' => 'Institution', |
| 245 | + 'specialcourse-summary-students' => 'Student count', |
| 246 | + 'specialcourse-summary-status' => 'Status', |
238 | 247 | 'ep-course-description' => 'Description', |
239 | 248 | 'ep-course-nav-edit' => 'Edit this course', |
240 | 249 | 'ep-course-add-term' => 'Add a term', |
| 250 | + 'ep-course-inactive' => 'Inactive', |
| 251 | + 'ep-course-active' => 'Active', |
| 252 | + 'specialcourse-summary-terms' => 'Term count', |
241 | 253 | |
242 | 254 | // Special:Term |
243 | 255 | 'ep-term-title' => 'Term: $1', |