Feature #14614

View hooks for user preferences

Added by Tide _ over 4 years ago. Updated over 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Plugin API
Target version:2.4.0
Resolution:Fixed

Description

I need two new view hooks for my plugin.

1. app/views/my/account.html.erb lines 39-43

<fieldset class="box tabular">
<legend><%=l(:label_preferences)%></legend>
<%= render :partial => 'users/preferences' %>
<%= call_hook(:view_my_account_right_bottom, :user => @user, :form => f) %>
</fieldset>

2. app/views/users/_form.html.erb lines 45-49

<fieldset class="box tabular">
<legend><%=l(:label_preferences)%></legend>
<%= render :partial => 'users/preferences' %>
<%= call_hook(:view_users_form_right_bottom, :user => @user, :form => f) %>
</fieldset>

This will allow people to add settings under the "Preferences" section for each of these pages. Currently you can only add setting to or after the Information section. My plugins setting is more of a preference than information.

Associated revisions

Revision 12085
Added by Jean-Philippe Lang over 4 years ago

Add hooks for user preferences (#14614).

History

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

I think we could use the same hook in both views. Do you really need 2 different ones?

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

  • Priority changed from High to Normal

Well, the existing hooks are actually different (view_users_form, view_my_account). Lets do the same.

#3 Updated by Tide _ over 4 years ago

Sounds good thanks for great work!

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

  • Subject changed from Two new view hooks needed to View hooks for user preferences
  • Category changed from Accounts / authentication to Plugin API
  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.4.0
  • Resolution set to Fixed

Hooks added. They were renamed: :view_my_account_preferences and :view_users_form_preferences.

Also available in: Atom PDF