summaryrefslogtreecommitdiff
path: root/app/views/automatic_call_distributors/_index_core.html.haml
blob: e264c29799a1a8ba4d5094ea68b1a595ca2337f9 (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
35
%table.table.table-striped
  %thead
    %tr
      %th= t('automatic_call_distributors.index.name')
      %th
        %span.hidden-phone
          = t('automatic_call_distributors.index.strategy')
      %th= t('automatic_call_distributors.index.phone_numbers')
      %th
        %span.hidden-phone
          = t('automatic_call_distributors.index.acd_agents')

  %tbody
    - for automatic_call_distributor in automatic_call_distributors
      %tr
        %td
          %span.hidden-phone
            = automatic_call_distributor.name
          %span.visible-phone
            = truncate(automatic_call_distributor.name, :length => 8)
        %td
          %span.hidden-phone
            = t("automatic_call_distributors.strategies.#{automatic_call_distributor.strategy}")
        %td
          - if automatic_call_distributor.phone_numbers.any?
            = render 'phone_numbers/listing', :phone_numbers => automatic_call_distributor.phone_numbers
        %td
          %span.hidden-phone
            - if automatic_call_distributor.acd_agents.count > 3
              = link_to automatic_call_distributor.acd_agents.count, automatic_call_distributor_acd_agents_path(automatic_call_distributor)
              %br
            - elsif automatic_call_distributor.acd_agents.any?
              = render 'acd_agents/listing', :acd_agents => automatic_call_distributor.acd_agents

        =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => automatic_call_distributor.automatic_call_distributorable, :child => automatic_call_distributor}