1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-19 15:01:14 +00:00

use only one if with two conditions in issue show instead of two ifs (if in if) (#25731)

Contributed by Marius BALTEANU.

git-svn-id: http://svn.redmine.org/redmine/trunk@16581 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2017-05-30 12:04:53 +00:00
parent f3e2fba777
commit 1493bf03c6

View File

@ -64,11 +64,9 @@
unless @issue.disabled_core_fields.include?('estimated_hours') 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), :class => 'estimated-hours'
end end
if User.current.allowed_to?(:view_time_entries, @project) if User.current.allowed_to?(:view_time_entries, @project) && @issue.total_spent_hours > 0
if @issue.total_spent_hours > 0
rows.right l(:label_spent_time), issue_spent_hours_details(@issue), :class => 'spent-time' rows.right l(:label_spent_time), issue_spent_hours_details(@issue), :class => 'spent-time'
end end
end
end %> end %>
<%= render_half_width_custom_fields_rows(@issue) %> <%= render_half_width_custom_fields_rows(@issue) %>
<%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %> <%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>