[#3827] Don't hardcode the core tabs with alias_method_chain.
This commit is contained in:
2
init.rb
2
init.rb
@@ -11,7 +11,7 @@ Dispatcher.to_prepare :redmine_rate do
|
|||||||
TimeEntry.send(:include, RateTimeEntryPatch)
|
TimeEntry.send(:include, RateTimeEntryPatch)
|
||||||
|
|
||||||
require_dependency 'users_helper'
|
require_dependency 'users_helper'
|
||||||
UsersHelper.send(:include, RateUsersHelperPatch)
|
UsersHelper.send(:include, RateUsersHelperPatch) unless UsersHelper.included_modules.include?(RateUsersHelperPatch)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Hooks
|
# Hooks
|
||||||
|
|||||||
@@ -9,10 +9,7 @@ module RateUsersHelperPatch
|
|||||||
module InstanceMethods
|
module InstanceMethods
|
||||||
# Adds a rates tab to the user administration page
|
# Adds a rates tab to the user administration page
|
||||||
def user_settings_tabs_with_rate_tab
|
def user_settings_tabs_with_rate_tab
|
||||||
# Core defined data
|
tabs = user_settings_tabs_without_rate_tab
|
||||||
tabs = [{:name => 'general', :partial => 'users/general', :label => :label_general},
|
|
||||||
{:name => 'memberships', :partial => 'users/memberships', :label => :label_project_plural}
|
|
||||||
]
|
|
||||||
tabs << { :name => 'rates', :partial => 'users/rates', :label => :rate_label_rate_history}
|
tabs << { :name => 'rates', :partial => 'users/rates', :label => :rate_label_rate_history}
|
||||||
return tabs
|
return tabs
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user