Feature #9994 » report_users_issues_projects_links.diff
| app/views/time_entry_reports/_report_criteria.rhtml (copie de travail) | ||
|---|---|---|
|
<%
|
||
|
#Criterias header columns
|
||
|
-%>
|
||
|
<%= '<td></td>' * level %><td><%= h(format_criteria_value(criterias[level], value)) %></td><%= '<td></td>' * (criterias.size - level - 1) %>
|
||
|
<%= '<td></td>' * level %><td><%= h(format_criteria_value(criterias[level], value, true)) %></td><%= '<td></td>' * (criterias.size - level - 1) %>
|
||
|
<%
|
||
|
total = 0
|
||
| app/helpers/timelog_helper.rb (copie de travail) | ||
|---|---|---|
|
export
|
||
|
end
|
||
|
def format_criteria_value(criteria, value)
|
||
|
def format_criteria_value(criteria, value, links=false)
|
||
|
if value.blank?
|
||
|
l(:label_none)
|
||
|
elsif k = @available_criterias[criteria][:klass]
|
||
|
obj = k.find_by_id(value.to_i)
|
||
|
if obj.is_a?(Issue)
|
||
|
obj.visible? ? "#{obj.tracker} ##{obj.id}: #{obj.subject}" : "##{obj.id}"
|
||
|
elsif obj.is_a?(User)
|
||
|
return link_to(h(obj.to_s), obj)
|
||
|
obj.visible? ? "#{obj.tracker} #{( links ? link_to("##{obj.id}", issue_path(obj.id)) : "##{obj.id}" )}: #{h(obj.subject)}".html_safe : "##{obj.id}"
|
||
|
elsif links && (obj.is_a?(User) || obj.is_a?(Project))
|
||
|
link_to(h(obj.to_s), obj)
|
||
|
else
|
||
|
obj
|
||
|
end
|
||