diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-10-03 17:20:04 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-10-03 17:20:04 +0000 |
commit | 20b4e226fe06db9132eccafd9f3c2c008ec99c09 (patch) | |
tree | be316ade1b637fe971324dae50152c61ef5fd507 /app/helpers/issues_helper.rb | |
parent | c3e3a1891b721ae98d937cb060f109df8dc54346 (diff) | |
download | redmine-20b4e226fe06db9132eccafd9f3c2c008ec99c09.tar.gz redmine-20b4e226fe06db9132eccafd9f3c2c008ec99c09.zip |
Performance improvement on calendar and gantt (about 45% on gantt for large number of issues).
Partial issues/_tooltip is replaced by an helper and some translated strings are now cached.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@794 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/issues_helper.rb')
-rw-r--r-- | app/helpers/issues_helper.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 8ef1de8f7..997f094a4 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -17,6 +17,19 @@ module IssuesHelper + def render_issue_tooltip(issue) + @cached_label_start_date ||= l(:field_start_date) + @cached_label_due_date ||= l(:field_due_date) + @cached_label_assigned_to ||= l(:field_assigned_to) + @cached_label_priority ||= l(:field_priority) + + link_to_issue(issue) + ": #{h(issue.subject)}<br /><br />" + + "<strong>#{@cached_label_start_date}</strong>: #{format_date(issue.start_date)}<br />" + + "<strong>#{@cached_label_due_date}</strong>: #{format_date(issue.due_date)}<br />" + + "<strong>#{@cached_label_assigned_to}</strong>: #{issue.assigned_to}<br />" + + "<strong>#{@cached_label_priority}</strong>: #{issue.priority.name}" + end + def show_detail(detail, no_html=false) case detail.property when 'attr' |