[#3827] Don't hardcode the core tabs with alias_method_chain.

This commit is contained in:
Eric Davis
2010-07-27 06:15:14 -07:00
parent f60a5154dd
commit cec35ad3af
2 changed files with 2 additions and 5 deletions

View File

@@ -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

View File

@@ -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