From 62f3f7373844185e763e1430926ebf880b0d5cb5 Mon Sep 17 00:00:00 2001 From: spag Date: Tue, 12 Feb 2013 17:03:15 +0100 Subject: display whois information --- app/views/intruders/show.html.haml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'app/views/intruders') diff --git a/app/views/intruders/show.html.haml b/app/views/intruders/show.html.haml index 4941e89..325c5e3 100644 --- a/app/views/intruders/show.html.haml +++ b/app/views/intruders/show.html.haml @@ -21,6 +21,10 @@ %p %strong= t('intruders.show.contact_ip') + ":" = @intruder.contact_ip + - if ! @intruder.contact_ip.blank? && Object.const_defined?('Whois') + %a.btn.btn-small.btn-success{ :href => intruder_path(@intruder, :whois => @intruder.contact_ip) } + %i.icon-info-sign.icon-white + = 'Whois' %p %strong= t('intruders.show.contact_port') + ":" = @intruder.contact_port @@ -46,7 +50,8 @@ %strong= t('intruders.show.comment') + ":" = @intruder.comment -%p - %pre= @intruder.whois - = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @intruder } + +- if ! @whois.blank? + %p + %pre= @whois -- cgit v1.2.3 From bc8ae7a653c7bc182bbdbff91498fa4504b7b9d9 Mon Sep 17 00:00:00 2001 From: spag Date: Tue, 12 Feb 2013 23:31:23 +0100 Subject: intruder view --- app/views/intruders/show.html.haml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'app/views/intruders') diff --git a/app/views/intruders/show.html.haml b/app/views/intruders/show.html.haml index 325c5e3..df50872 100644 --- a/app/views/intruders/show.html.haml +++ b/app/views/intruders/show.html.haml @@ -21,10 +21,6 @@ %p %strong= t('intruders.show.contact_ip') + ":" = @intruder.contact_ip - - if ! @intruder.contact_ip.blank? && Object.const_defined?('Whois') - %a.btn.btn-small.btn-success{ :href => intruder_path(@intruder, :whois => @intruder.contact_ip) } - %i.icon-info-sign.icon-white - = 'Whois' %p %strong= t('intruders.show.contact_port') + ":" = @intruder.contact_port @@ -55,3 +51,8 @@ - if ! @whois.blank? %p %pre= @whois + +- elsif ! @intruder.contact_ip.blank? && Object.const_defined?('Whois') + %a.btn.btn-small.btn-success{ :href => intruder_path(@intruder, :whois => @intruder.contact_ip) } + %i.icon-info-sign.icon-white + = 'Whois' -- cgit v1.2.3 From 63963e63d8e211b15bedfd6719d67259440520a2 Mon Sep 17 00:00:00 2001 From: spag Date: Tue, 12 Feb 2013 23:54:20 +0100 Subject: index view --- app/views/intruders/_index_core.html.haml | 33 ++++++++++++++++--------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'app/views/intruders') diff --git a/app/views/intruders/_index_core.html.haml b/app/views/intruders/_index_core.html.haml index 0070c4d..31bbd11 100644 --- a/app/views/intruders/_index_core.html.haml +++ b/app/views/intruders/_index_core.html.haml @@ -1,37 +1,38 @@ %table.table.table-striped %tr - %th= t('intruders.index.list_type') - %th= t('intruders.index.key') + %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_ip') - %th= t('intruders.index.contact_port') %th= t('intruders.index.contact_count') %th= t('intruders.index.contact_last') %th= t('intruders.index.contacts_per_second') - %th= t('intruders.index.contacts_per_second_max') %th= t('intruders.index.user_agent') %th= t('intruders.index.to_user') - %th= t('intruders.index.comment') - for intruder in intruders %tr - %td= intruder.list_type - %td= intruder.key - %td= intruder.points - %td= intruder.bans - %td= intruder.ban_last - %td= intruder.ban_end + %td= intruder.list_type.chars.first %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= intruder.contact_last + %td + - if intruder.contact_last + = l intruder.contact_last, :format => :short %td= intruder.contacts_per_second - %td= intruder.contacts_per_second_max %td= intruder.user_agent %td= intruder.to_user - %td= intruder.comment - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => intruder} \ No newline at end of file + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => intruder} -- cgit v1.2.3 From 791bf973b02b626f876b7e5819e2037dcff90f84 Mon Sep 17 00:00:00 2001 From: "Mario \"Kuroir\" Ricalde" Date: Wed, 13 Feb 2013 05:39:21 -0600 Subject: Simple Form Fixes for Form Actions --- app/views/intruders/_form.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/intruders') diff --git a/app/views/intruders/_form.html.haml b/app/views/intruders/_form.html.haml index 26aab1c..02647f0 100644 --- a/app/views/intruders/_form.html.haml +++ b/app/views/intruders/_form.html.haml @@ -3,5 +3,5 @@ = render "form_core", :f => f - .actions - = f.button :submit, conditional_t('intruders.form.submit') \ No newline at end of file + .form-actions + = f.button :submit, conditional_t('intruders.form.submit') -- cgit v1.2.3