Project

General

Profile

Actions

Patch #32548

open

Add new hook in projects/settings/_issues.html.erb for custom fields

Added by Jérôme BATAILLE about 5 years ago. Updated about 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Hook requests
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

This would be very helpful to add new features from plugins related to custom fields.

Thanks a lot to take in accout this very small patch

  <% unless @issue_custom_fields.empty? %>
  <fieldset class="box tabular" id="project_issue_custom_fields"><legend><%= toggle_checkboxes_link('#project_issue_custom_fields input[type=checkbox]:enabled') %><%=l(:label_custom_field_plural)%></legend>
  <% @issue_custom_fields.each do |custom_field| %>
    <label class="floating">
      <%= check_box_tag 'project[issue_custom_field_ids][]', custom_field.id, (@project.all_issue_custom_fields.include? custom_field),
          :disabled => (custom_field.is_for_all? ? "disabled" : nil),
          :id => nil %>
      <%= custom_field_name_tag(custom_field) %>
    </label>
  <% end %>
  <%= hidden_field_tag 'project[issue_custom_field_ids][]', '' %>
  </fieldset>

<%
  # The new hook
-%>
<%= call_hook(:view_project_settings_issues_custom_fields, { :issue_custom_fields => @issue_custom_fields, :project => @project }) %>
  <% end %>

Actions #1

Updated by Jérôme BATAILLE about 5 years ago

This description can be edited to change the pre code class to ruby, thanks.

Actions #2

Updated by Bernhard Rohloff about 5 years ago

  • Description updated (diff)
Actions #3

Updated by Go MAEDA about 5 years ago

  • Category changed from Project settings to Hook requests
Actions

Also available in: Atom PDF