From 00db10565a2b1906728087eeb95542214720fb23 Mon Sep 17 00:00:00 2001 From: spag Date: Tue, 5 Mar 2013 10:01:27 +0100 Subject: colors added --- app/views/intruders/_index_core.html.haml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'app/views') 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 -- cgit v1.2.3