diff options
Diffstat (limited to 'app/views/sip_accounts/_index_core.html.haml')
-rw-r--r-- | app/views/sip_accounts/_index_core.html.haml | 57 |
1 files changed, 33 insertions, 24 deletions
diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml index 8d9791d..34aac64 100644 --- a/app/views/sip_accounts/_index_core.html.haml +++ b/app/views/sip_accounts/_index_core.html.haml @@ -1,26 +1,35 @@ -%table{:class => 'table table-striped'} - %tr - %th= t('sip_accounts.index.online') - %th= t('sip_accounts.index.caller_name') - %th= t('sip_accounts.index.phone_numbers') - %th= t('phones.name') - %th{:colspan => '3'} - - - for sip_account in sip_accounts +%table.table.table-striped + %thead %tr - %td - - if sip_account.registration - %i.icon-ok - - else - %i.icon-thumbs-down - %td - = sip_account.caller_name - - phone_numbers = sip_account.phone_numbers - %td - - if sip_account.phone_numbers.count > 0 - = render 'phone_numbers/listing', :phone_numbers => sip_account.phone_numbers.order(:number) + %th + %span.hidden-phone + = t('sip_accounts.index.online') + %th= t('sip_accounts.index.caller_name') + %th + %span.hidden-phone + = t('sip_accounts.index.phone_numbers') + - if sip_accounts.map{ |sip_account| sip_account.phone_sip_accounts.any? }.include?(true) + %th + %span.hidden-phone + = t('phones.name') - %td - - sip_account.phones.each do |phone| - = link_to phone.to_s, method( :"#{phone.phoneable_type.underscore}_phone_path" ).( phone.phoneable_id, phone ) - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => sip_account.sip_accountable, :child => sip_account}
\ No newline at end of file + %tbody + - for sip_account in sip_accounts + %tr{:class => (sip_account.registration ? '' : 'warning')} + %td + - if sip_account.registration + %i.icon-ok + - else + %i.icon-thumbs-down + %td + = sip_account.caller_name + - phone_numbers = sip_account.phone_numbers + %td + - if sip_account.phone_numbers.count > 0 + = render 'phone_numbers/listing', :phone_numbers => sip_account.phone_numbers.order(:number) + - if sip_accounts.map{ |sip_account| sip_account.phone_sip_accounts.any? }.include?(true) + %td + %span.hidden-phone + - sip_account.phones.each do |phone| + = link_to phone.to_s, method( :"#{phone.phoneable_type.underscore}_phone_path" ).( phone.phoneable_id, phone ) + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => sip_account.sip_accountable, :child => sip_account} |