summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-06-16 11:45:39 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-06-16 11:45:39 +0000
commitd2b25ef7b19a1df9e6e6a71c92c5dc7a3b886811 (patch)
treeb6136874ead3f50b6271445f15be91f2e28a3df7 /app/helpers
parent51515332f49ce61ed0ca0fc12cd3ff2ce46cf85e (diff)
downloadredmine-d2b25ef7b19a1df9e6e6a71c92c5dc7a3b886811.tar.gz
redmine-d2b25ef7b19a1df9e6e6a71c92c5dc7a3b886811.zip
shorten long line at app/helpers/application_helper.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@19825 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 158cb78c7..9c27ce3cb 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -426,10 +426,19 @@ module ApplicationHelper
if controller.controller_name == 'wiki' && controller.action_name == 'export'
href = "##{page.title}"
else
- href = {:controller => 'wiki', :action => 'show', :project_id => page.project, :id => page.title, :version => nil}
+ href = {:controller => 'wiki', :action => 'show',
+ :project_id => page.project, :id => page.title, :version => nil}
end
- content << link_to(h(page.pretty_title), href,
- :title => (options[:timestamp] && page.updated_on ? l(:label_updated_time, distance_of_time_in_words(Time.now, page.updated_on)) : nil))
+ content <<
+ link_to(
+ h(page.pretty_title),
+ href,
+ :title => (if options[:timestamp] && page.updated_on
+ l(:label_updated_time, distance_of_time_in_words(Time.now, page.updated_on))
+ else
+ nil
+ end)
+ )
content << "\n" + render_page_hierarchy(pages, page.id, options) if pages[page.id]
content << "</li>\n"
end