summaryrefslogtreecommitdiff
path: root/app/views/fax_documents/show.html.haml
blob: 9925c2faec9168e6f90d81dc60104945ec1b8a08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
- content_for :title, t("fax_documents.show.page_title")

.row
  .span12
    %table.table.table-striped
      - 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
          = 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.document?
      %p
        %a{:href => @fax_document.document.url}
          %i{:class => 'icon-download'}
          = t("fax_documents.index.actions.download_pdf") + " (#{number_to_human_size(@fax_document.document.size, :precision => 2)})"

.row
  .span12
    - if @fax_document.fax_thumbnails.any?
      %ul.thumbnails
        - @fax_document.fax_thumbnails.limit(50).each do |fax_thumbnail|
          %li.span4
            %div.thumbnail
              %a.thumbnail{:href => fax_thumbnail.thumbnail.url}
                =image_tag(fax_thumbnail.thumbnail.url, :alt => "Page #{fax_thumbnail.position}")
              %p
                = "#{fax_thumbnail.position}/#{@fax_document.fax_thumbnails.count}"

.row
  .span12
    = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @fax_document.fax_account, :child => @fax_document }