diff options
author | Julian Pawlowski <julian.pawlowski@gmail.com> | 2013-01-28 14:17:52 +0100 |
---|---|---|
committer | Julian Pawlowski <julian.pawlowski@gmail.com> | 2013-01-28 14:17:52 +0100 |
commit | 8aa7de2636dcd22781b623d5c9270f5ecf8b85c2 (patch) | |
tree | 1bb5dc36fb28c96ad9be9a2357d380c2c24ee31e /app/views/phone_book_entries | |
parent | 39aa7132ceed3d4beab3a9b828e571bbfc67c07e (diff) | |
parent | 600574759573e48da9f5f82d4ff8a863b6830c95 (diff) |
Merge branch 'develop'5.1-beta2
Diffstat (limited to 'app/views/phone_book_entries')
-rw-r--r-- | app/views/phone_book_entries/_index_core.de.html.haml | 42 | ||||
-rw-r--r-- | app/views/phone_book_entries/_index_core.html.haml | 86 | ||||
-rw-r--r-- | app/views/phone_book_entries/_navigation.html.haml | 13 |
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 |