diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-22 21:21:49 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-22 21:21:49 +0100 |
commit | 8fdc1332bbff9c23400459dc7018cba147279cc5 (patch) | |
tree | b56793380fc4305dc23060fc4294721eb859217f /app/views/hunt_groups | |
parent | a81b51c2696e403bcd7ee59f0402f5b55527ab2c (diff) |
Added %thead and %tbody to the tables.
Diffstat (limited to 'app/views/hunt_groups')
-rw-r--r-- | app/views/hunt_groups/_index_core.html.haml | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/app/views/hunt_groups/_index_core.html.haml b/app/views/hunt_groups/_index_core.html.haml index 16b1b5d..5f6e797 100644 --- a/app/views/hunt_groups/_index_core.html.haml +++ b/app/views/hunt_groups/_index_core.html.haml @@ -1,34 +1,35 @@ - show_seconds = hunt_groups.map{|x| ! x.seconds_between_jumps.nil? }.include?(true) %table{:class => 'table table-striped'} - %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') - - - - for hunt_group in hunt_groups + %thead %tr - %td= hunt_group.name - %td= t("hunt_groups.strategies.#{hunt_group.strategy}") + %th= t('hunt_groups.index.name') + %th= t('hunt_groups.index.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} + %th= t('hunt_groups.index.seconds_between_jumps') + %th= t('hunt_groups.index.phone_numbers') + %th= t('hunt_groups.index.hunt_group_members') + + %tbody + - for hunt_group in hunt_groups + %tr + %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} + %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}
\ No newline at end of file + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => hunt_group.tenant, :child => hunt_group}
\ No newline at end of file |