summaryrefslogtreecommitdiff
path: root/app/views/intruders/_index_core.html.haml
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-07 11:37:03 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-07 11:37:03 +0100
commit11f186a118285fbc87a536af26730780a9ad01f5 (patch)
treefe6363b036f60f238916d070b3d0cb0625dd53c8 /app/views/intruders/_index_core.html.haml
parent2b94b16ee1201d15b3b9d66e142df311141a47db (diff)
parent3e19646f46c772e10ed3d7a45e8c974ab23f625b (diff)
Merge branch 'develop'5.1.1
Diffstat (limited to 'app/views/intruders/_index_core.html.haml')
-rw-r--r--app/views/intruders/_index_core.html.haml25
1 files changed, 13 insertions, 12 deletions
diff --git a/app/views/intruders/_index_core.html.haml b/app/views/intruders/_index_core.html.haml
index 63f2253..1fca601 100644
--- a/app/views/intruders/_index_core.html.haml
+++ b/app/views/intruders/_index_core.html.haml
@@ -2,38 +2,39 @@
%tr
%th
%th= t('intruders.index.contact_ip')
- %th= t('intruders.index.contact_port')
%th= t('intruders.index.points')
- %th= t('intruders.index.bans')
%th= t('intruders.index.ban_last')
- %th= t('intruders.index.ban_end')
%th= t('intruders.index.contact_count')
%th= t('intruders.index.contact_last')
%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 > 0
+ - elsif entry_class == 'error'
%i.icon-fire
- - elsif intruder.points > 0
+ - elsif entry_class == 'warn'
%i.icon-warning-sign
%td= intruder.contact_ip
- %td= intruder.contact_port
%td= intruder.points
- %td= intruder.bans
%td
- if intruder.ban_last
= l intruder.ban_last, :format => :short
- %td
- - if intruder.ban_end
- = l intruder.ban_end, :format => :short
%td= intruder.contact_count
%td