r109599 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109598‎ | r109599 | r109600 >
Date:01:16, 20 January 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
added access keys
Modified paths:
  • /trunk/extensions/EducationProgram/EducationProgram.i18n.php (modified) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialCourse.php (modified) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialEPFormPage.php (modified) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialEPPage.php (modified) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialInstitution.php (modified) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialTerm.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/specials/SpecialInstitution.php
@@ -58,7 +58,9 @@
5959 $links = array();
6060
6161 if ( $this->getUser()->isAllowed( 'ep-org' ) ) {
62 - $links[wfMsg( 'ep-institution-nav-edit' )] = SpecialPage::getTitleFor( 'EditInstitution', $this->subPage );
 62+ $links[wfMsg( 'ep-institution-nav-edit' )] =
 63+ array( SpecialPage::getTitleFor( 'EditInstitution', $this->subPage ) )
 64+ + Linker::tooltipAndAccesskeyAttribs( 'ep-edit-institution' );
6365 }
6466
6567 $this->displayNavigation( $links );
Index: trunk/extensions/EducationProgram/specials/SpecialCourse.php
@@ -58,7 +58,9 @@
5959 $links = array();
6060
6161 if ( $this->getUser()->isAllowed( 'ep-course' ) ) {
62 - $links[wfMsg( 'ep-course-nav-edit' )] = SpecialPage::getTitleFor( 'EditCourse', $this->subPage );
 62+ $links[wfMsg( 'ep-course-nav-edit' )] =
 63+ array( SpecialPage::getTitleFor( 'EditCourse', $this->subPage ) )
 64+ + Linker::tooltipAndAccesskeyAttribs( 'ep-edit-course' );
6365 }
6466
6567 $this->displayNavigation( $links );
Index: trunk/extensions/EducationProgram/specials/SpecialEPPage.php
@@ -136,10 +136,20 @@
137137 $links = array();
138138 $items = array_merge( $this->getDefaultNavigationItems(), $items );
139139
140 - foreach ( $items as $label => $target ) {
 140+ foreach ( $items as $label => $data ) {
 141+ if ( is_array( $data ) ) {
 142+ $target = array_shift( $data );
 143+ $attribs = $data;
 144+ }
 145+ else {
 146+ $target = $data;
 147+ $attribs = array();
 148+ }
 149+
141150 $links[] = Linker::linkKnown(
142151 $target,
143 - htmlspecialchars( $label )
 152+ htmlspecialchars( $label ),
 153+ $attribs
144154 );
145155 }
146156
Index: trunk/extensions/EducationProgram/specials/SpecialTerm.php
@@ -58,7 +58,9 @@
5959 $links = array();
6060
6161 if ( $this->getUser()->isAllowed( 'ep-term' ) ) {
62 - $links[wfMsg( 'ep-term-nav-edit' )] = SpecialPage::getTitleFor( 'EditTerm', $this->subPage );
 62+ $links[wfMsg( 'ep-term-nav-edit' )] =
 63+ array( SpecialPage::getTitleFor( 'EditTerm', $this->subPage ) )
 64+ + Linker::tooltipAndAccesskeyAttribs( 'ep-edit-term' );
6365 }
6466
6567 $this->displayNavigation( $links );
Index: trunk/extensions/EducationProgram/specials/SpecialEPFormPage.php
@@ -218,6 +218,7 @@
219219
220220 $form->setSubmitCallback( array( $this, 'handleSubmission' ) );
221221 $form->setSubmitText( wfMsg( 'educationprogram-org-submit' ) );
 222+ $form->setSubmitTooltip( 'ep-form-save' );
222223
223224 $action = $this->isNew() ? 'add' : 'edit';
224225 $form->setWrapperLegend( $this->msg( strtolower( $this->getName() ) . '-' . $action . '-legend' ) );
@@ -227,7 +228,7 @@
228229 wfMsg( 'cancel' ),
229230 'cancelEdit',
230231 array(
231 - 'target-url' => SpecialPage::getTitleFor( $this->listPage )->getFullURL()
 232+ 'target-url' => SpecialPage::getTitleFor( $this->listPage )->getFullURL(),
232233 )
233234 );
234235
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php
@@ -24,6 +24,18 @@
2525 'ep-item-summary' => 'Summary',
2626 'ep-toplink' => 'My courses',
2727
 28+ // Tooltips
 29+ 'tooltip-ep-form-save' => 'Save',
 30+ 'tooltip-ep-edit-institution' => 'Edit this institution',
 31+ 'tooltip-ep-edit-course' => 'Edit this course',
 32+ 'tooltip-ep-edit-term' => 'Edit this term',
 33+
 34+ // Access keys
 35+ 'accesskey-ep-form-save' => 's', # do not translate or duplicate this message to other languages
 36+ 'accesskey-ep-edit-institution' => 'e', # do not translate or duplicate this message to other languages
 37+ 'accesskey-ep-edit-course' => 'e', # do not translate or duplicate this message to other languages
 38+ 'accesskey-ep-edit-term' => 'e', # do not translate or duplicate this message to other languages
 39+
2840 // Navigation links
2941 'ep-nav-orgs' => 'Institution list',
3042 'ep-nav-courses' => 'Courses list',

Status & tagging log