summaryrefslogtreecommitdiff
path: root/app/views/switchboard_entries/_switchboard_entry.html.haml
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-14 20:21:59 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-14 20:21:59 +0100
commit3a0ea10cdd6084a8beb235f5c1573c22a5d733f0 (patch)
treeb46f34f8b88593af3bdcc164a563614d2dd41969 /app/views/switchboard_entries/_switchboard_entry.html.haml
parentf476fb7648fd235642233b2bbe5bb90cb57e8549 (diff)
Added a dashboard for Switchboard.
Diffstat (limited to 'app/views/switchboard_entries/_switchboard_entry.html.haml')
-rw-r--r--app/views/switchboard_entries/_switchboard_entry.html.haml28
1 files changed, 17 insertions, 11 deletions
diff --git a/app/views/switchboard_entries/_switchboard_entry.html.haml b/app/views/switchboard_entries/_switchboard_entry.html.haml
index b2b6bff..8d4ee92 100644
--- a/app/views/switchboard_entries/_switchboard_entry.html.haml
+++ b/app/views/switchboard_entries/_switchboard_entry.html.haml
@@ -12,16 +12,22 @@
%small
= truncate(switchboard_entry.to_s, :length => 10)
%br
- - if !switchboard_entry.sip_account.registration
- %span.label.label-inverse
- %i.icon-ban-circle.icon-white
- - else
- - if switchboard_entry.sip_account.call_legs(:where => ["HELD", "ACTIVE"]).size != 0
- %span.label.label-success
- %i.icon-user.icon-white
- - if switchboard_entry.sip_account.call_legs(:where => ["RINGING"]).size != 0
- %span.label.label-info
- %i.icon-bell.icon-white
- if switchboard_entry.sip_account.phone_numbers.any?
%span.label
- = switchboard_entry.sip_account.phone_numbers.first.number
+ = switchboard_entry.sip_account.phone_numbers.first.number
+
+ %br
+
+ - if switchboard_entry.sip_account.registration
+ - switchboard_entry.sip_account.calls.each do |call|
+ - if call.callstate == 'RINGING'
+ %span.label.label-info
+ %i.icon-bell.icon-white
+ = "from #{call.callee_number}"
+
+ - if call.callstate == 'EARLY'
+ %span.label.label-info
+ = "calls #{call.destination}"
+ - else
+ %span.label.label-inverse
+ %i.icon-ban-circle.icon-white