Created
January 28, 2009 18:15
-
-
Save edavis10/54108 to your computer and use it in GitHub Desktop.
Adds a new tab to Redmine's User Administration page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_dependency 'users_helper' | |
module RateUsersHelperPatch | |
def self.included(base) # :nodoc: | |
base.send(:include, InstanceMethods) | |
base.class_eval do | |
alias_method_chain :user_settings_tabs, :rate_tab | |
end | |
end | |
module InstanceMethods | |
# Adds a rates tab to the user administration page | |
def user_settings_tabs_with_rate_tab | |
tabs = user_settings_tabs_without_rate_tab | |
tabs << { :name => 'rates', :partial => 'users/rates', :label => :rate_label_rate_history} | |
return tabs | |
end | |
end | |
end | |
UsersHelper.send(:include, RateUsersHelperPatch) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment