summaryrefslogtreecommitdiff
path: root/app/views/sip_accounts/_index_core.html.haml
blob: e94db83ceb9653306300061589f419ceb2f18839 (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
34
%table{:class => 'table table-striped'}
  %thead
    %tr
      %th
        %span.hidden-phone
          = t('sip_accounts.index.online')
      %th= t('sip_accounts.index.caller_name')
      %th
        %span.hidden-phone
          = t('sip_accounts.index.phone_numbers')
      %th
        %span.hidden-phone
          = t('phones.name')

  %tbody
    - for sip_account in sip_accounts
      %tr
        %td
          - if sip_account.registration
            %i.icon-ok
          - else
            %i.icon-thumbs-down
        %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)

        %td
          %span.hidden-phone
            - sip_account.phones.each do |phone|
              = link_to phone.to_s, method( :"#{phone.phoneable_type.underscore}_phone_path" ).( phone.phoneable_id, phone )
        =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => sip_account.sip_accountable, :child => sip_account}