プロジェクト

全般

プロフィール

Vote #74215

完了

View hooks for user preferences

Admin Redmine さんが4年以上前に追加. 4年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Plugin API_20
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
20
version_id:
70
issue_org_id:
14614
author_id:
4644
assigned_to_id:
1
comments:
4
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

I need two new view hooks for my plugin.

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

@


<%=l(:label_preferences)%>
<%= render :partial => 'users/preferences' %>
<%= call_hook(:view_my_account_right_bottom, :user => @user, :form => f) %>
@

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

@


<%=l(:label_preferences)%>
<%= render :partial => 'users/preferences' %>
<%= call_hook(:view_users_form_right_bottom, :user => @user, :form => f) %>
@

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.


journals

I think we could use the same hook in both views. Do you really need 2 different ones?
--------------------------------------------------------------------------------
Well, the existing hooks are actually different (view_users_form, view_my_account). Lets do the same.
--------------------------------------------------------------------------------
Sounds good thanks for great work!
--------------------------------------------------------------------------------
Hooks added. They were renamed: @:view_my_account_preferences@ and @:view_users_form_preferences@.
--------------------------------------------------------------------------------

Admin Redmine さんが4年以上前に更新

  • カテゴリPlugin API_20 にセット
  • 対象バージョン2.4.0_70 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0