]> source.dussan.org Git - redmine.git/commitdiff
New "Spent time" menu tab when spent time module is enabled on project (#23311).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 20 Aug 2016 12:18:29 +0000 (12:18 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 20 Aug 2016 12:18:29 +0000 (12:18 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@15747 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/timelog_controller.rb
lib/redmine.rb

index 93051fd66f1103f55c319b9db654d30358607654..cab4a5d214654883383e2946c5e8245790e88039 100644 (file)
@@ -16,7 +16,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 class TimelogController < ApplicationController
-  menu_item :issues
+  menu_item :time_entries
 
   before_action :find_time_entry, :only => [:show, :edit, :update]
   before_action :find_time_entries, :only => [:bulk_edit, :bulk_update, :destroy]
index 71722cc8e2bfe6e0af973d815e4b08781c86be5d..56ad9f6c7dcc798b2dea9c7e8b7f1db497c11e73 100644 (file)
@@ -255,6 +255,7 @@ Redmine::MenuManager.map :project_menu do |menu|
               :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) },
               :if => Proc.new { |p| Setting.new_item_menu_tab == '1' && Issue.allowed_target_trackers(p).any? },
               :permission => :add_issues
+  menu.push :time_entries, { :controller => 'timelog', :action => 'index' }, :param => :project_id, :caption => :label_spent_time
   menu.push :gantt, { :controller => 'gantts', :action => 'show' }, :param => :project_id, :caption => :label_gantt
   menu.push :calendar, { :controller => 'calendars', :action => 'show' }, :param => :project_id, :caption => :label_calendar
   menu.push :news, { :controller => 'news', :action => 'index' }, :param => :project_id, :caption => :label_news_plural