Patch #44660 » 05_form_hooks.patch
| app/views/groups/_form.html.erb | ||
|---|---|---|
|
<%= error_messages_for @group %>
|
||
|
<div class="box tabular">
|
||
|
<%= call_hook(:view_groups_form_top, :group => @group, :form => f) %>
|
||
|
<p><%= f.text_field :name, :required => true, :size => 60,
|
||
|
:disabled => !@group.safe_attribute?('name') %></p>
|
||
|
<% unless @group.builtin? %>
|
||
| ... | ... | |
|
<% @group.custom_field_values.each do |value| %>
|
||
|
<p><%= custom_field_tag_with_label :group, value %></p>
|
||
|
<% end %>
|
||
|
<%= call_hook(:view_groups_form_bottom, :group => @group, :form => f) %>
|
||
|
</div>
|
||
| app/views/issues/_form.html.erb | ||
|---|---|---|
|
<% if @issue.safe_attribute? 'subject' %>
|
||
|
<p><%= f.text_field :subject, :size => 80, :maxlength => 255, :required => true %></p>
|
||
|
<% end %>
|
||
|
<%= call_hook(:view_issues_form_after_subject, { :issue => @issue, :form => f }) %>
|
||
|
<% if @issue.safe_attribute? 'description' %>
|
||
|
<p>
|
||
| ... | ... | |
|
</p>
|
||
|
<%= wikitoolbar_for 'issue_description', preview_issue_path(:project_id => @issue.project, :issue_id => @issue.id) %>
|
||
|
<% end %>
|
||
|
<%= call_hook(:view_issues_form_after_description, { :issue => @issue, :form => f }) %>
|
||
|
<div id="attributes" class="attributes">
|
||
|
<%= render :partial => 'issues/attributes' %>
|
||
|
</div>
|
||
|
<%= call_hook(:view_issues_form_after_attributes, { :issue => @issue, :form => f }) %>
|
||
|
<%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %>
|
||
|
<% end %>
|
||
| app/views/issues/_form_custom_fields.html.erb | ||
|---|---|---|
|
<% custom_field_values = @issue.editable_custom_field_values %>
|
||
|
<% custom_field_values_full_width = custom_field_values.select { |value| value.custom_field.full_width_layout? } %>
|
||
|
<% custom_field_values -= custom_field_values_full_width %>
|
||
|
<%= call_hook(:view_issues_form_custom_fields_top, { :issue => @issue, :custom_field_values => custom_field_values }) %>
|
||
|
<% if custom_field_values.present? %>
|
||
|
<div class="splitcontent">
|
||
| ... | ... | |
|
<p><%= custom_field_tag_with_label :issue, value, :required => @issue.required_attribute?(value.custom_field_id) %></p>
|
||
|
<%= wikitoolbar_for "issue_custom_field_values_#{value.custom_field_id}", preview_issue_path(:project_id => @issue.project, :issue_id => @issue.id) if value.custom_field.full_text_formatting? %>
|
||
|
<% end %>
|
||
|
<%= call_hook(:view_issues_form_custom_fields_bottom, { :issue => @issue, :custom_field_values => custom_field_values }) %>
|
||
| app/views/projects/_form.html.erb | ||
|---|---|---|
|
<div class="box tabular">
|
||
|
<!--[form:project]-->
|
||
|
<%= call_hook(:view_projects_form_top, :project => @project, :form => f) %>
|
||
|
<p><%= f.text_field :name, :required => true, :size => 60 %></p>
|
||
|
<p><%= f.textarea :description, :rows => 8, :class => 'wiki-edit', :data => wiki_textarea_stimulus_attributes %></p>
|
||
| ... | ... | |
|
<%= hidden_field_tag 'project[enabled_module_names][]', '' %>
|
||
|
</fieldset>
|
||
|
<% end %>
|
||
|
<%= call_hook(:view_projects_form_bottom, :project => @project, :form => f) %>
|
||
|
<!--[eoform:project]-->
|
||
|
<% unless @project.identifier_frozen? %>
|
||
| app/views/trackers/_form.html.erb | ||
|---|---|---|
|
<div class="splitcontentleft">
|
||
|
<div class="box tabular">
|
||
|
<!--[form:tracker]-->
|
||
|
<%= call_hook(:view_trackers_form_top, :tracker => @tracker, :form => f) %>
|
||
|
<p><%= f.text_field :name, :required => true %></p>
|
||
|
<p><%= f.select :default_status_id,
|
||
|
IssueStatus.sorted.map {|s| [s.name, s.id]},
|
||
| ... | ... | |
|
<p><label for="copy_workflow_from"><%= l(:label_copy_workflow_from) %></label>
|
||
|
<%= select_tag(:copy_workflow_from, content_tag("option") + options_from_collection_for_select(@trackers, :id, :name, params[:copy_workflow_from] || @copy_from.try(:id))) %></p>
|
||
|
<% end %>
|
||
|
<%= call_hook(:view_trackers_form_bottom, :tracker => @tracker, :form => f) %>
|
||
|
<!--[eoform:tracker]-->
|
||
|
</div>
|
||
|
<%= submit_tag l(@tracker.new_record? ? :button_create : :button_save), class: "mobile-hide" %>
|
||
| app/views/users/_form.html.erb | ||
|---|---|---|
|
<div id="user_form">
|
||
|
<!--[form:user]-->
|
||
|
<%= call_hook(:view_users_form_top, :user => @user, :form => f) %>
|
||
|
<div class="splitcontent">
|
||
|
<div class="splitcontentleft">
|
||
|
<fieldset class="box tabular">
|
||
| ... | ... | |
|
</p>
|
||
|
<% end -%>
|
||
|
</fieldset>
|
||
|
<%= call_hook(:view_users_form_after_authentication, :user => @user, :form => f) %>
|
||
|
<p class="mobile-hide">
|
||
|
<% if @user.new_record? %>
|
||
|
<%= submit_tag l(:button_create) %>
|
||
| ... | ... | |
|
<legend><%=l(:field_mail_notification)%></legend>
|
||
|
<%= render :partial => 'users/mail_notifications' %>
|
||
|
</fieldset>
|
||
|
<%= call_hook(:view_users_form_after_mail_notifications, :user => @user, :form => f) %>
|
||
|
<fieldset class="box">
|
||
|
<legend><%=l(:label_auto_watch_on)%></legend>
|
||
| ... | ... | |
|
<%= render :partial => 'users/preferences' %>
|
||
|
<%= call_hook(:view_users_form_preferences, :user => @user, :form => f) %>
|
||
|
</fieldset>
|
||
|
<%= call_hook(:view_users_form_bottom, :user => @user, :form => f) %>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
| app/views/versions/_form.html.erb | ||
|---|---|---|
|
<%= error_messages_for 'version' %>
|
||
|
<div class="box tabular">
|
||
|
<%= call_hook(:view_versions_form_top, :version => @version, :form => f) %>
|
||
|
<p><%= f.text_field :name, :maxlength => 60, :size => 60, :required => true %></p>
|
||
|
<p><%= f.text_field :description, :size => 60 %></p>
|
||
|
<% unless @version.new_record? %>
|
||
| ... | ... | |
|
<% @version.visible_custom_field_values.each do |value| %>
|
||
|
<p><%= custom_field_tag_with_label :version, value %></p>
|
||
|
<% end %>
|
||
|
<%= call_hook(:view_versions_form_bottom, :version => @version, :form => f) %>
|
||
|
</div>
|
||
| doc/HOOKS | ||
|---|---|---|
|
Context: :document, :project
|
||
|
Called in: app/views/documents/show.html.erb
|
||
|
view_groups_form_bottom
|
||
|
Since: 7.1.0
|
||
|
Context: :group, :form
|
||
|
Called in: app/views/groups/_form.html.erb
|
||
|
view_groups_form_top
|
||
|
Since: 7.1.0
|
||
|
Context: :group, :form
|
||
|
Called in: app/views/groups/_form.html.erb
|
||
|
view_groups_memberships_table_header
|
||
|
Since: -
|
||
|
Context: :group
|
||
| ... | ... | |
|
Context: :issue, :form
|
||
|
Called in: app/views/issues/_edit.html.erb
|
||
|
view_issues_form_after_attributes
|
||
|
Since: 7.1.0
|
||
|
Context: :issue, :form
|
||
|
Called in: app/views/issues/_form.html.erb
|
||
|
view_issues_form_after_description
|
||
|
Since: 7.1.0
|
||
|
Context: :issue, :form
|
||
|
Called in: app/views/issues/_form.html.erb
|
||
|
view_issues_form_after_subject
|
||
|
Since: 7.1.0
|
||
|
Context: :issue, :form
|
||
|
Called in: app/views/issues/_form.html.erb
|
||
|
view_issues_form_custom_fields_bottom
|
||
|
Since: 7.1.0
|
||
|
Context: :issue, :custom_field_values
|
||
|
Called in: app/views/issues/_form_custom_fields.html.erb
|
||
|
view_issues_form_custom_fields_top
|
||
|
Since: 7.1.0
|
||
|
Context: :issue, :custom_field_values
|
||
|
Called in: app/views/issues/_form_custom_fields.html.erb
|
||
|
view_issues_form_details_bottom
|
||
|
Since: -
|
||
|
Context: :issue, :form
|
||
| ... | ... | |
|
Context: :project, :form
|
||
|
Called in: app/views/projects/_form.html.erb
|
||
|
view_projects_form_bottom
|
||
|
Since: 7.1.0
|
||
|
Context: :project, :form
|
||
|
Called in: app/views/projects/_form.html.erb
|
||
|
view_projects_form_top
|
||
|
Since: 7.1.0
|
||
|
Context: :project, :form
|
||
|
Called in: app/views/projects/_form.html.erb
|
||
|
view_projects_index_contextual
|
||
|
Since: 7.1.0
|
||
|
Context: :query
|
||
| ... | ... | |
|
Context: :project, :query
|
||
|
Called in: app/views/timelog/index.html.erb
|
||
|
view_trackers_form_bottom
|
||
|
Since: 7.1.0
|
||
|
Context: :tracker, :form
|
||
|
Called in: app/views/trackers/_form.html.erb
|
||
|
view_trackers_form_top
|
||
|
Since: 7.1.0
|
||
|
Context: :tracker, :form
|
||
|
Called in: app/views/trackers/_form.html.erb
|
||
|
view_users_form
|
||
|
Since: -
|
||
|
Context: :user, :form
|
||
|
Called in: app/views/users/_form.html.erb
|
||
|
view_users_form_after_authentication
|
||
|
Since: 7.1.0
|
||
|
Context: :user, :form
|
||
|
Called in: app/views/users/_form.html.erb
|
||
|
view_users_form_after_mail_notifications
|
||
|
Since: 7.1.0
|
||
|
Context: :user, :form
|
||
|
Called in: app/views/users/_form.html.erb
|
||
|
view_users_form_bottom
|
||
|
Since: 7.1.0
|
||
|
Context: :user, :form
|
||
|
Called in: app/views/users/_form.html.erb
|
||
|
view_users_form_preferences
|
||
|
Since: -
|
||
|
Context: :user, :form
|
||
|
Called in: app/views/users/_form.html.erb
|
||
|
view_users_form_top
|
||
|
Since: 7.1.0
|
||
|
Context: :user, :form
|
||
|
Called in: app/views/users/_form.html.erb
|
||
|
view_users_index_actions_menu
|
||
|
Since: 7.1.0
|
||
|
Context: :query
|
||
| ... | ... | |
|
Context: -
|
||
|
Called in: app/views/users/index.html.erb
|
||
|
view_versions_form_bottom
|
||
|
Since: 7.1.0
|
||
|
Context: :version, :form
|
||
|
Called in: app/views/versions/_form.html.erb
|
||
|
view_versions_form_top
|
||
|
Since: 7.1.0
|
||
|
Context: :version, :form
|
||
|
Called in: app/views/versions/_form.html.erb
|
||
|
view_versions_index_actions_menu
|
||
|
Since: 7.1.0
|
||
|
Context: :project
|
||
| test/integration/lib/redmine/view_hooks_test.rb | ||
|---|---|---|
|
'/issues/1' => %w(
|
||
|
view_issues_show_contextual view_issues_show_actions_menu view_issues_show_top view_issues_show_details_end
|
||
|
view_issues_show_bottom),
|
||
|
'/projects/ecookbook/issues/new' => %w(
|
||
|
view_issues_form_after_subject view_issues_form_after_description view_issues_form_after_attributes
|
||
|
view_issues_form_custom_fields_top view_issues_form_custom_fields_bottom),
|
||
|
'/projects/ecookbook/settings' => %w(view_projects_form_top view_projects_form_bottom),
|
||
|
'/projects?display_type=list' => %w(view_projects_index_contextual),
|
||
|
'/users' => %w(view_users_index_contextual view_users_index_actions_menu),
|
||
|
'/users/2' => %w(view_users_show_contextual),
|
||
|
'/users/2/edit' => %w(view_layouts_base_title_after),
|
||
|
'/users/2/edit' => %w(
|
||
|
view_layouts_base_title_after view_users_form_top view_users_form_after_authentication
|
||
|
view_users_form_after_mail_notifications view_users_form_bottom),
|
||
|
'/groups/10' => %w(view_groups_show_contextual),
|
||
|
'/groups/10/edit' => %w(view_groups_form_top view_groups_form_bottom),
|
||
|
'/versions/2/edit' => %w(view_versions_form_top view_versions_form_bottom),
|
||
|
'/projects/ecookbook/roadmap' => %w(view_versions_index_contextual view_versions_index_actions_menu),
|
||
|
'/projects/ecookbook/wiki' => %w(view_wiki_show_contextual view_wiki_show_actions_menu),
|
||
|
'/projects/ecookbook/news' => %w(view_news_index_contextual),
|
||
| ... | ... | |
|
'/projects/ecookbook/boards/1' => %w(view_boards_show_contextual),
|
||
|
'/boards/1/topics/1' => %w(view_messages_show_contextual),
|
||
|
'/projects/ecookbook/time_entries' => %w(view_timelog_index_contextual view_timelog_index_actions_menu),
|
||
|
'/trackers/1/edit' => %w(view_trackers_form_top view_trackers_form_bottom),
|
||
|
'/admin/plugins' => %w(view_layouts_base_title_after)
|
||
|
}
|
||