Patch #35674 ยป 0001-Issues-Show-improvements.patch
| app/helpers/issues_helper.rb | ||
|---|---|---|
|
:project => (issue.project_id != child.project_id)),
|
||
|
:class => 'subject') +
|
||
|
content_tag('td', h(child.status), :class => 'status') +
|
||
|
content_tag('td', link_to_user(child.assigned_to), :class => 'assigned_to') +
|
||
|
content_tag('td', format_date(child.start_date), :class => 'start_date') +
|
||
|
content_tag('td', format_date(child.due_date), :class => 'due_date') +
|
||
|
content_tag('td', (child.assigned_to ? link_to_user(child.assigned_to) : "-"), :class => 'assigned_to') +
|
||
|
content_tag('td', (child.start_date ? format_date(child.start_date) : "-"), :class => 'start_date') +
|
||
|
content_tag('td', (child.due_date ? format_date(child.due_date) : "-"), :class => 'due_date') +
|
||
|
content_tag('td',
|
||
|
(if child.disabled_core_fields.include?('done_ratio')
|
||
|
''
|
||
| ... | ... | |
|
end.html_safe,
|
||
|
:class => 'subject') +
|
||
|
content_tag('td', other_issue.status, :class => 'status') +
|
||
|
content_tag('td', link_to_user(other_issue.assigned_to), :class => 'assigned_to') +
|
||
|
content_tag('td', format_date(other_issue.start_date), :class => 'start_date') +
|
||
|
content_tag('td', format_date(other_issue.due_date), :class => 'due_date') +
|
||
|
content_tag('td', (other_issue.assigned_to ? link_to_user(other_issue.assigned_to) : "-"), :class => 'assigned_to') +
|
||
|
content_tag('td', (other_issue.start_date ? format_date(other_issue.start_date) : "-"), :class => 'start_date') +
|
||
|
content_tag('td', (other_issue.start_date ? format_date(other_issue.due_date) : "-"), :class => 'due_date') +
|
||
|
content_tag('td',
|
||
|
(if other_issue.disabled_core_fields.include?('done_ratio')
|
||
|
''
|
||
| ... | ... | |
|
end
|
||
|
def issue_estimated_hours_details(issue)
|
||
|
if issue.total_estimated_hours.present?
|
||
|
if issue.total_estimated_hours.present? && issue.total_estimated_hours > 0
|
||
|
if issue.total_estimated_hours == issue.estimated_hours
|
||
|
l_hours_short(issue.estimated_hours)
|
||
|
else
|
||
| ... | ... | |
|
issue_fields_rows do |rows|
|
||
|
values.each_with_index do |value, i|
|
||
|
m = (i < half ? :left : :right)
|
||
|
rows.send m, custom_field_name_tag(value.custom_field), custom_field_value_tag(value), :class => value.custom_field.css_classes
|
||
|
rows.send m, custom_field_name_tag(value.custom_field), (custom_field_value_tag(value).present? ? custom_field_value_tag(value) : "-"), :class => value.custom_field.css_classes
|
||
|
end
|
||
|
end
|
||
|
end
|
||
| ... | ... | |
|
s = ''.html_safe
|
||
|
values.each_with_index do |value, i|
|
||
|
attr_value_tag = custom_field_value_tag(value)
|
||
|
attr_value_tag = (custom_field_value_tag(value).present? ? custom_field_value_tag(value) : "-")
|
||
|
next if attr_value_tag.blank?
|
||
|
content =
|
||
| app/views/issues/show.html.erb | ||
|---|---|---|
|
end
|
||
|
unless @issue.disabled_core_fields.include?('start_date')
|
||
|
rows.right l(:field_start_date), format_date(@issue.start_date), :class => 'start-date'
|
||
|
rows.right l(:field_start_date), (@issue.start_date ? format_date(@issue.start_date) : "-"), :class => 'start-date'
|
||
|
end
|
||
|
unless @issue.disabled_core_fields.include?('due_date')
|
||
|
rows.right l(:field_due_date), issue_due_date_details(@issue), :class => 'due-date'
|
||
|
rows.right l(:field_due_date), (issue_due_date_details(@issue) ? issue_due_date_details(@issue) : "-"), :class => 'due-date'
|
||
|
end
|
||
|
unless @issue.disabled_core_fields.include?('done_ratio')
|
||
|
rows.right l(:field_done_ratio), progress_bar(@issue.done_ratio, :legend => "#{@issue.done_ratio}%"), :class => 'progress'
|
||
|
end
|
||
|
unless @issue.disabled_core_fields.include?('estimated_hours')
|
||
|
rows.right l(:field_estimated_hours), issue_estimated_hours_details(@issue), :class => 'estimated-hours'
|
||
|
rows.right l(:field_estimated_hours), (issue_estimated_hours_details(@issue).present? ? issue_estimated_hours_details(@issue) : "-"), :class => 'estimated-hours'
|
||
|
end
|
||
|
if User.current.allowed_to?(:view_time_entries, @project) && @issue.total_spent_hours > 0
|
||
|
rows.right l(:label_spent_time), issue_spent_hours_details(@issue), :class => 'spent-time'
|
||
|
if User.current.allowed_to?(:view_time_entries, @project)
|
||
|
rows.right l(:label_spent_time), (issue_spent_hours_details(@issue).present? ? issue_spent_hours_details(@issue) : "-"), :class => 'spent-time'
|
||
|
end
|
||
|
end %>
|
||
|
<%= render_half_width_custom_fields_rows(@issue) %>
|
||
|
<%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
|
||
|
</div>
|
||
|
<% if @issue.description? %>
|
||
|
<% if @issue.description? && !@issue.disabled_core_fields.include?('description') %>
|
||
|
<hr />
|
||
|
<div class="description">
|
||
|
<div class="contextual">
|
||
| ... | ... | |
|
<%= textilizable @issue, :description, :attachments => @issue.attachments %>
|
||
|
</div>
|
||
|
</div>
|
||
|
<% elsif !@issue.description? && !@issue.disabled_core_fields.include?('description') %>
|
||
|
<hr />
|
||
|
<div class="description">
|
||
|
<p><strong><%=l(:field_description)%></strong></p>
|
||
|
<div class="wiki">-</div>
|
||
|
</div>
|
||
|
<% else %>
|
||
|
<% end %>
|
||
|
<%= render_full_width_custom_fields_rows(@issue) %>
|
||
|
<% if @issue.attachments.any? %>
|
||
|
<hr />
|
||
|
<p><strong><%=l(:label_attachment_plural)%></strong></p>
|
||
|
<%= link_to_attachments @issue, :thumbnails => true %>
|
||
|
<% end %>
|
||
|
<%= render_full_width_custom_fields_rows(@issue) %>
|
||
|
<%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
|
||
|
<% if !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %>
|
||