summaryrefslogtreecommitdiff
path: root/app/views/switchboards/_current_user_dashboard.html.haml
blob: 8dd75b94bbc4f604b66079885bda6e557aaaa3ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.dashboard
  - current_user.sip_accounts.each do |sip_account|
    %table.table.table-striped
      %thead
        %tr
          %td
          %td
            Destination
          %td
            Start
          %td{:span => '2'}
            Caller
      %tbody
        - 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
            %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