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_documents/_index_core.html.haml | 61 ++++++++++++++------------- 1 file changed, 31 insertions(+), 30 deletions(-) (limited to 'app/views/fax_documents') diff --git a/app/views/fax_documents/_index_core.html.haml b/app/views/fax_documents/_index_core.html.haml index 1265716..d3abafa 100644 --- a/app/views/fax_documents/_index_core.html.haml +++ b/app/views/fax_documents/_index_core.html.haml @@ -1,33 +1,34 @@ %table{:class => 'table table-striped'} - %tr - %th= t('fax_documents.index.sent_at') - %th= t('fax_documents.index.state') - %th= t('fax_documents.index.result') - %th - = t('fax_documents.index.phone_number') - %br - = t('fax_documents.index.remote_station_id') - %th= t('fax_documents.index.thumbnails') + %thead + %tr + %th= t('fax_documents.index.sent_at') + %th= t('fax_documents.index.state') + %th= t('fax_documents.index.result') + %th + = t('fax_documents.index.phone_number') + %br + = t('fax_documents.index.remote_station_id') + %th= t('fax_documents.index.thumbnails') - - - for fax_document in fax_documents - %tr{:id => "fax_document_#{fax_document.id}"} - - if fax_document.sent_at - %td= "#{fax_document.inbound ? '⇨' : '⇦'} #{fax_document.sent_at}".html_safe - %td= t("fax_documents.states.#{fax_document.state}") - %td= t("fax_documents.result_codes.code_#{fax_document.result_code}") + " (#{fax_document.result_code})" - - else - %td{ :colspan => 3 }= t("fax_documents.states.#{fax_document.state}") - %td - - if fax_document.inbound - = "#{fax_document.caller_id_number} #{fax_document.caller_id_name}" + %tbody + - for fax_document in fax_documents + %tr{:id => "fax_document_#{fax_document.id}"} + - if fax_document.sent_at + %td= "#{fax_document.inbound ? '⇨' : '⇦'} #{fax_document.sent_at}".html_safe + %td= t("fax_documents.states.#{fax_document.state}") + %td= t("fax_documents.result_codes.code_#{fax_document.result_code}") + " (#{fax_document.result_code})" - else - = fax_document.destination_phone_number - %br - = fax_document.remote_station_id - %td - - fax_document.fax_thumbnails.limit(5).each do |fax_thumbnail| - =image_tag fax_thumbnail.thumbnail_url(:mini), :class => 'FaxThumbnail', :alt => "Thumbnail of page \##{fax_thumbnail.position}" - - if can?(:show, fax_document) && !fax_document.document.blank? && File.readable?(fax_document.document.path) - = link_to t('fax_documents.index.actions.download'), fax_account_fax_document_path(@fax_account, fax_document, :format => :pdf), :method => :get - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => fax_document.fax_account, :child => fax_document} + %td{ :colspan => 3 }= t("fax_documents.states.#{fax_document.state}") + %td + - if fax_document.inbound + = "#{fax_document.caller_id_number} #{fax_document.caller_id_name}" + - else + = fax_document.destination_phone_number + %br + = fax_document.remote_station_id + %td + - fax_document.fax_thumbnails.limit(5).each do |fax_thumbnail| + =image_tag fax_thumbnail.thumbnail_url(:mini), :class => 'FaxThumbnail', :alt => "Thumbnail of page \##{fax_thumbnail.position}" + - if can?(:show, fax_document) && !fax_document.document.blank? && File.readable?(fax_document.document.path) + = link_to t('fax_documents.index.actions.download'), fax_account_fax_document_path(@fax_account, fax_document, :format => :pdf), :method => :get + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => fax_document.fax_account, :child => fax_document} -- cgit v1.2.3 From 680073d4cf7619bddfb7f79ea9e538a33d9dcdee Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 20:11:45 +0100 Subject: Refactoring --- app/views/fax_documents/_index_core.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/fax_documents') diff --git a/app/views/fax_documents/_index_core.html.haml b/app/views/fax_documents/_index_core.html.haml index d3abafa..1408eba 100644 --- a/app/views/fax_documents/_index_core.html.haml +++ b/app/views/fax_documents/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('fax_documents.index.sent_at') -- cgit v1.2.3 From bf1b92197212d3bd44ac8101814a7ffb08bb14bc Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 28 Jan 2013 12:41:36 +0100 Subject: date in fax index --- app/views/fax_documents/_index_core.html.haml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/views/fax_documents') diff --git a/app/views/fax_documents/_index_core.html.haml b/app/views/fax_documents/_index_core.html.haml index 1408eba..8559f1c 100644 --- a/app/views/fax_documents/_index_core.html.haml +++ b/app/views/fax_documents/_index_core.html.haml @@ -14,7 +14,9 @@ - for fax_document in fax_documents %tr{:id => "fax_document_#{fax_document.id}"} - if fax_document.sent_at - %td= "#{fax_document.inbound ? '⇨' : '⇦'} #{fax_document.sent_at}".html_safe + %td + = "#{fax_document.inbound ? '⇨' : '⇦'}".html_safe + = l fax_document.sent_at, :format => :short %td= t("fax_documents.states.#{fax_document.state}") %td= t("fax_documents.result_codes.code_#{fax_document.result_code}") + " (#{fax_document.result_code})" - else -- cgit v1.2.3