summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-23 00:14:56 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-23 00:14:56 +0100
commit2bdfc8b1905d5069ded392c5ca377c59289278d9 (patch)
treeef1212574a31a5f2cd45ad65f0792e224b7852ec
parent8de0e8215c9a2f5f8ce2dce71bf9cdca367ee94e (diff)
Optimized UI.
-rw-r--r--app/views/fax_accounts/_index_core.html.haml30
1 files changed, 20 insertions, 10 deletions
diff --git a/app/views/fax_accounts/_index_core.html.haml b/app/views/fax_accounts/_index_core.html.haml
index f3e391e..2296d21 100644
--- a/app/views/fax_accounts/_index_core.html.haml
+++ b/app/views/fax_accounts/_index_core.html.haml
@@ -1,23 +1,28 @@
%table{:class => 'table table-striped'}
%thead
%tr
- %th= t('fax_accounts.index.name')
+ %th
+ %span.hidden-phone
+ = 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')
+ %span.hidden-phone
+ = t('fax_accounts.index.received')
+ = '/'
+ = t('fax_accounts.index.sent')
+ %br
+ %small
+ = t('fax_accounts.index.last_update')
%tbody
- for fax_account in fax_accounts
%tr
- %td= truncate(fax_account.name, :length => 15)
+ %td
+ %span.hidden-phone
+ =fax_account.name
%td
=render 'phone_numbers/listing', :phone_numbers => fax_account.phone_numbers.order(:number)
%br
@@ -26,11 +31,16 @@
= 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
+ - if fax_account.fax_documents.any?
%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)
+ %a.btn.btn-mini.btn-primary{:href => new_fax_account_fax_document_path(fax_account) }
+ %i.icon-print.icon-white
+ %span.hidden-phone
+ =t('fax_accounts.index.send_a_fax')
+
+
=render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => fax_account.fax_accountable, :child => fax_account} \ No newline at end of file