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/fax_accounts/_index_core.html.haml | 61 ++++++++++++++-------------- 1 file changed, 31 insertions(+), 30 deletions(-) (limited to 'app/views/fax_accounts/_index_core.html.haml') diff --git a/app/views/fax_accounts/_index_core.html.haml b/app/views/fax_accounts/_index_core.html.haml index 5a04bf0..f3e391e 100644 --- a/app/views/fax_accounts/_index_core.html.haml +++ b/app/views/fax_accounts/_index_core.html.haml @@ -1,35 +1,36 @@ %table{:class => 'table table-striped'} - %tr - %th= t('fax_accounts.index.name') - %th - = t('fax_accounts.index.phone_numbers') - %br - = t('fax_accounts.index.station_id') - %th - = t('fax_accounts.index.received') - = '/' - = t('fax_accounts.index.sent') - %br - %small - = t('fax_accounts.index.last_update') - - - - for fax_account in fax_accounts + %thead %tr - %td= truncate(fax_account.name, :length => 15) - %td - =render 'phone_numbers/listing', :phone_numbers => fax_account.phone_numbers.order(:number) + %th= t('fax_accounts.index.name') + %th + = t('fax_accounts.index.phone_numbers') %br - = truncate(fax_account.station_id, :length => 20) - %td - = link_to fax_account.fax_documents.inbound.count, fax_account_fax_documents_path(fax_account, :anchor => "fax_document_#{fax_account.fax_documents.inbound.first.try(:id)}") + = t('fax_accounts.index.station_id') + %th + = t('fax_accounts.index.received') = '/' - = link_to fax_account.fax_documents.outbound.count, fax_account_fax_documents_path(fax_account, :anchor => "fax_document_#{fax_account.fax_documents.outbound.first.try(:id)}") - - if fax_account.fax_documents.count > 0 + = t('fax_accounts.index.sent') + %br + %small + = t('fax_accounts.index.last_update') + + %tbody + - for fax_account in fax_accounts + %tr + %td= truncate(fax_account.name, :length => 15) + %td + =render 'phone_numbers/listing', :phone_numbers => fax_account.phone_numbers.order(:number) %br - %small - = time_ago_in_words(fax_account.fax_documents.order(:updated_at).last.updated_at) - %td - - if can?(:new, FaxDocument, :fax_account_id => fax_account.id) - = link_to t('fax_accounts.index.send_a_fax'), new_fax_account_fax_document_path(fax_account) - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => fax_account.fax_accountable, :child => fax_account} \ No newline at end of file + = truncate(fax_account.station_id, :length => 20) + %td + = link_to fax_account.fax_documents.inbound.count, fax_account_fax_documents_path(fax_account, :anchor => "fax_document_#{fax_account.fax_documents.inbound.first.try(:id)}") + = '/' + = link_to fax_account.fax_documents.outbound.count, fax_account_fax_documents_path(fax_account, :anchor => "fax_document_#{fax_account.fax_documents.outbound.first.try(:id)}") + - if fax_account.fax_documents.count > 0 + %br + %small + = time_ago_in_words(fax_account.fax_documents.order(:updated_at).last.updated_at) + %td + - if can?(:new, FaxDocument, :fax_account_id => fax_account.id) + = link_to t('fax_accounts.index.send_a_fax'), new_fax_account_fax_document_path(fax_account) + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => fax_account.fax_accountable, :child => fax_account} \ No newline at end of file -- cgit v1.2.3