2009-12-12 13:06:07 +03:00
|
|
|
<%= render :partial => 'action_menu' %>
|
2008-09-28 16:03:17 +04:00
|
|
|
|
2007-03-12 20:59:02 +03:00
|
|
|
<h2><%=l(:label_workflow)%></h2>
|
|
|
|
|
|
|
|
<p><%=l(:text_workflow_edit)%>:</p>
|
|
|
|
|
2008-09-28 16:03:17 +04:00
|
|
|
<% form_tag({}, :method => 'get') do %>
|
2009-12-09 16:30:54 +03:00
|
|
|
<p>
|
2011-08-28 03:39:58 +04:00
|
|
|
<label><%=l(:label_role)%>:</label>
|
|
|
|
<%= select_tag 'role_id', options_from_collection_for_select(@roles, "id", "name", @role && @role.id) %>
|
2009-12-09 16:30:54 +03:00
|
|
|
|
|
|
|
<label><%=l(:label_tracker)%>:</label>
|
2011-08-28 03:39:58 +04:00
|
|
|
<%= select_tag 'tracker_id', options_from_collection_for_select(@trackers, "id", "name", @tracker && @tracker.id) %>
|
2011-08-28 03:41:55 +04:00
|
|
|
|
2009-12-18 18:41:32 +03: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 20:59:02 +03:00
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
|
2009-12-09 16:30:54 +03:00
|
|
|
<% if @tracker && @role && @statuses.any? %>
|
2011-02-20 18:38:07 +03: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 03:41:55 +04:00
|
|
|
|
2011-02-20 18:38:07 +03:00
|
|
|
<fieldset class="collapsible" style="padding: 0; margin-top: 0.5em;">
|
2011-03-30 20:56:52 +04:00
|
|
|
<legend onclick="toggleFieldset(this);"><%= l(:label_additional_workflow_transitions_for_author) %></legend>
|
2011-02-20 18:38:07 +03: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 03:41:55 +04:00
|
|
|
|
2011-02-20 18:38:07 +03:00
|
|
|
<fieldset class="collapsible" style="padding: 0;">
|
2011-03-30 20:56:52 +04:00
|
|
|
<legend onclick="toggleFieldset(this);"><%= l(:label_additional_workflow_transitions_for_assignee) %></legend>
|
2011-02-20 18:38:07 +03: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 20:59:02 +03:00
|
|
|
<% end %>
|
2007-12-07 21:42:40 +03:00
|
|
|
|
2008-01-03 01:41:53 +03:00
|
|
|
<% html_title(l(:label_workflow)) -%>
|