From 8fdc1332bbff9c23400459dc7018cba147279cc5 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 22 Jan 2013 21:21:49 +0100 Subject: Added %thead and %tbody to the tables. --- app/views/hunt_groups/_index_core.html.haml | 55 +++++++++++++++-------------- 1 file changed, 28 insertions(+), 27 deletions(-) (limited to 'app/views/hunt_groups/_index_core.html.haml') 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 -- cgit v1.2.3