From 3a0ea10cdd6084a8beb235f5c1573c22a5d733f0 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 14 Mar 2013 20:21:59 +0100 Subject: Added a dashboard for Switchboard. --- .../switchboards/_current_user_dashboard.html.haml | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 app/views/switchboards/_current_user_dashboard.html.haml (limited to 'app/views/switchboards/_current_user_dashboard.html.haml') diff --git a/app/views/switchboards/_current_user_dashboard.html.haml b/app/views/switchboards/_current_user_dashboard.html.haml new file mode 100644 index 0000000..1c57a0d --- /dev/null +++ b/app/views/switchboards/_current_user_dashboard.html.haml @@ -0,0 +1,26 @@ +.dashboard + - current_user.sip_accounts.each do |sip_account| + %table.table.table-striped + %thead + %tr + %td + SIP Account + %td + Direction + %td + StartStamp + %td + Destination + %td + CalleeName + %tbody + - sip_account.calls.each do |call| + %tr + %td + - current_user.sip_accounts.each do |sip_account| + %span.label.label-info + =sip_account.phone_numbers.first.to_s + %td=call.direction + %td=l Time.at(call.start_stamp) + %td=call.destination + %td=call.callee_name \ No newline at end of file -- cgit v1.2.3 From 0b4e3dfd031b21c26f7bc9c7c05cd931950ecbd6 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 14 Mar 2013 21:34:06 +0100 Subject: Switchboard stuff --- .../switchboards/_current_user_dashboard.html.haml | 35 +++++++++++++--------- 1 file changed, 21 insertions(+), 14 deletions(-) (limited to 'app/views/switchboards/_current_user_dashboard.html.haml') diff --git a/app/views/switchboards/_current_user_dashboard.html.haml b/app/views/switchboards/_current_user_dashboard.html.haml index 1c57a0d..8dd75b9 100644 --- a/app/views/switchboards/_current_user_dashboard.html.haml +++ b/app/views/switchboards/_current_user_dashboard.html.haml @@ -4,23 +4,30 @@ %thead %tr %td - SIP Account - %td - Direction - %td - StartStamp %td Destination %td - CalleeName + Start + %td{:span => '2'} + Caller %tbody - - sip_account.calls.each do |call| + - sip_account.call_legs.where(callstate: 'RINGING').each do |call_leg| + %tr.warning + %td + %i.icon-bell + %td + %span.label.label-info + =sip_account.phone_numbers.first.to_s + %td=l Time.at(call_leg.start_stamp) + %td=call_leg.callee_name + %td=call_leg.callee_number + + - sip_account.b_call_legs.where(direction: 'inbound').each do |call_leg| %tr %td - - current_user.sip_accounts.each do |sip_account| - %span.label.label-info - =sip_account.phone_numbers.first.to_s - %td=call.direction - %td=l Time.at(call.start_stamp) - %td=call.destination - %td=call.callee_name \ No newline at end of file + %td + %span.label.label-info + =sip_account.phone_numbers.first.to_s + %td=l Time.at(call_leg.start_stamp) + %td=call_leg.b_caller_id_name + %td=call_leg.b_caller_id_number -- cgit v1.2.3