diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2017-05-30 12:04:53 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2017-05-30 12:04:53 +0000 |
commit | 1493bf03c6314f08b9f93222e09de09540cd0ee4 (patch) | |
tree | 33e5b1be390a537348e812430215dab2acf3fdb5 | |
parent | f3e2fba777b5100e30515987e9e692754239e693 (diff) | |
download | redmine-1493bf03c6314f08b9f93222e09de09540cd0ee4.tar.gz redmine-1493bf03c6314f08b9f93222e09de09540cd0ee4.zip |
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
-rw-r--r-- | app/views/issues/show.html.erb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 08028d270..26600559a 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -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) %> |