diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/intruders_controller.rb | 2 | ||||
-rw-r--r-- | app/views/intruders/_index_core.html.haml | 9 | ||||
-rw-r--r-- | app/views/sip_accounts/_index_core.html.haml | 4 | ||||
-rw-r--r-- | app/views/users/show.html.haml | 16 |
4 files changed, 23 insertions, 8 deletions
diff --git a/app/controllers/intruders_controller.rb b/app/controllers/intruders_controller.rb index 147e06d..99cb023 100644 --- a/app/controllers/intruders_controller.rb +++ b/app/controllers/intruders_controller.rb @@ -1,6 +1,6 @@ class IntrudersController < ApplicationController def index - @intruders = Intruder.all + @intruders = Intruder.order('list_type ASC, contact_last DESC').all spread_breadcrumbs end diff --git a/app/views/intruders/_index_core.html.haml b/app/views/intruders/_index_core.html.haml index 31bbd11..63f2253 100644 --- a/app/views/intruders/_index_core.html.haml +++ b/app/views/intruders/_index_core.html.haml @@ -16,7 +16,14 @@ - for intruder in intruders %tr - %td= intruder.list_type.chars.first + %td + - if intruder.list_type == 'whitelist' + %i.icon-ok + - elsif intruder.bans > 0 + %i.icon-fire + - elsif intruder.points > 0 + %i.icon-warning-sign + %td= intruder.contact_ip %td= intruder.contact_port %td= intruder.points diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml index 34aac64..d98ea0a 100644 --- a/app/views/sip_accounts/_index_core.html.haml +++ b/app/views/sip_accounts/_index_core.html.haml @@ -20,13 +20,13 @@ - if sip_account.registration %i.icon-ok - else - %i.icon-thumbs-down + %i.icon-ban-circle %td = sip_account.caller_name - phone_numbers = sip_account.phone_numbers %td - if sip_account.phone_numbers.count > 0 - = render 'phone_numbers/listing', :phone_numbers => sip_account.phone_numbers.order(:number) + = render 'phone_numbers/listing', :phone_numbers => sip_account.phone_numbers.order(:position) - if sip_accounts.map{ |sip_account| sip_account.phone_sip_accounts.any? }.include?(true) %td %span.hidden-phone diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index d3b1cf3..8148005 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -29,10 +29,18 @@ = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @tenant, :child => @user } - @user.sip_accounts.each do |sip_account| - - phone_number = sip_account.phone_numbers.order(:number).last - - if phone_number && !phone_number.number.blank? && phone_number.number[0] != '+' - %p - %strong= sip_account.phone_numbers.order(:number).last.number + - phone_numbers = sip_account.phone_numbers.order(:position) + %p + - if phone_numbers[0] + %strong= phone_numbers[0].number + - else + %strong= sip_account.to_s + - if phone_numbers[1] + %strong= phone_numbers[1].number + - if phone_numbers[2] + %strong= phone_numbers[2].number + - if phone_numbers[3] + %strong ... %p =link_to t("call_histories.index.page_title"), sip_account_call_histories_path(sip_account) %br |