diff --git a/.gitignore b/.gitignore index cf54e93..bc236cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ app/views/issues/show.html.erb +.idea + #ignore vim files *.swp -*.swo \ No newline at end of file +*.swo diff --git a/app/views/issues/3.0.0.show.html.erb b/app/views/issues/3.0.0.show.html.erb index bf23a7c..2c3012b 100644 --- a/app/views/issues/3.0.0.show.html.erb +++ b/app/views/issues/3.0.0.show.html.erb @@ -63,7 +63,7 @@ end end if User.current.allowed_to?(:view_time_entries, @project) - rows.right l(:label_spent_time), (@issue.total_spent_hours > 0 ? link_to(l_hours(@issue.total_spent_hours), issue_time_entries_path(@issue)) : "-"), :class => 'spent-time' + rows.right l(:label_spent_time), (@issue.total_spent_hours > 0 ? link_to(l_hours(@total_hours), issue_time_entries_path(@issue)) : '-'), :class => 'spent-time' end end %> <%= render_custom_fields_rows(@issue) %> diff --git a/app/views/issues/3.0.1.show.html.erb b/app/views/issues/3.0.1.show.html.erb index d74ba56..677efdc 100644 --- a/app/views/issues/3.0.1.show.html.erb +++ b/app/views/issues/3.0.1.show.html.erb @@ -63,7 +63,7 @@ end end if User.current.allowed_to?(:view_time_entries, @project) - rows.right l(:label_spent_time), (@issue.total_spent_hours > 0 ? link_to(l_hours(@issue.total_spent_hours), issue_time_entries_path(@issue)) : "-"), :class => 'spent-time' + rows.right l(:label_spent_time), (@issue.total_spent_hours > 0 ? link_to(l_hours(@total_hours), issue_time_entries_path(@issue)) : '-'), :class => 'spent-time' end end %> <%= render_custom_fields_rows(@issue) %> diff --git a/app/views/issues/3.2.0.show.html.erb b/app/views/issues/3.2.0.show.html.erb index c0269fe..17d8e20 100644 --- a/app/views/issues/3.2.0.show.html.erb +++ b/app/views/issues/3.2.0.show.html.erb @@ -62,9 +62,9 @@ rows.right l(:field_estimated_hours), issue_estimated_hours_details(@issue), :class => 'estimated-hours' end end - if User.current.allowed_to_view_all_time_entries?(@project) + 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' + rows.right l(:label_spent_time), (@issue.total_spent_hours > 0 ? link_to(l_hours(@total_hours), issue_time_entries_path(@issue)) : '-'), :class => 'spent-time' end end end %> diff --git a/app/views/issues/_floating_report.html.erb b/app/views/issues/_floating_report.html.erb index ac7e08e..502a17f 100644 --- a/app/views/issues/_floating_report.html.erb +++ b/app/views/issues/_floating_report.html.erb @@ -1,7 +1,7 @@
<%= content_tag(:span, format_date( entry.spent_on ) ) if spent_on_shown? %> diff --git a/app/views/issues/_time_spent_report.html.erb b/app/views/issues/_time_spent_report.html.erb index 7745a6d..f80b93d 100644 --- a/app/views/issues/_time_spent_report.html.erb +++ b/app/views/issues/_time_spent_report.html.erb @@ -1,8 +1,8 @@
<%= t('plugin_spent_time_in_issue.timeEntries') %> - <% if @issue.time_entries.count > Setting.plugin_redmine_spent_time_in_issue_description['spent_time_max_display'].to_i %> - <%= link_to "#{t "plugin_spent_time_in_issue.seeAllCount", count: @issue.time_entries.count}", issue_time_entries_path( @issue ) %> + <% if @time_entries.count > Setting.plugin_redmine_spent_time_in_issue_description['spent_time_max_display'].to_i %> + <%= link_to "#{t "plugin_spent_time_in_issue.seeAllCount", count: @time_entries.count}", issue_time_entries_path( @issue ) %> <% end %>
@@ -14,7 +14,7 @@ <%= content_tag(:th ) %> - <% @issue.time_entries.last( Setting.plugin_redmine_spent_time_in_issue_description['spent_time_max_display'].to_i ).each do |entry| %> + <% @time_entries.last( Setting.plugin_redmine_spent_time_in_issue_description['spent_time_max_display'].to_i ).each do |entry| %>