From 909be785f6681008ca0ec9a5b3d58c11b87077a1 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Wed, 28 Jan 2009 20:09:05 +0000 Subject: [PATCH] Style disabled and deleted filters in light gray, for visual identification. --- Views/AbuseFilterViewList.php | 10 ++++++++++ abusefilter.css | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/Views/AbuseFilterViewList.php b/Views/AbuseFilterViewList.php index 0bfc66a9d..0cc57a5f4 100644 --- a/Views/AbuseFilterViewList.php +++ b/Views/AbuseFilterViewList.php @@ -201,6 +201,16 @@ class AbuseFilterPager extends TablePager { return 'af_id'; } + function getRowClass( $row ) { + if ($row->status & 1) { + return 'mw-abusefilter-list-enabled'; + } elseif ($row->status & 2) { + return 'mw-abusefilter-list-deleted'; + } else { + return 'mw-abusefilter-list-disabled'; + } + } + function isFieldSortable($name) { $sortable_fields = array( 'af_id', 'status', 'af_hit_count', 'af_throttled', 'af_user_text', 'af_timestamp' ); return in_array( $name, $sortable_fields ); diff --git a/abusefilter.css b/abusefilter.css index a802f9b90..4a28b8aed 100644 --- a/abusefilter.css +++ b/abusefilter.css @@ -38,4 +38,12 @@ div.mw-abuselog-var-value { td.mw-abuselog-var { width: 30%; +} + +tr.mw-abusefilter-list-disabled, tr.mw-abusefilter-list-disabled td { + color: #666666; +} + +tr.mw-abusefilter-list-deleted, tr.mw-abusefilter-list-deleted td { + color: #aaaaaa; } \ No newline at end of file