summaryrefslogtreecommitdiff
path: root/app/views/fax_accounts/_index_core.html.haml
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:01:45 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:01:45 +0100
commitb80bd744ad873f6fc43018bc4bfb90677de167bd (patch)
tree072c4b0e33d442528555b82c415f5e7a1712b2b0 /app/views/fax_accounts/_index_core.html.haml
parent3e706c2025ecc5523e81ad649639ef2ff75e7bac (diff)
Start of GS5.
Diffstat (limited to 'app/views/fax_accounts/_index_core.html.haml')
-rw-r--r--app/views/fax_accounts/_index_core.html.haml35
1 files changed, 35 insertions, 0 deletions
diff --git a/app/views/fax_accounts/_index_core.html.haml b/app/views/fax_accounts/_index_core.html.haml
new file mode 100644
index 0000000..50dc2eb
--- /dev/null
+++ b/app/views/fax_accounts/_index_core.html.haml
@@ -0,0 +1,35 @@
+%table
+ %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')
+
+ - reset_cycle
+ - for fax_account in fax_accounts
+ %tr{:class => cycle('odd', 'even')}
+ %td= truncate(fax_account.name, :length => 15)
+ %td
+ =render 'phone_numbers/listing', :phone_numbers => fax_account.phone_numbers.order(:number)
+ %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)}")
+ = '/'
+ = 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