Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -1947,6 +1947,8 @@ |
1948 | 1948 | 'tooltip-watch', |
1949 | 1949 | 'tooltip-recreate', |
1950 | 1950 | 'tooltip-upload', |
| 1951 | + 'tooltip-rollback', |
| 1952 | + 'tooltip-undo', |
1951 | 1953 | ), |
1952 | 1954 | 'stylesheets' => array( |
1953 | 1955 | 'common.css', |
Index: trunk/phase3/includes/diff/DifferenceEngine.php |
— | — | @@ -816,8 +816,10 @@ |
817 | 817 | . " (<a href='$oldEdit'>" . wfMsgHtml( $editable ? 'editold' : 'viewsourceold' ) . "</a>)"; |
818 | 818 | // Add an "undo" link |
819 | 819 | $newUndo = $this->mNewPage->escapeLocalUrl( 'action=edit&undoafter=' . $this->mOldid . '&undo=' . $this->mNewid); |
| 820 | + $htmlLink = htmlspecialchars( wfMsg( 'editundo' ) ); |
| 821 | + $htmlTitle = linker::tooltip( 'undo' ); |
820 | 822 | if( $editable && !$this->mOldRev->isDeleted( Revision::DELETED_TEXT ) && !$this->mNewRev->isDeleted( Revision::DELETED_TEXT ) ) { |
821 | | - $this->mNewtitle .= " (<a href='$newUndo'>" . htmlspecialchars( wfMsg( 'editundo' ) ) . "</a>)"; |
| 823 | + $this->mNewtitle .= " (<a href='$newUndo' $htmlTitle>" . $htmlLink . "</a>)"; |
822 | 824 | } |
823 | 825 | |
824 | 826 | if( !$this->mOldRev->userCan( Revision::DELETED_TEXT ) ) { |
Index: trunk/phase3/includes/Linker.php |
— | — | @@ -1552,7 +1552,8 @@ |
1553 | 1553 | } |
1554 | 1554 | $query['token'] = $wgUser->editToken( array( $title->getPrefixedText(), |
1555 | 1555 | $rev->getUserText() ) ); |
1556 | | - return $this->link( $title, wfMsgHtml( 'rollbacklink' ), array(), |
| 1556 | + return $this->link( $title, wfMsgHtml( 'rollbacklink' ), |
| 1557 | + array( 'title' => wfMsg( 'tooltip-rollback' ) ), |
1557 | 1558 | $query, array( 'known', 'noclasses' ) ); |
1558 | 1559 | } |
1559 | 1560 | |
Index: trunk/phase3/includes/PageHistory.php |
— | — | @@ -362,10 +362,17 @@ |
363 | 363 | if( $this->mTitle->quickUserCan( 'edit' ) && |
364 | 364 | !$rev->isDeleted( Revision::DELETED_TEXT ) && |
365 | 365 | !$next->rev_deleted & Revision::DELETED_TEXT ) { |
366 | | - $undolink = $this->mSkin->makeKnownLinkObj( |
367 | | - $this->mTitle, |
368 | | - wfMsgHtml( 'editundo' ), |
369 | | - 'action=edit&undoafter=' . $next->rev_id . '&undo=' . $rev->getId() |
| 366 | + |
| 367 | + # Create undo tooltip for the first (=latest) line only |
| 368 | + $undoTooltip = $latest |
| 369 | + ? array( 'title' => wfMsg( 'tooltip-undo' ) ) |
| 370 | + : array(); |
| 371 | + $undolink = $this->mSkin->link( |
| 372 | + $this->mTitle, |
| 373 | + wfMsgHtml( 'editundo' ), |
| 374 | + $undoTooltip, |
| 375 | + array( 'action' => 'edit', 'undoafter' => $next->rev_id, 'undo' => $rev->getId() ), |
| 376 | + array( 'known', 'noclasses' ) |
370 | 377 | ); |
371 | 378 | $tools[] = "<span class=\"mw-history-undo\">{$undolink}</span>"; |
372 | 379 | } |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -2784,6 +2784,8 @@ |
2785 | 2785 | 'tooltip-watch' => 'Add this page to your watchlist', |
2786 | 2786 | 'tooltip-recreate' => 'Recreate the page despite it having been deleted', |
2787 | 2787 | 'tooltip-upload' => 'Start upload', |
| 2788 | +'tooltip-rollback' => '"Rollback" reverts edit(s) to this page of the last contributor in one click.', |
| 2789 | +'tooltip-undo' => '"Undo" reverts this edit and opens the edit form in preview mode. Allows adding a reason in the summary.', |
2788 | 2790 | |
2789 | 2791 | # Stylesheets |
2790 | 2792 | 'common.css' => '/* CSS placed here will be applied to all skins */', # only translate this message to other languages if you have to change it |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -95,6 +95,7 @@ |
96 | 96 | * (bug 13815) In the comment for page moves, use the colon-separator message |
97 | 97 | instead of a hardcoded colon. |
98 | 98 | * Allow <gallery> to accept image names without an Image: prefix |
| 99 | +* Add tooltips to rollback and undo links |
99 | 100 | |
100 | 101 | === Bug fixes in 1.14 === |
101 | 102 | |