diff options
-rw-r--r-- | includes/skins/Skin.php | 14 | ||||
-rw-r--r-- | languages/i18n/en.json | 1 | ||||
-rw-r--r-- | languages/i18n/qqq.json | 1 |
3 files changed, 15 insertions, 1 deletions
diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index 37b6fc81254f..c6d79a6bfa21 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -753,8 +753,19 @@ abstract class Skin extends ContextSource { $this->msg( 'restorelink' )->numParams( $n )->text() ) )->escaped(); - // Allow extensions to add more links $links = []; + // Add link to page logs, unless we're on the history page (which + // already has one) + if ( $action !== 'history' ) { + $links[] = $linkRenderer->makeKnownLink( + SpecialPage::getTitleFor( 'Log' ), + $this->msg( 'viewpagelogs-lowercase' )->text(), + [], + [ 'page' => $title->getPrefixedText() ] + ); + } + + // Allow extensions to add more links $this->getHookRunner()->onUndeletePageToolLinks( $this->getContext(), $linkRenderer, $links ); @@ -765,6 +776,7 @@ abstract class Skin extends ContextSource { ->rawParams( $this->getLanguage()->pipeList( $links ) ) ->escaped(); } + return Html::rawElement( 'div', [ 'class' => 'mw-undelete-subtitle' ], $subtitle ); } } diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 1487a297cd55..d5aa593fccdc 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -836,6 +836,7 @@ "undo-summary-username-hidden": "Undo revision $1 by a hidden user", "createaccount-hook-aborted": "$1", "viewpagelogs": "View logs for this page", + "viewpagelogs-lowercase": "view logs for this page", "nohistory": "There is no edit history for this page.", "currentrev": "Latest revision", "currentrev-asof": "Latest revision as of $1", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 5ba6139c2988..80de17bcb8ef 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -1052,6 +1052,7 @@ "undo-summary-username-hidden": "Edit summary for an undo action where the username of the old revision is hidden.\n\nParameters:\n* $1 - the revision ID being undone\nSee also:\n* {{msg-mw|Undo-summary}}", "createaccount-hook-aborted": "Placeholder message to return with API errors on account create; passes through the message from a hook {{notranslate}}", "viewpagelogs": "Link displayed in history of pages", + "viewpagelogs-lowercase": "Link displayed on pages with deleted history, after the link to view deleted revisions. Should lead with a lowercase letter, as this is listed together with other links added by extensions, which should also begin with a lowercase letter for consistency.", "nohistory": "Message shown when there are no history to list. See [{{canonicalurl:x|action=history}} example history].\n----\nAlso used as title of error message when the feed is empty. See [{{canonicalurl:x|action=history&feed=atom}} example feed].\n\nSee the error message:\n* {{msg-mw|history-feed-empty}}", "currentrev": "Used in Diff Preview page. The diff is between {{msg-mw|currentrev}} and {{msg-mw|yourtext}}.\n{{Identical|Current revision}}", "currentrev-asof": "Used on a difference page when comparing the current versions of a page with each other.\n\nSee {{msg-mw|Revisionasof}} for the message for non-current version.\n\nParameters:\n* $1 - a date and time\n* $2 - (Optional) a date\n* $3 - (Optional) a time", |