Patch #2599

New View Hooks

Added by Thomas Löber over 8 years ago. Updated over 8 years ago.

Status:ClosedStart date:2009-01-27
Priority:NormalDue date:
Assignee:Eric Davis% Done:

100%

Category:Plugin API
Target version:0.8.3

Description

Here is a patch with five new view hooks that I found useful. Maybe they can be included in the official version.

The 2nd hook in custom_fields/_form.rhtml is actually four hooks (one hook for each type of custom field: for example view_custom_fields_form_user_custom_field).

app/views/custom_fields/_form.rhtml:
  * [ 67] :view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f)
  * [ 97] :"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f)

app/views/issue_statuses/_form.rhtml:
  * [ 14] :view_issue_statuses_form, :issue_status => @issue_status)

app/views/my/account.rhtml:
  * [ 22] :view_my_account, :user => @user, :form => f)

app/views/users/_form.rhtml:
  * [ 16] :view_users_form, :user => @user, :form => f)

new_hooks.diff Magnifier (2.21 KB) Thomas Löber, 2009-01-27 11:01

more_hooks.diff Magnifier - CustomFieldsController hooks (1.01 KB) Thomas Löber, 2009-02-02 09:18

issues_show_desc_bottom_hook.diff Magnifier (429 Bytes) Daniel Vandersluis, 2009-02-25 20:34

Associated revisions

Revision 2611
Added by Eric Davis over 8 years ago

Added several more plugin hooks:

  • :controller_custom_fields_new_after_save
  • :controller_custom_fields_edit_after_save
  • :view_custom_fields_form_upper_box
  • :view_custom_fields_form_* (type of custom field)
  • :view_issue_statuses_form
  • :view_issues_show_description_bottom
  • :view_my_account
  • :view_users_form

    #2599

History

#1 Updated by Thomas Löber over 8 years ago

I have added two more hooks:

app/controllers/custom_fields_controller.rb:
  * [ 38] :controller_custom_fields_new_after_save, :params => params, :custom_field => @custom_field)
  * [ 48] :controller_custom_fields_edit_after_save, :params => params, :custom_field => @custom_field)

#2 Updated by Daniel Vandersluis over 8 years ago

I don't know if this is the right place, but I've added a hook that I find useful, too -- it's after the description on the show issues page. I'd appreciate it if it could be made 'official'.

#3 Updated by Eric Davis over 8 years ago

  • Category set to Plugin API
  • Status changed from New to Resolved
  • Target version set to 0.8.3
  • % Done changed from 0 to 100

Thank you for the patches, I've added these hooks in r2611. I'm looking forward to seeing what you come up with for these.

  • :controller_custom_fields_new_after_save
  • :controller_custom_fields_edit_after_save
  • :view_custom_fields_form_upper_box
  • :view_custom_fields_form_* (type of custom field)
  • :view_issue_statuses_form
  • :view_issues_show_description_bottom
  • :view_my_account
  • :view_users_form

#4 Updated by Jean-Philippe Lang over 8 years ago

  • Status changed from Resolved to Closed

Committed in 0.8-stable in r2654.

Also available in: Atom PDF