kanbanworkflowstimelinescrumrubyroadmapproject-planningproject-managementopenprojectangularissue-trackerifcgantt-chartganttbug-trackerboardsbcf
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.2 KiB
34 lines
1.2 KiB
12 years ago
|
class OpenProject::Costs::Hooks::ProjectHook < Redmine::Hook::ViewListener
|
||
15 years ago
|
|
||
|
# Renders up to two additional table headers to the membership setting
|
||
|
#
|
||
|
# Context:
|
||
|
# * :project => Current project
|
||
|
#
|
||
|
def view_projects_settings_members_table_header(context={})
|
||
15 years ago
|
return unless context[:project] && context[:project].module_enabled?(:costs_module)
|
||
|
|
||
15 years ago
|
result = ""
|
||
|
user = User.current
|
||
|
project = context[:project]
|
||
12 years ago
|
|
||
15 years ago
|
result += content_tag(:th, l(:caption_current_rate)) if user.allowed_to?(:view_hourly_rates, project)
|
||
|
result += content_tag(:th, l(:caption_set_rate)) if user.allowed_to?(:edit_hourly_rates, project)
|
||
12 years ago
|
|
||
15 years ago
|
result
|
||
|
end
|
||
12 years ago
|
|
||
15 years ago
|
# Renders an AJAX form to update the member's billing rate
|
||
15 years ago
|
# Context:
|
||
|
# * :project => Current project
|
||
|
# * :member => Current Member record
|
||
|
render_on :view_projects_settings_members_table_row, :partial => 'hooks/view_projects_settings_members_table_row'
|
||
15 years ago
|
|
||
15 years ago
|
# Renders table headers to update the member's billing rate
|
||
|
# Context:
|
||
|
# * :project => Current project
|
||
|
render_on :view_projects_settings_members_table_header, :partial => 'hooks/view_projects_settings_members_table_header'
|
||
12 years ago
|
|
||
15 years ago
|
# TODO: implement model_project_copy_before_save
|
||
12 years ago
|
end
|