3 |
3 |
|
4 |
4 |
<% unless @trackers.empty? %>
|
5 |
5 |
<fieldset class="box tabular" id="project_trackers"><legend><%= toggle_checkboxes_link('#project_trackers input[type=checkbox]') %><%= l(:label_tracker_plural)%></legend>
|
6 |
|
<% @trackers.each do |tracker| %>
|
|
6 |
<% @trackers.each do |tracker| %>
|
7 |
7 |
<label class="floating">
|
8 |
8 |
<%= check_box_tag 'project[tracker_ids][]', tracker.id, @project.trackers.to_a.include?(tracker), :id => nil %>
|
9 |
9 |
<%= tracker %>
|
10 |
10 |
</label>
|
11 |
|
<% end %>
|
|
11 |
<% end %>
|
12 |
12 |
<%= hidden_field_tag 'project[tracker_ids][]', '' %>
|
13 |
13 |
</fieldset>
|
14 |
14 |
<% end %>
|
15 |
15 |
|
16 |
|
<% unless @issue_custom_fields.empty? %>
|
17 |
|
<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>
|
18 |
|
<% @issue_custom_fields.each do |custom_field| %>
|
19 |
|
<label class="floating">
|
20 |
|
<%= check_box_tag 'project[issue_custom_field_ids][]', custom_field.id, (@project.all_issue_custom_fields.include? custom_field),
|
21 |
|
:disabled => (custom_field.is_for_all? ? "disabled" : nil),
|
22 |
|
:id => nil %>
|
23 |
|
<%= custom_field_name_tag(custom_field) %>
|
24 |
|
</label>
|
25 |
|
<% end %>
|
26 |
|
<%= hidden_field_tag 'project[issue_custom_field_ids][]', '' %>
|
|
16 |
<%
|
|
17 |
unless @issue_custom_fields.empty?
|
|
18 |
all_issue_custom_fields = @project.all_issue_custom_fields
|
|
19 |
-%>
|
|
20 |
<fieldset class="box tabular" id="project_issue_custom_fields"><legend><%=l(:label_custom_field_plural)%></legend>
|
|
21 |
<fieldset class="box tabular" id="project_issue_custom_fields_for_all"><legend><b><%= l(:label_tracker_all) %></b></legend>
|
|
22 |
<% @issue_custom_fields.select(&:is_for_all?).each do |custom_field| %>
|
|
23 |
<%= render :partial => 'projects/settings/custom_field_checkbox', :locals => {:custom_field => custom_field, :all_issue_custom_fields => all_issue_custom_fields} %>
|
|
24 |
<% end %>
|
|
25 |
</fieldset>
|
|
26 |
|
|
27 |
<fieldset class="box tabular" id="project_issue_custom_fields_multiple"><legend><%= toggle_checkboxes_link('#project_issue_custom_fields_multiple input[type=checkbox]:enabled') %><b><%= l(:label_tracker_plural) %> : <%= l(:field_multiple) %></b></legend>
|
|
28 |
<% @issue_custom_fields.select{|cf| cf.trackers.size > 1}.each do |custom_field| %>
|
|
29 |
<%= render :partial => 'projects/settings/custom_field_checkbox', :locals => {:custom_field => custom_field, :all_issue_custom_fields => all_issue_custom_fields} %>
|
|
30 |
<% end %>
|
|
31 |
</fieldset>
|
|
32 |
|
|
33 |
<%
|
|
34 |
single_tracker_issue_custom_fields = @issue_custom_fields.select{|cf| cf.trackers.size == 1}
|
|
35 |
if single_tracker_issue_custom_fields.any?
|
|
36 |
-%>
|
|
37 |
<fieldset class="box tabular" id="project_issue_custom_fields_for_tracker"><legend><b><%=l(:label_tracker)%></b></legend>
|
|
38 |
<%
|
|
39 |
Tracker.sorted.each do |t|
|
|
40 |
issue_custom_fields_for_tracker = single_tracker_issue_custom_fields.select{|cf| cf.trackers.first == t}
|
|
41 |
if issue_custom_fields_for_tracker.any?
|
|
42 |
-%>
|
|
43 |
<fieldset class="box tabular" id="project_issue_custom_fields_tracker_<%= t.id %>"><legend><%= toggle_checkboxes_link("#project_issue_custom_fields_tracker_#{t.id} input[type=checkbox]:enabled") %><b><%= t.name %></b></legend>
|
|
44 |
<% issue_custom_fields_for_tracker.each do |custom_field| %>
|
|
45 |
<%= render :partial => 'projects/settings/custom_field_checkbox', :locals => {:custom_field => custom_field, :all_issue_custom_fields => all_issue_custom_fields} %>
|
|
46 |
<% end %>
|
|
47 |
</fieldset>
|
|
48 |
<% end %>
|
|
49 |
<% end %>
|
|
50 |
</fieldset>
|
|
51 |
<% end %>
|
|
52 |
<%= hidden_field_tag 'project[issue_custom_field_ids][]', '' %>
|
27 |
53 |
</fieldset>
|
28 |
54 |
<% end %>
|
29 |
55 |
|