blob: 3000e97a5d7a0850896fe6e295abf2954f6fe3c0 (
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
|
- show_seconds = hunt_groups.map{|x| ! x.seconds_between_jumps.nil? }.include?(true)
%table
%tr
%th= t('hunt_groups.index.name')
%th= t('hunt_groups.index.strategy')
- if show_seconds
%th= t('hunt_groups.index.seconds_between_jumps')
%th= t('hunt_groups.index.phone_numbers')
%th= t('hunt_groups.index.hunt_group_members')
- reset_cycle
- for hunt_group in hunt_groups
%tr{:class => cycle('odd', 'even')}
%td= hunt_group.name
%td= t("hunt_groups.strategies.#{hunt_group.strategy}")
- if show_seconds
%td= hunt_group.seconds_between_jumps
%td
- if hunt_group.phone_numbers.count > 0
=render 'phone_numbers/listing', :phone_numbers => hunt_group.phone_numbers
%br
= render :partial => 'shared/create_link', :locals => {:parent => hunt_group, :child_class => PhoneNumber, :short_link => true}
%td
- if hunt_group.hunt_group_members.count > 3
= link_to hunt_group.hunt_group_members.count, hunt_group_hunt_group_members_path(hunt_group)
%br
- elsif hunt_group.hunt_group_members.count > 0
=render 'hunt_group_members/listing', :hunt_group_members => hunt_group.hunt_group_members
%br
= render :partial => 'shared/create_link', :locals => {:parent => hunt_group, :child_class => HuntGroupMember, :short_link => true}
=render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => hunt_group.tenant, :child => hunt_group}
|