= render :partial => "phone_book_entries/navigation" - cache(['phone_book_entries_table', I18n.locale, current_user, phone_book_entries]) do %table.table.table-striped - for entry in phone_book_entries - cache(['phone_book_entries_table_tr', I18n.locale, current_user, entry]) do %tr %td = image_tag(entry.image_url(:small).to_s, :itemprop => 'image', :class => 'img-rounded') %td - if entry.is_organization == true %a.name{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => "name"}= entry - else %a.name{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => "name"}= entry %a.company{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'memberOf'}= entry.organization %td - if @found_phone_numbers and @found_phone_numbers.where(:phone_numberable_id => entry.id) %span{:style => 'white-space: nowrap'} %a.phone{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'telephone'}= @found_phone_numbers.where(:phone_numberable_id => entry.id).first - elsif entry.phone_numbers.first %span{:style => 'white-space: nowrap'} %a.phone{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'telephone'}= entry.phone_numbers.first - if entry.phone_numbers.count > 1 %a.more{:href => phone_book_phone_book_entry_path(entry.phone_book, entry)}= t('phone_book_entries.index.more_numbers', :numbers => (entry.phone_numbers.count-1)) %td %span.hidden-phone - if !entry.description.blank? = entry.description - if !entry.homepage_organization.blank? %br =link_to entry.homepage_organization, entry.homepage_organization - if can? :edit, entry %td %a.btn.btn-mini.btn-warning{:href => edit_phone_book_phone_book_entry_path( entry.phone_book, entry ) } %i.icon-edit.icon-white %span.hidden-phone =t('phone_book_entries.index.actions.edit') - if can? :destroy, entry %td %a.btn.btn-mini.btn-danger{"data-confirm" => t('phone_book_entries.index.actions.confirm'), "data-method" => "delete", :href => phone_book_phone_book_entry_path(entry.phone_book, entry), :rel => "nofollow"} %i.icon-trash.icon-white %span.hidden-phone =t('phone_book_entries.index.actions.destroy')