summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-13 14:13:04 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-13 14:13:04 +0100
commitd216accd6f00ec90e19f3171440ae7c5d7cdb53a (patch)
tree14f62a9807889088b84c3ba554363f714d78bdf6
parentc2aad881ff34ce544b24847279472448917f38e1 (diff)
Better UI for FaxDocument#show
-rw-r--r--app/views/fax_documents/show.html.haml62
-rw-r--r--db/schema.rb13
2 files changed, 50 insertions, 25 deletions
diff --git a/app/views/fax_documents/show.html.haml b/app/views/fax_documents/show.html.haml
index 41d3bff..de8c1cc 100644
--- a/app/views/fax_documents/show.html.haml
+++ b/app/views/fax_documents/show.html.haml
@@ -2,35 +2,49 @@
- child = @fax_document
- parent = @fax_document.fax_account
-%p
- %strong= t('fax_documents.index.state') + ":"
- = t("fax_documents.states.#{@fax_document.state}")
-
-%p
- %strong= t('fax_documents.index.result_code') + ":"
- = @fax_document.result_code
-
-%p
- %strong= t('fax_documents.index.result_text') + ":"
- = t("fax_documents.result_codes.code_#{@fax_document.result_code}")
-
-%p
- %strong= t('fax_documents.show.document_transferred_pages') + ":"
- = @fax_document.document_transferred_pages
-%p
- %strong= t('fax_documents.show.remote_station_id') + ":"
- = @fax_document.remote_station_id
-%p
- %strong= t('fax_documents.show.fax_resolution') + ":"
- = @fax_document.fax_resolution
+%table.table.table-striped
+ %tr
+ %td
+ %strong= t('fax_documents.index.state') + ":"
+ %td
+ = t("fax_documents.states.#{@fax_document.state}")
+ %tr
+ %td
+ %strong= t('fax_documents.index.result_code') + ":"
+ %td
+ = @fax_document.result_code
+ %tr
+ %td
+ %strong= t('fax_documents.index.result_text') + ":"
+ %td
+ = t("fax_documents.result_codes.code_#{@fax_document.result_code}")
+ %tr
+ %td
+ %strong= t('fax_documents.show.document_transferred_pages') + ":"
+ %td
+ = @fax_document.document_transferred_pages
+ %tr
+ %td
+ %strong= t('fax_documents.show.remote_station_id') + ":"
+ %td
+ = @fax_document.remote_station_id
+ %tr
+ %td
+ %strong= t('fax_documents.show.fax_resolution') + ":"
+ %td
+ = @fax_document.fax_resolution
- if @fax_document.fax_thumbnails.count > 0
- i = @fax_document.fax_thumbnails.count
- i = 10 if i > 10
- - @fax_document.fax_thumbnails.limit(i).each do |fax_thumbnail|
- =image_tag fax_thumbnail.thumbnail_url(:medium), :class => 'FaxThumbnail', :alt => "Thumbnail of page \##{fax_thumbnail.position}"
+ %p
+ - @fax_document.fax_thumbnails.limit(i).each do |fax_thumbnail|
+ =image_tag fax_thumbnail.thumbnail_url(:medium), :class => 'FaxThumbnail', :alt => "Thumbnail of page \##{fax_thumbnail.position}"
- if @fax_document.document.path
- = link_to t("fax_documents.index.actions.download_pdf"), "#{request.protocol}#{request.host_with_port}#{request.fullpath.split("?")[0]}.pdf"
+ %p
+ %a{:href => "#{request.protocol}#{request.host_with_port}#{request.fullpath.split("?")[0]}.pdf"}
+ %i{:class => 'icon-download'}
+ = t("fax_documents.index.actions.download_pdf")
= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @fax_document.fax_account, :child => @fax_document }
diff --git a/db/schema.rb b/db/schema.rb
index fc2b635..0637146 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20130212071000) do
+ActiveRecord::Schema.define(:version => 20130213110000) do
create_table "access_authorizations", :force => true do |t|
t.string "access_authorizationable_type"
@@ -701,6 +701,16 @@ ActiveRecord::Schema.define(:version => 20130212071000) do
t.datetime "updated_at", :null => false
end
+ create_table "parking_stalls", :force => true do |t|
+ t.string "name"
+ t.string "lot"
+ t.integer "parking_stallable_id"
+ t.string "parking_stallable_type"
+ t.string "comment"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
create_table "phone_book_entries", :force => true do |t|
t.integer "phone_book_id"
t.string "first_name"
@@ -899,6 +909,7 @@ ActiveRecord::Schema.define(:version => 20130212071000) do
t.integer "gs_node_original_id"
t.string "uuid"
t.boolean "is_native"
+ t.string "language_code"
end
add_index "sip_accounts", ["uuid"], :name => "index_sip_accounts_on_uuid"