diff options
author | Go MAEDA <maeda@farend.jp> | 2019-01-22 23:34:57 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-01-22 23:34:57 +0000 |
commit | bb17ee52951fbc65666fb2e2e2cc5a696eeeb2ef (patch) | |
tree | 5accd7e21b443944b42ccf983e67376af77a37db /app | |
parent | eda4b6514b3ec1977720bc9d59d436b2d09b4c0f (diff) | |
download | redmine-bb17ee52951fbc65666fb2e2e2cc5a696eeeb2ef.tar.gz redmine-bb17ee52951fbc65666fb2e2e2cc5a696eeeb2ef.zip |
Show estimated time on the overview page as well as spent time (#30464).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@17838 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects_controller.rb | 1 | ||||
-rw-r--r-- | app/views/projects/show.html.erb | 13 |
2 files changed, 10 insertions, 4 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index a43038a98..1b88e5fc6 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -158,6 +158,7 @@ class ProjectsController < ApplicationController if User.current.allowed_to_view_all_time_entries?(@project) @total_hours = TimeEntry.visible.where(cond).sum(:hours).to_f + @total_estimated_hours = Issue.visible.where(cond).sum(:estimated_hours).to_f end @key = User.current.rss_key diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index a36afeb6c..923bc03e8 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -83,10 +83,15 @@ <% if User.current.allowed_to?(:view_time_entries, @project) %> <div class="spent_time box"> - <h3 class="icon icon-time"><%= l(:label_spent_time) %></h3> - <% if @total_hours.present? %> - <p><%= l_hours(@total_hours) %></p> - <% end %> + <h3 class="icon icon-time"><%= l(:label_time_tracking) %></h3> + <ul> + <% if @total_estimated_hours.present? %> + <li><%= l(:field_estimated_hours) %>: <%= l_hours(@total_estimated_hours) %> + <% end %> + <% if @total_hours.present? %> + <li><%= l(:label_spent_time) %>: <%= l_hours(@total_hours) %> + <% end %> + </ul> <p> <% if User.current.allowed_to?(:log_time, @project) %> <%= link_to l(:button_log_time), new_project_time_entry_path(@project) %> | |