From 76dd233fa11da751b647c928bf07bb06df0be124 Mon Sep 17 00:00:00 2001 From: Roland Date: Mon, 3 Oct 2011 22:53:40 +0200 Subject: [PATCH] Fogbugz #87: use individualised titles for each page. --- app/helpers/application_helper.rb | 3 +++ app/views/contacts/index.html.erb | 1 + app/views/contacts/new.html.erb | 1 + config/locales/de.yml | 7 +++++-- config/locales/en.yml | 7 ++++++- 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index de6be79..3a541ca 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,2 +1,5 @@ module ApplicationHelper + def title(page_title) + content_for(:title) { page_title } + end end diff --git a/app/views/contacts/index.html.erb b/app/views/contacts/index.html.erb index c038244..5f57151 100644 --- a/app/views/contacts/index.html.erb +++ b/app/views/contacts/index.html.erb @@ -1,3 +1,4 @@ +<% title t("titles.contacts.index") %> <% @contacts.each do |c| %>
diff --git a/app/views/contacts/new.html.erb b/app/views/contacts/new.html.erb index a99f14f..f85dae6 100644 --- a/app/views/contacts/new.html.erb +++ b/app/views/contacts/new.html.erb @@ -1,3 +1,4 @@ +<% title t("titles.contacts.new") %>
diff --git a/config/locales/de.yml b/config/locales/de.yml index eb42fa6..2692fbd 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -9,6 +9,9 @@ de: sessions: actions: - logout: "out" + logout: "logout" - \ No newline at end of file + titles: + contacts: + index: "Übersicht" + new: "Neuer Kontakt" diff --git a/config/locales/en.yml b/config/locales/en.yml index f0ebb2b..c9f0a8d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -12,4 +12,9 @@ en: sessions: actions: - logout: "out" + logout: "logout" + + titles: + contacts: + index: "Overview" + new: "New Contact"