From: Moriel Schottlender Date: Wed, 5 Apr 2017 23:05:51 +0000 (-0700) Subject: RecentChanges: Allow resetting date selection X-Git-Tag: 1.31.0-rc.0~3582^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=64f5a1152b31afe18eed8d38a3c0b2339d53ac38 RecentChanges: Allow resetting date selection Add a link that resets the date selection if it is selected. Bug: T160028 Change-Id: I4ecff943025635f42eb70fc70c6dfdf34c314707 --- diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index ae0887d28f..f88f09c60e 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -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() . '
'; + ->parse() . ' ' . + Html::rawElement( + 'span', + [ 'class' => 'rcoptions-listfromreset' ], + $this->msg( 'parentheses' )->rawParams( $resetLink )->parse() + ) . + '
'; } # Sort data for display and make sure it's unique after we've added user data. diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 37f9f7fbf1..a49a4b494d 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -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 $3, $4 (up to $1 shown).", + "rclistfromreset": "Reset date selection", "rclistfrom": "Show new changes starting from $2, $3", "rcshowhideminor": "$1 minor edits", "rcshowhideminor-show": "Show", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 8dd6d0f3f1..01a8fe755c 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -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}}",