From 16810acf015a87f4cef407c7c79957ad9d48f1cd Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Apr 2009 12:16:34 +0000 Subject: [PATCH] Merged r2610, r2611 from trunk. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.8-stable@2654 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/custom_fields_controller.rb | 2 ++ app/views/custom_fields/_form.rhtml | 2 ++ app/views/issue_statuses/_form.rhtml | 4 +++- app/views/issues/context_menu.rhtml | 4 ++++ app/views/issues/show.rhtml | 2 ++ app/views/my/account.rhtml | 1 + app/views/users/_form.rhtml | 1 + 7 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/controllers/custom_fields_controller.rb b/app/controllers/custom_fields_controller.rb index 4589996f1..1f3059dc6 100644 --- a/app/controllers/custom_fields_controller.rb +++ b/app/controllers/custom_fields_controller.rb @@ -46,6 +46,7 @@ class CustomFieldsController < ApplicationController end if request.post? and @custom_field.save flash[:notice] = l(:notice_successful_create) + call_hook(:controller_custom_fields_new_after_save, :params => params, :custom_field => @custom_field) redirect_to :action => 'list', :tab => @custom_field.class.name end @trackers = Tracker.find(:all, :order => 'position') @@ -58,6 +59,7 @@ class CustomFieldsController < ApplicationController @custom_field.trackers = params[:tracker_ids] ? Tracker.find(params[:tracker_ids]) : [] end flash[:notice] = l(:notice_successful_update) + call_hook(:controller_custom_fields_edit_after_save, :params => params, :custom_field => @custom_field) redirect_to :action => 'list', :tab => @custom_field.class.name end @trackers = Tracker.find(:all, :order => 'position') diff --git a/app/views/custom_fields/_form.rhtml b/app/views/custom_fields/_form.rhtml index f4aee6870..7be23b9fb 100644 --- a/app/views/custom_fields/_form.rhtml +++ b/app/views/custom_fields/_form.rhtml @@ -82,6 +82,7 @@ function deleteValueField(e) { <% end %>

<%= @custom_field.field_format == 'bool' ? f.check_box(:default_value) : f.text_field(:default_value) %>

+<%= call_hook(:view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f) %>
@@ -109,5 +110,6 @@ when "IssueCustomField" %>

<%= f.check_box :is_required %>

<% end %> +<%= call_hook(:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f) %>
<%= javascript_tag "toggle_custom_field_format();" %> diff --git a/app/views/issue_statuses/_form.rhtml b/app/views/issue_statuses/_form.rhtml index 6ae0a7c33..b6a5bc19f 100644 --- a/app/views/issue_statuses/_form.rhtml +++ b/app/views/issue_statuses/_form.rhtml @@ -11,5 +11,7 @@

<%= check_box 'issue_status', 'is_default' %>

+<%= call_hook(:view_issue_statuses_form, :issue_status => @issue_status) %> + - \ No newline at end of file + diff --git a/app/views/issues/context_menu.rhtml b/app/views/issues/context_menu.rhtml index 671655db7..02a76ec96 100644 --- a/app/views/issues/context_menu.rhtml +++ b/app/views/issues/context_menu.rhtml @@ -1,4 +1,6 @@ diff --git a/app/views/issues/show.rhtml b/app/views/issues/show.rhtml index e056ef5ef..b685c4f27 100644 --- a/app/views/issues/show.rhtml +++ b/app/views/issues/show.rhtml @@ -69,6 +69,8 @@ end %> <%= link_to_attachments @issue %> +<%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %> + <% if authorize_for('issue_relations', 'new') || @issue.relations.any? %>
diff --git a/app/views/my/account.rhtml b/app/views/my/account.rhtml index f4b726f96..b34cd376e 100644 --- a/app/views/my/account.rhtml +++ b/app/views/my/account.rhtml @@ -15,6 +15,7 @@

<%= f.text_field :lastname, :required => true %>

<%= f.text_field :mail, :required => true %>

<%= f.select :language, lang_options_for_select %>

+<%= call_hook(:view_my_account, :user => @user, :form => f) %>
<%= submit_tag l(:button_save) %> diff --git a/app/views/users/_form.rhtml b/app/views/users/_form.rhtml index 799ebde47..2090b7ccd 100644 --- a/app/views/users/_form.rhtml +++ b/app/views/users/_form.rhtml @@ -13,6 +13,7 @@ <% end %>

<%= f.check_box :admin, :disabled => (@user == User.current) %>

+<%= call_hook(:view_users_form, :user => @user, :form => f) %>