2009-12-12 11:06:07 +01:00
|
|
|
<%= render :partial => 'action_menu' %>
|
2008-09-28 14:03:17 +02:00
|
|
|
|
2007-03-12 18:59:02 +01:00
|
|
|
<h2><%=l(:label_workflow)%></h2>
|
|
|
|
|
|
|
|
<p><%=l(:text_workflow_edit)%>:</p>
|
|
|
|
|
2008-09-28 14:03:17 +02:00
|
|
|
<% form_tag({}, :method => 'get') do %>
|
2009-12-09 14:30:54 +01:00
|
|
|
<p>
|
2011-08-28 01:39:58 +02:00
|
|
|
<label><%=l(:label_role)%>:</label>
|
|
|
|
<%= select_tag 'role_id', options_from_collection_for_select(@roles, "id", "name", @role && @role.id) %>
|
2009-12-09 14:30:54 +01:00
|
|
|
|
|
|
|
<label><%=l(:label_tracker)%>:</label>
|
2011-08-28 01:39:58 +02:00
|
|
|
<%= select_tag 'tracker_id', options_from_collection_for_select(@trackers, "id", "name", @tracker && @tracker.id) %>
|
2011-08-28 01:41:55 +02:00
|
|
|
|
2009-12-18 16:41:32 +01:00
|
|
|
<%= hidden_field_tag 'used_statuses_only', '0' %>
|
|
|
|
<label><%= check_box_tag 'used_statuses_only', '1', @used_statuses_only %> <%= l(:label_display_used_statuses_only) %></label>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<%= submit_tag l(:button_edit), :name => nil %>
|
2007-03-12 18:59:02 +01:00
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
|
2009-12-09 14:30:54 +01:00
|
|
|
<% if @tracker && @role && @statuses.any? %>
|
2011-02-20 16:38:07 +01:00
|
|
|
<% form_tag({}, :id => 'workflow_form' ) do %>
|
|
|
|
<%= hidden_field_tag 'tracker_id', @tracker.id %>
|
|
|
|
<%= hidden_field_tag 'role_id', @role.id %>
|
|
|
|
<div class="autoscroll">
|
|
|
|
<%= render :partial => 'form', :locals => {:name => 'always', :workflows => @workflows['always']} %>
|
2011-08-28 01:41:55 +02:00
|
|
|
|
2011-02-20 16:38:07 +01:00
|
|
|
<fieldset class="collapsible" style="padding: 0; margin-top: 0.5em;">
|
2011-03-30 18:56:52 +02:00
|
|
|
<legend onclick="toggleFieldset(this);"><%= l(:label_additional_workflow_transitions_for_author) %></legend>
|
2011-02-20 16:38:07 +01:00
|
|
|
<div id="author_workflows" style="margin: 0.5em 0 0.5em 0;">
|
|
|
|
<%= render :partial => 'form', :locals => {:name => 'author', :workflows => @workflows['author']} %>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
<%= javascript_tag "hideFieldset($('author_workflows'))" unless @workflows['author'].present? %>
|
2011-08-28 01:41:55 +02:00
|
|
|
|
2011-02-20 16:38:07 +01:00
|
|
|
<fieldset class="collapsible" style="padding: 0;">
|
2011-03-30 18:56:52 +02:00
|
|
|
<legend onclick="toggleFieldset(this);"><%= l(:label_additional_workflow_transitions_for_assignee) %></legend>
|
2011-02-20 16:38:07 +01:00
|
|
|
<div id="assignee_workflows" style="margin: 0.5em 0 0.5em 0;">
|
|
|
|
<%= render :partial => 'form', :locals => {:name => 'assignee', :workflows => @workflows['assignee']} %>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
<%= javascript_tag "hideFieldset($('assignee_workflows'))" unless @workflows['assignee'].present? %>
|
|
|
|
</div>
|
|
|
|
<%= submit_tag l(:button_save) %>
|
|
|
|
<% end %>
|
2007-03-12 18:59:02 +01:00
|
|
|
<% end %>
|
2007-12-07 19:42:40 +01:00
|
|
|
|
2008-01-02 23:41:53 +01:00
|
|
|
<% html_title(l(:label_workflow)) -%>
|