Index: trunk/extensions/EducationProgram/specials/SpecialInstitution.php |
— | — | @@ -58,7 +58,9 @@ |
59 | 59 | $links = array(); |
60 | 60 | |
61 | 61 | 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' ); |
63 | 65 | } |
64 | 66 | |
65 | 67 | $this->displayNavigation( $links ); |
Index: trunk/extensions/EducationProgram/specials/SpecialCourse.php |
— | — | @@ -58,7 +58,9 @@ |
59 | 59 | $links = array(); |
60 | 60 | |
61 | 61 | 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' ); |
63 | 65 | } |
64 | 66 | |
65 | 67 | $this->displayNavigation( $links ); |
Index: trunk/extensions/EducationProgram/specials/SpecialEPPage.php |
— | — | @@ -136,10 +136,20 @@ |
137 | 137 | $links = array(); |
138 | 138 | $items = array_merge( $this->getDefaultNavigationItems(), $items ); |
139 | 139 | |
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 | + |
141 | 150 | $links[] = Linker::linkKnown( |
142 | 151 | $target, |
143 | | - htmlspecialchars( $label ) |
| 152 | + htmlspecialchars( $label ), |
| 153 | + $attribs |
144 | 154 | ); |
145 | 155 | } |
146 | 156 | |
Index: trunk/extensions/EducationProgram/specials/SpecialTerm.php |
— | — | @@ -58,7 +58,9 @@ |
59 | 59 | $links = array(); |
60 | 60 | |
61 | 61 | 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' ); |
63 | 65 | } |
64 | 66 | |
65 | 67 | $this->displayNavigation( $links ); |
Index: trunk/extensions/EducationProgram/specials/SpecialEPFormPage.php |
— | — | @@ -218,6 +218,7 @@ |
219 | 219 | |
220 | 220 | $form->setSubmitCallback( array( $this, 'handleSubmission' ) ); |
221 | 221 | $form->setSubmitText( wfMsg( 'educationprogram-org-submit' ) ); |
| 222 | + $form->setSubmitTooltip( 'ep-form-save' ); |
222 | 223 | |
223 | 224 | $action = $this->isNew() ? 'add' : 'edit'; |
224 | 225 | $form->setWrapperLegend( $this->msg( strtolower( $this->getName() ) . '-' . $action . '-legend' ) ); |
— | — | @@ -227,7 +228,7 @@ |
228 | 229 | wfMsg( 'cancel' ), |
229 | 230 | 'cancelEdit', |
230 | 231 | array( |
231 | | - 'target-url' => SpecialPage::getTitleFor( $this->listPage )->getFullURL() |
| 232 | + 'target-url' => SpecialPage::getTitleFor( $this->listPage )->getFullURL(), |
232 | 233 | ) |
233 | 234 | ); |
234 | 235 | |
Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php |
— | — | @@ -24,6 +24,18 @@ |
25 | 25 | 'ep-item-summary' => 'Summary', |
26 | 26 | 'ep-toplink' => 'My courses', |
27 | 27 | |
| 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 | + |
28 | 40 | // Navigation links |
29 | 41 | 'ep-nav-orgs' => 'Institution list', |
30 | 42 | 'ep-nav-courses' => 'Courses list', |