diff options
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 21 | ||||
-rw-r--r-- | app/helpers/repositories_helper.rb | 2 |
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) |