RecentChanges: Allow resetting date selection
Add a link that resets the date selection if it is selected. Bug: T160028 Change-Id: I4ecff943025635f42eb70fc70c6dfdf34c314707
This commit is contained in:
parent
bac07c24e5
commit
64f5a1152b
3 changed files with 12 additions and 1 deletions
|
|
@ -746,6 +746,9 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
|
|||
$user = $this->getUser();
|
||||
$config = $this->getConfig();
|
||||
if ( $options['from'] ) {
|
||||
$resetLink = $this->makeOptionsLink( $this->msg( 'rclistfromreset' ),
|
||||
[ 'from' => '' ], $nondefaults );
|
||||
|
||||
$note .= $this->msg( 'rcnotefrom' )
|
||||
->numParams( $options['limit'] )
|
||||
->params(
|
||||
|
|
@ -754,7 +757,13 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
|
|||
$lang->userTime( $options['from'], $user )
|
||||
)
|
||||
->numParams( $numRows )
|
||||
->parse() . '<br />';
|
||||
->parse() . ' ' .
|
||||
Html::rawElement(
|
||||
'span',
|
||||
[ 'class' => 'rcoptions-listfromreset' ],
|
||||
$this->msg( 'parentheses' )->rawParams( $resetLink )->parse()
|
||||
) .
|
||||
'<br />';
|
||||
}
|
||||
|
||||
# Sort data for display and make sure it's unique after we've added user data.
|
||||
|
|
|
|||
|
|
@ -1429,6 +1429,7 @@
|
|||
"rcfilters-hideminor-conflicts-typeofchange": "Certain types of change cannot be designated as \"minor,\" so this filter conflicts with the following Type of Change filters: $1",
|
||||
"rcfilters-typeofchange-conflicts-hideminor": "This Type of Change filter conflicts with the \"Minor Edits\" filter. Certain types of change cannot be designated as \"minor.\"",
|
||||
"rcnotefrom": "Below {{PLURAL:$5|is the change|are the changes}} since <strong>$3, $4</strong> (up to <strong>$1</strong> shown).",
|
||||
"rclistfromreset": "Reset date selection",
|
||||
"rclistfrom": "Show new changes starting from $2, $3",
|
||||
"rcshowhideminor": "$1 minor edits",
|
||||
"rcshowhideminor-show": "Show",
|
||||
|
|
|
|||
|
|
@ -1617,6 +1617,7 @@
|
|||
"rcfilters-typeofchange-conflicts-hideminor": "Tooltip shown when hovering over a Type of change filter tag, when the Minor edits filter is also selected.\n\n\"Minor edits\" is {{msg-mw|rcfilters-filter-minor-label}}.\n\n\"Type of change\" is {{msg-mw|rcfilters-filtergroup-changetype}}.\n\nThis indicates that no results will be shown.",
|
||||
"rcnotefrom": "This message is displayed at [[Special:RecentChanges]] when viewing recentchanges from some specific time.\n\nThe corresponding message is {{msg-mw|Rclistfrom}}.\n\nParameters:\n* $1 - the maximum number of changes that are displayed\n* $2 - (Optional) a date and time\n* $3 - a date\n* $4 - a time\n* $5 - Number of changes are displayed, for use with PLURAL",
|
||||
"rclistfrom": "Used on [[Special:RecentChanges]]. Parameters:\n* $1 - (Currently not use) date and time. The date and the time adds to the rclistfrom description.\n* $2 - time. The time adds to the rclistfrom link description (with split of date and time).\n* $3 - date. The date adds to the rclistfrom link description (with split of date and time).\n\nThe corresponding message is {{msg-mw|Rcnotefrom}}.",
|
||||
"rclistfromreset": "Used on [[Special:RecentChanges]] to reset a selection of a certain date range.",
|
||||
"rcshowhideminor": "Option text in [[Special:RecentChanges]]. Parameters:\n* $1 - the \"show/hide\" command, with the text taken from either {{msg-mw|rcshowhideminor-show}} or {{msg-mw|rcshowhideminor-hide}}\n{{Identical|Minor edit}}",
|
||||
"rcshowhideminor-show": "{{doc-actionlink}}\nOption text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhideminor}}.\n\nSee also:\n* {{msg-mw|rcshowhideminor-hide}}\n{{Identical|Show}}",
|
||||
"rcshowhideminor-hide": "{{doc-actionlink}}\nOption text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhideminor}}.\n\nSee also:\n* {{msg-mw|rcshowhideminor-show}}\n{{Identical|Hide}}",
|
||||
|
|
|
|||
Loading…
Reference in a new issue