summaryrefslogtreecommitdiffstats
path: root/app/views/trackers/_form.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/trackers/_form.html.erb')
-rw-r--r--app/views/trackers/_form.html.erb41
1 files changed, 41 insertions, 0 deletions
diff --git a/app/views/trackers/_form.html.erb b/app/views/trackers/_form.html.erb
new file mode 100644
index 000000000..2cbed576c
--- /dev/null
+++ b/app/views/trackers/_form.html.erb
@@ -0,0 +1,41 @@
+<%= error_messages_for 'tracker' %>
+
+<div class="splitcontentleft">
+<div class="box tabular">
+<!--[form:tracker]-->
+<p><%= f.text_field :name, :required => true %></p>
+<p><%= f.check_box :is_in_roadmap %></p>
+
+<% if IssueCustomField.all.any? %>
+<p>
+ <label><%= l(:label_custom_field_plural) %></label>
+ <% IssueCustomField.all.each do |field| %>
+ <label class="block">
+ <%= check_box_tag 'tracker[custom_field_ids][]',field.id, @tracker.custom_fields.include?(field) %>
+ <%=h field.name %>
+ </label>
+ <% end %>
+</p>
+<%= hidden_field_tag 'tracker[custom_field_ids][]', '' %>
+<% end %>
+
+<% if @tracker.new_record? && @trackers.any? %>
+<p><label><%= l(:label_copy_workflow_from) %></label>
+<%= select_tag(:copy_workflow_from, content_tag("option") + options_from_collection_for_select(@trackers, :id, :name)) %></p>
+<% end %>
+<!--[eoform:tracker]-->
+</div>
+<%= submit_tag l(@tracker.new_record? ? :button_create : :button_save) %>
+</div>
+
+<div class="splitcontentright">
+<% if @projects.any? %>
+<fieldset class="box" id="tracker_project_ids"><legend><%= l(:label_project_plural) %></legend>
+<%= project_nested_ul(@projects) do |p|
+ content_tag('label', check_box_tag('tracker[project_ids][]', p.id, @tracker.projects.include?(p), :id => nil) + ' ' + h(p))
+end %>
+<%= hidden_field_tag('tracker[project_ids][]', '', :id => nil) %>
+<p><%= check_all_links 'tracker_project_ids' %></p>
+</fieldset>
+<% end %>
+</div>