diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-01-02 22:41:53 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-01-02 22:41:53 +0000 |
commit | 3e0acc0b7e1fda93d8bdd9df7b7c8c9551fad864 (patch) | |
tree | a6c9bbd76bc54f0c1c7a41845e8831fa83053ff9 /app/helpers/application_helper.rb | |
parent | 636579b17ddd4b775b060cdb0ac3a94db5e4cb2b (diff) | |
download | redmine-3e0acc0b7e1fda93d8bdd9df7b7c8c9551fad864.tar.gz redmine-3e0acc0b7e1fda93d8bdd9df7b7c8c9551fad864.zip |
Slight improvements to the browser views.
ApplicationHelper#set_html_title replaced by html_title with arguments and can be called several times in views to append elements to the title.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1032 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2c6a1ba49..e3ac2498f 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -145,16 +145,17 @@ module ApplicationHelper links.size > 1 ? l(:label_display_per_page, links.join(', ')) : nil end - def set_html_title(text) - @html_header_title = text - end - - def html_title - title = [] - title << @project.name if @project - title << @html_header_title - title << Setting.app_title - title.compact.join(' - ') + def html_title(*args) + if args.empty? + title = [] + title << @project.name if @project + title += @html_title if @html_title + title << Setting.app_title + title.compact.join(' - ') + else + @html_title ||= [] + @html_title += args + end end ACCESSKEYS = {:edit => 'e', |