From 5867df0eff12622c826cf0d699d3c2ec4aff5a7d Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Fri, 4 Jan 2013 10:01:48 +0100 Subject: Set :autofocus => true for the first_name. --- app/views/phone_book_entries/_form_core.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/phone_book_entries') diff --git a/app/views/phone_book_entries/_form_core.html.haml b/app/views/phone_book_entries/_form_core.html.haml index c05139e..5159668 100644 --- a/app/views/phone_book_entries/_form_core.html.haml +++ b/app/views/phone_book_entries/_form_core.html.haml @@ -1,6 +1,6 @@ .inputs = f.input :is_male, :collection => [[true, t('phone_book_entries.form.gender.male')], [false, t('phone_book_entries.form.gender.female')]], :label_method => :last, :value_method => :first, :label => t('phone_book_entries.form.male.label'), :hint => conditional_hint('phone_book_entries.form.gender.hint'), :label => t('phone_book_entries.form.gender.label'), :as => :radio - = f.input :first_name, :label => t('phone_book_entries.form.first_name.label'), :hint => conditional_hint('phone_book_entries.form.first_name.hint') + = f.input :first_name, :label => t('phone_book_entries.form.first_name.label'), :hint => conditional_hint('phone_book_entries.form.first_name.hint'), :autofocus => true = f.input :middle_name, :label => t('phone_book_entries.form.middle_name.label'), :hint => conditional_hint('phone_book_entries.form.middle_name.hint') = f.input :last_name, :label => t('phone_book_entries.form.last_name.label'), :hint => conditional_hint('phone_book_entries.form.last_name.hint') = f.input :birth_name, :label => t('phone_book_entries.form.birth_name.label'), :hint => conditional_hint('phone_book_entries.form.birth_name.hint') -- cgit v1.2.3 From b67c3f5ff6474ba117c75eb81c7d2d9371e8a103 Mon Sep 17 00:00:00 2001 From: spag Date: Tue, 8 Jan 2013 14:11:54 +0100 Subject: Click to dial in phone book --- app/views/phone_book_entries/show.html.haml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'app/views/phone_book_entries') diff --git a/app/views/phone_book_entries/show.html.haml b/app/views/phone_book_entries/show.html.haml index a9e1e8f..ff43b8a 100644 --- a/app/views/phone_book_entries/show.html.haml +++ b/app/views/phone_book_entries/show.html.haml @@ -67,27 +67,28 @@ = @phone_book_entry.description .widget.phones - @phone_book_entry.phone_numbers.each do |phone_number| - - case phone_number.name + - case phone_number.name.to_s.downcase - when /fax/ .fax - %a= phone_number + = link_to phone_number, call_phone_book_entry_phone_number_path(@phone_book_entry, phone_number), :method => :put, :title => t('phone_numbers.show.actions.call') %span= phone_number.name - when /home/ .home - %a= phone_number - %span= phone_number.name + = link_to phone_number, call_phone_book_entry_phone_number_path(@phone_book_entry, phone_number), :method => :put, :title => t('phone_numbers.show.actions.call') + %span - when /mobile/ .cellphone - %a= phone_number + = link_to phone_number, call_phone_book_entry_phone_number_path(@phone_book_entry, phone_number), :method => :put, :title => t('phone_numbers.show.actions.call') %span= phone_number.name - when /office/ .office - %a= phone_number + = link_to phone_number, call_phone_book_entry_phone_number_path(@phone_book_entry, phone_number), :method => :put, :title => t('phone_numbers.show.actions.call') %span= phone_number.name - else .phone - %a= phone_number + = link_to phone_number, call_phone_book_entry_phone_number_path(@phone_book_entry, phone_number), :method => :put, :title => t('phone_numbers.show.actions.call') %span= phone_number.name + = link_to t('phone_book_entries.show.manage_phone_numbers'), phone_book_entry_phone_numbers_path(@phone_book_entry) .widget.adresses -- cgit v1.2.3 From 078e90282bab4b76d6eb0678c9e5f69d7ae86748 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 15 Jan 2013 19:13:44 +0100 Subject: Added caching for the phone_book_entries table. --- .../phone_book_entries/_index_core.de.html.haml | 72 ++++++++++----------- app/views/phone_book_entries/_index_core.html.haml | 73 +++++++++++----------- 2 files changed, 75 insertions(+), 70 deletions(-) (limited to 'app/views/phone_book_entries') diff --git a/app/views/phone_book_entries/_index_core.de.html.haml b/app/views/phone_book_entries/_index_core.de.html.haml index 0c6e74b..e460888 100644 --- a/app/views/phone_book_entries/_index_core.de.html.haml +++ b/app/views/phone_book_entries/_index_core.de.html.haml @@ -2,39 +2,41 @@ %section.phone-book-entries %header.entries-nav= render :partial => "phone_book_entries/navigation" .content - - reset_cycle - %table - - for entry in phone_book_entries - ~# Dear IE7, - ~# Because of you we have to do this with a table. - ~# With Love, - ~# Mario. - %tr.phone-book-entry{:class => cycle('odd', 'even'), :"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 + - cache([I18n.locale, 'phone_book_entries_table', current_user, phone_book_entries]) do + - reset_cycle + %table + - for entry in phone_book_entries + - cache([I18n.locale, 'phone_book_entries_table_tr', current_user, entry]) do + ~# Dear IE7, + ~# Because of you we have to do this with a table. + ~# With Love, + ~# Mario. + %tr.phone-book-entry{:class => cycle('odd', 'even'), :"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 9054833..37ad905 100644 --- a/app/views/phone_book_entries/_index_core.html.haml +++ b/app/views/phone_book_entries/_index_core.html.haml @@ -2,39 +2,42 @@ %section.phone-book-entries %header.entries-nav= render :partial => "phone_book_entries/navigation" .content - - reset_cycle - %table - - for entry in phone_book_entries - ~# Dear IE7, - ~# Because of you we have to do this with a table. - ~# With Love, - ~# Mario. - %tr.phone-book-entry{:class => cycle('odd', 'even'), :"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 + - cache([I18n.locale, 'phone_book_entries_table', current_user, phone_book_entries]) do + - reset_cycle + - reset_cycle + %table + - for entry in phone_book_entries + - cache([I18n.locale, 'phone_book_entries_table_tr', current_user, entry]) do + ~# Dear IE7, + ~# Because of you we have to do this with a table. + ~# With Love, + ~# Mario. + %tr.phone-book-entry{:class => cycle('odd', 'even'), :"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" -- cgit v1.2.3 From 96fc4789d9991548b9fd1144f185da1f3464f156 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 15 Jan 2013 21:47:26 +0100 Subject: Fixed caching bugs. --- app/views/phone_book_entries/_index_core.de.html.haml | 4 ++-- app/views/phone_book_entries/_index_core.html.haml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/views/phone_book_entries') diff --git a/app/views/phone_book_entries/_index_core.de.html.haml b/app/views/phone_book_entries/_index_core.de.html.haml index e460888..43d62f6 100644 --- a/app/views/phone_book_entries/_index_core.de.html.haml +++ b/app/views/phone_book_entries/_index_core.de.html.haml @@ -2,11 +2,11 @@ %section.phone-book-entries %header.entries-nav= render :partial => "phone_book_entries/navigation" .content - - cache([I18n.locale, 'phone_book_entries_table', current_user, phone_book_entries]) do + - cache(['phone_book_entries_table', I18n.locale, current_user, phone_book_entries]) do - reset_cycle %table - for entry in phone_book_entries - - cache([I18n.locale, 'phone_book_entries_table_tr', current_user, entry]) do + - 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, diff --git a/app/views/phone_book_entries/_index_core.html.haml b/app/views/phone_book_entries/_index_core.html.haml index 37ad905..e98e8d5 100644 --- a/app/views/phone_book_entries/_index_core.html.haml +++ b/app/views/phone_book_entries/_index_core.html.haml @@ -2,12 +2,12 @@ %section.phone-book-entries %header.entries-nav= render :partial => "phone_book_entries/navigation" .content - - cache([I18n.locale, 'phone_book_entries_table', current_user, phone_book_entries]) do + - cache(['phone_book_entries_table', I18n.locale, current_user, phone_book_entries]) do - reset_cycle - reset_cycle %table - for entry in phone_book_entries - - cache([I18n.locale, 'phone_book_entries_table_tr', current_user, entry]) do + - 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, -- cgit v1.2.3 From 18ed88c7e3c789366f6e5443dc4ee0bc981a4b88 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 20:18:16 +0100 Subject: Started the migration to Twitter Bootstrap. --- app/views/phone_book_entries/_index_core.de.html.haml | 2 +- app/views/phone_book_entries/_index_core.html.haml | 2 +- app/views/phone_book_entries/edit.html.haml | 2 +- app/views/phone_book_entries/index.html.haml | 2 +- app/views/phone_book_entries/new.html.haml | 2 +- app/views/phone_book_entries/show.html.haml | 2 +- app/views/phone_book_entries/show.html.haml.examlple | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'app/views/phone_book_entries') diff --git a/app/views/phone_book_entries/_index_core.de.html.haml b/app/views/phone_book_entries/_index_core.de.html.haml index 43d62f6..bc8d118 100644 --- a/app/views/phone_book_entries/_index_core.de.html.haml +++ b/app/views/phone_book_entries/_index_core.de.html.haml @@ -4,7 +4,7 @@ .content - cache(['phone_book_entries_table', I18n.locale, current_user, phone_book_entries]) do - reset_cycle - %table + %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, diff --git a/app/views/phone_book_entries/_index_core.html.haml b/app/views/phone_book_entries/_index_core.html.haml index e98e8d5..0e687f9 100644 --- a/app/views/phone_book_entries/_index_core.html.haml +++ b/app/views/phone_book_entries/_index_core.html.haml @@ -5,7 +5,7 @@ - cache(['phone_book_entries_table', I18n.locale, current_user, phone_book_entries]) do - reset_cycle - reset_cycle - %table + %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, diff --git a/app/views/phone_book_entries/edit.html.haml b/app/views/phone_book_entries/edit.html.haml index d4fad4d..2967366 100644 --- a/app/views/phone_book_entries/edit.html.haml +++ b/app/views/phone_book_entries/edit.html.haml @@ -1,4 +1,4 @@ -- title t("phone_book_entries.edit.page_title") +- content_for :title, t("phone_book_entries.edit.page_title") = render "form" diff --git a/app/views/phone_book_entries/index.html.haml b/app/views/phone_book_entries/index.html.haml index 6a17eb9..10d1ce2 100644 --- a/app/views/phone_book_entries/index.html.haml +++ b/app/views/phone_book_entries/index.html.haml @@ -1,4 +1,4 @@ -- title t("phone_book_entries.index.page_title") +- content_for :title, t("phone_book_entries.index.page_title") - if @phone_books %p diff --git a/app/views/phone_book_entries/new.html.haml b/app/views/phone_book_entries/new.html.haml index d72d1a4..2f3a8be 100644 --- a/app/views/phone_book_entries/new.html.haml +++ b/app/views/phone_book_entries/new.html.haml @@ -1,3 +1,3 @@ -- title t("phone_book_entries.new.page_title") +- content_for :title, t("phone_book_entries.new.page_title") = render "form" diff --git a/app/views/phone_book_entries/show.html.haml b/app/views/phone_book_entries/show.html.haml index ff43b8a..7dd9bcb 100644 --- a/app/views/phone_book_entries/show.html.haml +++ b/app/views/phone_book_entries/show.html.haml @@ -1,4 +1,4 @@ -- title nil +- content_for :title, nil %section.phone-book-entry .content diff --git a/app/views/phone_book_entries/show.html.haml.examlple b/app/views/phone_book_entries/show.html.haml.examlple index 176ad04..980f776 100644 --- a/app/views/phone_book_entries/show.html.haml.examlple +++ b/app/views/phone_book_entries/show.html.haml.examlple @@ -1,4 +1,4 @@ -- title nil +- content_for :title, nil %section.phone-book-entry .content -- cgit v1.2.3 From d8fe3b636cab1504cb5d3cb5dc57ed818749ccf5 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 21:30:48 +0100 Subject: Twitter Bootstrap stuff. --- app/views/phone_book_entries/_index_core.de.html.haml | 2 +- app/views/phone_book_entries/_index_core.html.haml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views/phone_book_entries') diff --git a/app/views/phone_book_entries/_index_core.de.html.haml b/app/views/phone_book_entries/_index_core.de.html.haml index bc8d118..fb1dd6f 100644 --- a/app/views/phone_book_entries/_index_core.de.html.haml +++ b/app/views/phone_book_entries/_index_core.de.html.haml @@ -3,7 +3,7 @@ %header.entries-nav= render :partial => "phone_book_entries/navigation" .content - cache(['phone_book_entries_table', I18n.locale, current_user, phone_book_entries]) do - - reset_cycle + %table{:class => 'table table-striped'} - for entry in phone_book_entries - cache(['phone_book_entries_table_tr', I18n.locale, current_user, entry]) do diff --git a/app/views/phone_book_entries/_index_core.html.haml b/app/views/phone_book_entries/_index_core.html.haml index 0e687f9..1e24b5d 100644 --- a/app/views/phone_book_entries/_index_core.html.haml +++ b/app/views/phone_book_entries/_index_core.html.haml @@ -3,8 +3,8 @@ %header.entries-nav= render :partial => "phone_book_entries/navigation" .content - cache(['phone_book_entries_table', I18n.locale, current_user, phone_book_entries]) do - - reset_cycle - - reset_cycle + + %table{:class => 'table table-striped'} - for entry in phone_book_entries - cache(['phone_book_entries_table_tr', I18n.locale, current_user, entry]) do -- cgit v1.2.3 From c52babd4346b1a52c28bb7437d0434ecfb9ab70f Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 22:25:32 +0100 Subject: Twitter Bootstrap stuff. --- app/views/phone_book_entries/_index_core.de.html.haml | 2 +- app/views/phone_book_entries/_index_core.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/phone_book_entries') diff --git a/app/views/phone_book_entries/_index_core.de.html.haml b/app/views/phone_book_entries/_index_core.de.html.haml index fb1dd6f..fe72d26 100644 --- a/app/views/phone_book_entries/_index_core.de.html.haml +++ b/app/views/phone_book_entries/_index_core.de.html.haml @@ -11,7 +11,7 @@ ~# Because of you we have to do this with a table. ~# With Love, ~# Mario. - %tr.phone-book-entry{:class => cycle('odd', 'even'), :"itemscope itemtype" => "http://schema.org/Person"} + %tr.phone-book-entry{:"itemscope itemtype" => "http://schema.org/Person"} %td.thumbnail = image_tag(entry.image_url(:small).to_s, :itemprop => 'image') %td.user diff --git a/app/views/phone_book_entries/_index_core.html.haml b/app/views/phone_book_entries/_index_core.html.haml index 1e24b5d..6e35221 100644 --- a/app/views/phone_book_entries/_index_core.html.haml +++ b/app/views/phone_book_entries/_index_core.html.haml @@ -12,7 +12,7 @@ ~# Because of you we have to do this with a table. ~# With Love, ~# Mario. - %tr.phone-book-entry{:class => cycle('odd', 'even'), :"itemscope itemtype" => "http://schema.org/Person"} + %tr.phone-book-entry{:"itemscope itemtype" => "http://schema.org/Person"} %td.thumbnail = image_tag(entry.image_url(:small).to_s, :itemprop => 'image') %td.user -- cgit v1.2.3