mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-23 21:53:35 +00:00
Mixed improvements for AbuseFilter pages and forms
- Clarify the label of the search form on Special:AbuseFilter - Move introductory paragraphs to the very beginning of the page: -- Before the profiling data on Special:AbuseFilter -- Before the search form on Special:AbuseLog - Make the search form on Special:AbuseFilter collapsible, and collapsed by default - Make a few buttons primary+progressive, specifically those that take the user to a different page or act as submit-like buttons Bug: T261584 Change-Id: I54517b01a9ea81d276283140e5cfafef575c3e2b
This commit is contained in:
parent
648b05772f
commit
a4a0503174
|
@ -153,7 +153,7 @@
|
|||
"abusefilter-import-button": "Import filter",
|
||||
"abusefilter-return": "Return to filter management",
|
||||
"abusefilter-status-global": "Global",
|
||||
"abusefilter-list-options": "Options",
|
||||
"abusefilter-list-options": "Search options",
|
||||
"abusefilter-list-options-deleted": "Deleted filters:",
|
||||
"abusefilter-list-options-deleted-only": "Show only deleted filters",
|
||||
"abusefilter-list-options-deleted-hide": "Hide deleted filters",
|
||||
|
|
|
@ -210,6 +210,7 @@ class SpecialAbuseLog extends AbuseFilterSpecialPage {
|
|||
$this->showDetails( $args[0] );
|
||||
}
|
||||
} else {
|
||||
$this->outputHeader( 'abusefilter-log-summary' );
|
||||
$this->searchForm();
|
||||
$this->showList();
|
||||
}
|
||||
|
@ -403,7 +404,6 @@ class SpecialAbuseLog extends AbuseFilterSpecialPage {
|
|||
|
||||
$out = $this->getOutput();
|
||||
$user = $this->getUser();
|
||||
$this->outputHeader( 'abusefilter-log-summary' );
|
||||
|
||||
// Generate conditions list.
|
||||
$conds = [];
|
||||
|
|
|
@ -327,7 +327,8 @@ class AbuseFilterViewExamine extends AbuseFilterView {
|
|||
new OOUI\ButtonInputWidget(
|
||||
[
|
||||
'label' => $this->msg( 'abusefilter-examine-test-button' )->text(),
|
||||
'id' => 'mw-abusefilter-examine-test'
|
||||
'id' => 'mw-abusefilter-examine-test',
|
||||
'flags' => [ 'primary', 'progressive' ]
|
||||
]
|
||||
) .
|
||||
Xml::element( 'div',
|
||||
|
|
|
@ -53,10 +53,8 @@ class AbuseFilterViewList extends AbuseFilterView {
|
|||
$config = $this->getConfig();
|
||||
$user = $this->getUser();
|
||||
|
||||
// Show filter performance statistics
|
||||
$this->showStatus();
|
||||
|
||||
$out->addWikiMsg( 'abusefilter-intro' );
|
||||
$this->showStatus();
|
||||
|
||||
// New filter button
|
||||
if ( $this->afPermManager->canEdit( $user ) ) {
|
||||
|
@ -66,10 +64,12 @@ class AbuseFilterViewList extends AbuseFilterView {
|
|||
new OOUI\ButtonWidget( [
|
||||
'label' => $this->msg( 'abusefilter-new' )->text(),
|
||||
'href' => $this->getTitle( 'new' )->getFullURL(),
|
||||
'flags' => [ 'primary', 'progressive' ],
|
||||
] ),
|
||||
new OOUI\ButtonWidget( [
|
||||
'label' => $this->msg( 'abusefilter-import-button' )->text(),
|
||||
'href' => $this->getTitle( 'import' )->getFullURL(),
|
||||
'flags' => [ 'primary', 'progressive' ],
|
||||
] )
|
||||
]
|
||||
] );
|
||||
|
@ -293,6 +293,7 @@ class AbuseFilterViewList extends AbuseFilterView {
|
|||
HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() )
|
||||
->addHiddenField( 'title', $this->getTitle()->getPrefixedDBkey() )
|
||||
->setAction( $this->getTitle()->getFullURL() )
|
||||
->setCollapsibleOptions( true )
|
||||
->setWrapperLegendMsg( 'abusefilter-list-options' )
|
||||
->setSubmitTextMsg( 'abusefilter-list-options-submit' )
|
||||
->setMethod( 'get' )
|
||||
|
@ -330,7 +331,7 @@ class AbuseFilterViewList extends AbuseFilterView {
|
|||
$matchPercent
|
||||
)->parse();
|
||||
|
||||
$status = Xml::tags( 'div', [ 'class' => 'mw-abusefilter-status' ], $status );
|
||||
$status = Xml::tags( 'p', [ 'class' => 'mw-abusefilter-status' ], $status );
|
||||
$this->getOutput()->addHTML( $status );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue