summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-03-05 10:01:27 +0100
committerspag <spag@golwen.net>2013-03-05 10:01:27 +0100
commit00db10565a2b1906728087eeb95542214720fb23 (patch)
treef883e65fa00d677902d3dcb9a281050a078887e1
parent260264886fd136b388ad4adaaa93e264d7da87ba (diff)
colors added
-rw-r--r--app/views/intruders/_index_core.html.haml17
1 files changed, 13 insertions, 4 deletions
diff --git a/app/views/intruders/_index_core.html.haml b/app/views/intruders/_index_core.html.haml
index b9c5a76..1fca601 100644
--- a/app/views/intruders/_index_core.html.haml
+++ b/app/views/intruders/_index_core.html.haml
@@ -9,16 +9,25 @@
%th= t('intruders.index.contacts_per_second')
%th= t('intruders.index.user_agent')
%th= t('intruders.index.to_user')
+ %th
- for intruder in intruders
- %tr
+ - if intruder.list_type == 'whitelist'
+ - entry_class = 'success'
+ - elsif intruder.bans.to_i > 0
+ - entry_class = 'error'
+ - elsif intruder.points.to_i > 0
+ - entry_class = 'warn'
+ - else
+ - entry_class = ''
+ %tr{:class => "table #{entry_class}"}
%td
- - if intruder.list_type == 'whitelist'
+ - if entry_class == 'success'
%i.icon-ok
- - elsif intruder.bans.to_i > 0
+ - elsif entry_class == 'error'
%i.icon-fire
- - elsif intruder.points.to_i > 0
+ - elsif entry_class == 'warn'
%i.icon-warning-sign
%td= intruder.contact_ip