summaryrefslogtreecommitdiffstats
path: root/app/views/projects/settings/_issues.html.erb
blob: a0f0c14d5fd9784698bdd62778a26664dffad257 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<%= labelled_form_for @project, html: {id: 'project_issue_tracking' } do |f| %>
  <%= hidden_field_tag 'tab', 'issues' %>

  <% unless @trackers.empty? %>
  <fieldset class="box tabular" id="project_trackers"><legend><%= toggle_checkboxes_link('#project_trackers input[type=checkbox]') %><%= l(:label_tracker_plural)%></legend>
  <% if User.current.admin? %>
    <div class="contextual"><%= link_to l(:label_administration), trackers_path, :class => "icon icon-settings" %></div>
  <% end %>
  <% @trackers.each do |tracker| %>
    <label class="floating">
      <%= check_box_tag 'project[tracker_ids][]', tracker.id, @project.trackers.to_a.include?(tracker), :id => nil %>
      <%= tracker_name_tag tracker %>
    </label>
  <% end %>
  <%= hidden_field_tag 'project[tracker_ids][]', '' %>
  </fieldset>
  <% end %>

  <% 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>
  <% if User.current.admin? %>
    <div class="contextual"><%= link_to l(:label_administration), custom_fields_path, :class => "icon icon-settings" %></div>
  <% end %>
  <% @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>
  <% end %>

  <div class="box tabular">
  <% if @project.safe_attribute?('default_version_id') %>
    <p><%= f.select :default_version_id, project_default_version_options(@project), include_blank: l(:label_none) %></p>
  <% end %>

  <% if @project.safe_attribute?('default_assigned_to_id') %>
    <p><%= f.select :default_assigned_to_id, project_default_assigned_to_options(@project), include_blank: l(:label_none) %></p>
  <% end %>

  <% if @project.safe_attribute?('default_issue_query_id') %>
    <p><%= f.select :default_issue_query_id, project_default_issue_query_options(@project), include_blank: l(:label_none) %><em class="info"><%=l 'text_allowed_queries_to_select' %></em></p>
  <% end %>
  </div>

  <p><%= submit_tag l(:button_save) %></p>
<% end %>