Commit debb0a2f authored by marutosijp's avatar marutosijp
Browse files

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: https://svn.redmine.org/redmine/trunk@16581 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent dd7aae94
......@@ -64,10 +64,8 @@
unless @issue.disabled_core_fields.include?('estimated_hours')
rows.right l(:field_estimated_hours), issue_estimated_hours_details(@issue), :class => 'estimated-hours'
end
if User.current.allowed_to?(:view_time_entries, @project)
if @issue.total_spent_hours > 0
rows.right l(:label_spent_time), issue_spent_hours_details(@issue), :class => 'spent-time'
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'
end
end %>
<%= render_half_width_custom_fields_rows(@issue) %>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment