Update site pages

This commit is contained in:
2012-11-14 15:12:28 +01:00
parent bb7b9258e5
commit 0036e5da60
25 changed files with 132 additions and 32 deletions
+3 -1
View File
@@ -1,6 +1,6 @@
module ApplicationHelper
def title(*args)
content_tag :h1 do
res = content_tag :h1, class: 'page-title' do
if args.first.is_a?(Symbol) && (args[1].respond_to?(:model_name) || args[1].class.respond_to?(:model_name))
model = args[1].respond_to?(:model_name) ? args[1] : args[1].class
if args.first == :index
@@ -12,6 +12,8 @@ module ApplicationHelper
args.first
end
end
content_for :page_title, res
res
end
# overwrite i18n l, to handle nil values