include CustomFieldsHelper
helper :ifpdf
include IfpdfHelper
+ helper :issues
helper IssuesHelper
helper :queries
include QueriesHelper
helper :sort
include SortHelper
+ helper :issues
def report
@available_criterias = { 'version' => {:sql => "#{Issue.table_name}.fixed_version_id",
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)
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'
+++ /dev/null
-<%= link_to_issue issue %></strong>: <%=h issue.subject %><br />
-<br />
-<strong><%= l(:field_start_date) %></strong>: <%= format_date(issue.start_date) %><br />
-<strong><%= l(:field_due_date) %></strong>: <%= format_date(issue.due_date) %><br />
-<strong><%= l(:field_assigned_to) %></strong>: <%= issue.assigned_to ? issue.assigned_to.name : "-" %><br />
-<strong><%= l(:field_priority) %></strong>: <%= issue.priority.name %>
<%= h(truncate(i.subject, 30)) %>
</small>
<span class="tip">
- <%= render :partial => "issues/tooltip", :locals => { :issue => i }%>
+ <%= render_issue_tooltip i %>
</span>
</div>
<% else %>
<% # === tooltip === %>
<div class="tooltip" style="position: absolute;top:<%= top %>px;left:<%= i_left %>px;width:<%= i_width %>px;height:12px;">
<span class="tip">
- <%= render :partial => "issues/tooltip", :locals => { :issue => i }%>
+ <%= render_issue_tooltip i %>
</span></div>
<% else
i_left = ((i.start_date - @date_from)*zoom).floor
<td align="center">\r
<% if entry.issue %>\r
<div class="tooltip">\r
- <%= link_to "#{entry.issue.tracker.name} ##{entry.issue.id}", {:action => 'details', :issue_id => entry.issue } %>\r
+ <%= link_to_issue entry.issue %>\r
<span class="tip">\r
- <%= render :partial => "issues/tooltip", :locals => { :issue => entry.issue }%>\r
+ <%= render_issue_tooltip entry.issue %>\r
</span> \r
</div>\r
<% end %>\r