summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-01-02 22:41:53 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-01-02 22:41:53 +0000
commit3e0acc0b7e1fda93d8bdd9df7b7c8c9551fad864 (patch)
treea6c9bbd76bc54f0c1c7a41845e8831fa83053ff9 /app/helpers
parent636579b17ddd4b775b060cdb0ac3a94db5e4cb2b (diff)
downloadredmine-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')
-rw-r--r--app/helpers/application_helper.rb21
-rw-r--r--app/helpers/repositories_helper.rb2
2 files changed, 12 insertions, 11 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',
diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb
index d2d04604d..d7d7f4349 100644
--- a/app/helpers/repositories_helper.rb
+++ b/app/helpers/repositories_helper.rb
@@ -55,7 +55,7 @@ module RepositoriesHelper
def with_leading_slash(path)
path ||= ''
- path.starts_with?("/") ? "/#{path}" : path
+ path.starts_with?('/') ? path : "/#{path}"
end
def subversion_field_tags(form, repository)