summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-14 21:41:33 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-14 21:41:33 +0100
commit5ed3837a8688e46a33d3ad3b0eb0343eb1a5ba85 (patch)
tree5dd4665cd1294ea691a0446d6228d666bc409568
parent0b4e3dfd031b21c26f7bc9c7c05cd931950ecbd6 (diff)
Switchboard UI improvements.
-rw-r--r--app/views/switchboard_entries/_switchboard_entry.html.haml10
1 files changed, 7 insertions, 3 deletions
diff --git a/app/views/switchboard_entries/_switchboard_entry.html.haml b/app/views/switchboard_entries/_switchboard_entry.html.haml
index b82bb74..8c44153 100644
--- a/app/views/switchboard_entries/_switchboard_entry.html.haml
+++ b/app/views/switchboard_entries/_switchboard_entry.html.haml
@@ -12,7 +12,7 @@
%small
= truncate(switchboard_entry.to_s, :length => 23)
%br
- - if switchboard_entry.sip_account.phone_numbers.any?
+ - if switchboard_entry.sip_account.phone_numbers.any? && !switchboard_entry.sip_account.call_legs.where(callstate: 'ACTIVE').any? && !switchboard_entry.sip_account.b_call_legs.where(b_callstate: 'ACTIVE').any?
%span.label
= switchboard_entry.sip_account.phone_numbers.first.number
@@ -29,12 +29,16 @@
= "calls #{call_leg.destination}"
- switchboard_entry.sip_account.call_legs.where(callstate: 'ACTIVE').each do |call_leg|
+ %span.label
+ = "#{switchboard_entry.sip_account.phone_numbers.first.number} => "
%span.label.label-info
- = "#{call_leg.b_caller_id_number} => #{call_leg.callee_number}"
+ = "#{call_leg.callee_number}"
- switchboard_entry.sip_account.b_call_legs.where(b_callstate: 'ACTIVE').each do |b_call_leg|
%span.label.label-info
- = "#{b_call_leg.b_caller_id_number} => #{b_call_leg.destination}"
+ = "#{b_call_leg.b_caller_id_number} =>"
+ %span.label
+ = switchboard_entry.sip_account.phone_numbers.first.number
- else
%span.label.label-inverse