summaryrefslogtreecommitdiff
path: root/app/views/fax_documents/show.html.haml
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-13 17:19:47 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-13 17:19:47 +0100
commit12a6b6ec57d67da3d4969378a0d930042bcc97bd (patch)
treefea5f5aced45cde40c7d826a5de927e545d94e85 /app/views/fax_documents/show.html.haml
parent3db09ff394b92b5d168c32c355d4529fd3861d36 (diff)
UI improvments for FaxDocument#index and FaxDocument#show
Diffstat (limited to 'app/views/fax_documents/show.html.haml')
-rw-r--r--app/views/fax_documents/show.html.haml16
1 files changed, 12 insertions, 4 deletions
diff --git a/app/views/fax_documents/show.html.haml b/app/views/fax_documents/show.html.haml
index 3419d5c..9925c2f 100644
--- a/app/views/fax_documents/show.html.haml
+++ b/app/views/fax_documents/show.html.haml
@@ -1,11 +1,19 @@
- content_for :title, t("fax_documents.show.page_title")
-- child = @fax_document
-- parent = @fax_document.fax_account
.row
.span12
%table.table.table-striped
- %tr
+ - case @fax_document.state
+ - when 'unsuccessful'
+ - current_status = 'error'
+ - when 'sending'
+ - current_status = 'success'
+ - when 'queued_for_sending'
+ - current_status = 'warning'
+ - else
+ - current_status = ''
+
+ %tr{:class => current_status}
%td
%strong= t('fax_documents.index.state') + ":"
%td
@@ -46,7 +54,7 @@
.span12
- if @fax_document.fax_thumbnails.any?
%ul.thumbnails
- - @fax_document.fax_thumbnails.each do |fax_thumbnail|
+ - @fax_document.fax_thumbnails.limit(50).each do |fax_thumbnail|
%li.span4
%div.thumbnail
%a.thumbnail{:href => fax_thumbnail.thumbnail.url}