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
This commit is contained in:
@@ -70,8 +70,8 @@ module ApplicationHelper
|
||||
|
||||
def format_date(date)
|
||||
return nil unless date
|
||||
@date_format_setting ||= Setting.date_format.to_i
|
||||
@date_format_setting == 0 ? l_date(date) : date.strftime("%Y-%m-%d")
|
||||
@date_format ||= (Setting.date_format.to_i == 0 ? l(:general_fmt_date) : date.strftime("%Y-%m-%d"))
|
||||
date.strftime(@date_format)
|
||||
end
|
||||
|
||||
def format_time(time)
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user