Ported the table header from the Budget plugin hook. #1923
This commit is contained in:
@@ -3,6 +3,8 @@ require 'redmine'
|
|||||||
require 'rate_users_helper_patch'
|
require 'rate_users_helper_patch'
|
||||||
require 'rate_sort_helper_patch'
|
require 'rate_sort_helper_patch'
|
||||||
|
|
||||||
|
require 'rate_project_hook'
|
||||||
|
|
||||||
Redmine::Plugin.register :redmine_rate do
|
Redmine::Plugin.register :redmine_rate do
|
||||||
name 'Rate Plugin'
|
name 'Rate Plugin'
|
||||||
author 'Eric Davis'
|
author 'Eric Davis'
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Hooks to attach to the Redmine Projects.
|
||||||
|
class RateProjectHook < Redmine::Hook::ViewListener
|
||||||
|
|
||||||
|
def protect_against_forgery?
|
||||||
|
false
|
||||||
|
end
|
||||||
|
|
||||||
|
# Renders an additional table header to the membership setting
|
||||||
|
#
|
||||||
|
# Context:
|
||||||
|
# * :project => Current project
|
||||||
|
#
|
||||||
|
def view_projects_settings_members_table_header(context ={ })
|
||||||
|
return "<th>#{l(:rate_label_rate)} #{l(:rate_label_currency)}</td>"
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
Reference in New Issue
Block a user