summaryrefslogtreecommitdiff
path: root/app/views/phone_book_entries
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/phone_book_entries')
-rw-r--r--app/views/phone_book_entries/_index_core.de.html.haml42
-rw-r--r--app/views/phone_book_entries/_index_core.html.haml86
-rw-r--r--app/views/phone_book_entries/_navigation.html.haml13
3 files changed, 49 insertions, 92 deletions
diff --git a/app/views/phone_book_entries/_index_core.de.html.haml b/app/views/phone_book_entries/_index_core.de.html.haml
deleted file mode 100644
index fe72d26..0000000
--- a/app/views/phone_book_entries/_index_core.de.html.haml
+++ /dev/null
@@ -1,42 +0,0 @@
-~# To Look for the other fields, please look into Git History.
-%section.phone-book-entries
- %header.entries-nav= render :partial => "phone_book_entries/navigation"
- .content
- - cache(['phone_book_entries_table', I18n.locale, current_user, phone_book_entries]) do
-
- %table{:class => 'table table-striped'}
- - for entry in phone_book_entries
- - cache(['phone_book_entries_table_tr', I18n.locale, current_user, entry]) do
- ~# Dear IE7,
- ~# Because of you we have to do this with a table.
- ~# With Love,
- ~# Mario.
- %tr.phone-book-entry{:"itemscope itemtype" => "http://schema.org/Person"}
- %td.thumbnail
- = image_tag(entry.image_url(:small).to_s, :itemprop => 'image')
- %td.user
- - 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.contact
- - if @found_phone_numbers and @found_phone_numbers.where(:phone_numberable_id => entry.id)
- %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
- %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.extra
- - if !entry.description.blank?
- %strong Beschreibung:
- %div
- = entry.description
- - if !entry.homepage_organization.blank?
- %br
- =link_to entry.homepage_organization, entry.homepage_organization
- - if can? :edit, entry
- %td= link_to t('phone_book_entries.index.actions.edit'), edit_phone_book_phone_book_entry_path( entry.phone_book, entry )
- - if can? :destroy, entry
- %td= link_to t('phone_book_entries.index.actions.destroy'), [entry.phone_book, entry], :confirm => t('phone_book_entries.index.actions.confirm'), :method => :delete
- %footer.entries-nav= render :partial => "phone_book_entries/navigation"
diff --git a/app/views/phone_book_entries/_index_core.html.haml b/app/views/phone_book_entries/_index_core.html.haml
index 6e35221..6669da6 100644
--- a/app/views/phone_book_entries/_index_core.html.haml
+++ b/app/views/phone_book_entries/_index_core.html.haml
@@ -1,43 +1,43 @@
-~# To Look for the other fields, please look into Git History.
-%section.phone-book-entries
- %header.entries-nav= render :partial => "phone_book_entries/navigation"
- .content
- - cache(['phone_book_entries_table', I18n.locale, current_user, phone_book_entries]) do
-
-
- %table{:class => 'table table-striped'}
- - for entry in phone_book_entries
- - cache(['phone_book_entries_table_tr', I18n.locale, current_user, entry]) do
- ~# Dear IE7,
- ~# Because of you we have to do this with a table.
- ~# With Love,
- ~# Mario.
- %tr.phone-book-entry{:"itemscope itemtype" => "http://schema.org/Person"}
- %td.thumbnail
- = image_tag(entry.image_url(:small).to_s, :itemprop => 'image')
- %td.user
- - 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.contact
- - if @found_phone_numbers and @found_phone_numbers.where(:phone_numberable_id => entry.id)
- %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
- %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.extra
- - if !entry.description.blank?
- %strong Description:
- %div
- = entry.description
- - if !entry.homepage_organization.blank?
- %br
- =link_to entry.homepage_organization, entry.homepage_organization
- - if can? :edit, entry
- %td= link_to t('phone_book_entries.index.actions.edit'), edit_phone_book_phone_book_entry_path( entry.phone_book, entry )
- - if can? :destroy, entry
- %td= link_to t('phone_book_entries.index.actions.destroy'), [entry.phone_book, entry], :confirm => t('phone_book_entries.index.actions.confirm'), :method => :delete
- %footer.entries-nav= render :partial => "phone_book_entries/navigation"
+= 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')
diff --git a/app/views/phone_book_entries/_navigation.html.haml b/app/views/phone_book_entries/_navigation.html.haml
index dd1e8a7..a9a3d58 100644
--- a/app/views/phone_book_entries/_navigation.html.haml
+++ b/app/views/phone_book_entries/_navigation.html.haml
@@ -1,8 +1,7 @@
-%nav
- %ol.abc
- - %w{# A B C D E F G H I J K L M N O P Q R S T U V W X Y Z}.each do |char|
- %li
- %a{ :href => "?name=#{char}" }= char
+%ul{:class => 'nav nav-pills'}
+ - %w{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z}.each do |char|
+ %li
+ %a{ :href => "?name=#{char}" }= char
-.pagination
- = will_paginate @phone_book_entries
+/ .pagination
+/ = will_paginate @phone_book_entries