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>
|
|
|
|
|
2012-07-15 18:12:17 +04:00
|
|
|
<div class="tabs">
|
|
|
|
<ul>
|
2012-07-15 19:46:53 +04:00
|
|
|
<li><%= link_to l(:label_status_transitions), {:action => 'edit', :role_id => @role, :tracker_id => @tracker}, :class => 'selected' %></li>
|
|
|
|
<li><%= link_to l(:label_fields_permissions), {:action => 'permissions', :role_id => @role, :tracker_id => @tracker} %></li>
|
2012-07-15 18:12:17 +04:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
2007-03-12 20:59:02 +03:00
|
|
|
<p><%=l(:text_workflow_edit)%>:</p>
|
|
|
|
|
2012-04-25 21:17:49 +04:00
|
|
|
<%= form_tag({}, :method => 'get') do %>
|
2009-12-09 16:30:54 +03:00
|
|
|
<p>
|
2011-10-29 05:18:46 +04:00
|
|
|
<label><%=l(:label_role)%>:
|
|
|
|
<%= select_tag 'role_id', options_from_collection_for_select(@roles, "id", "name", @role && @role.id) %></label>
|
2009-12-09 16:30:54 +03:00
|
|
|
|
2011-10-29 05:18:46 +04:00
|
|
|
<label><%=l(:label_tracker)%>:
|
|
|
|
<%= select_tag 'tracker_id', options_from_collection_for_select(@trackers, "id", "name", @tracker && @tracker.id) %></label>
|
2011-08-28 03:41:55 +04:00
|
|
|
|
2012-07-15 18:12:17 +04:00
|
|
|
<%= submit_tag l(:button_edit), :name => nil %>
|
|
|
|
|
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>
|
2012-07-15 18:12:17 +04:00
|
|
|
|
2007-03-12 20:59:02 +03:00
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
|
2009-12-09 16:30:54 +03:00
|
|
|
<% if @tracker && @role && @statuses.any? %>
|
2012-04-25 21:17:49 +04:00
|
|
|
<%= form_tag({}, :id => 'workflow_form' ) do %>
|
2011-02-20 18:38:07 +03:00
|
|
|
<%= hidden_field_tag 'tracker_id', @tracker.id %>
|
|
|
|
<%= hidden_field_tag 'role_id', @role.id %>
|
2012-07-15 19:50:57 +04:00
|
|
|
<%= hidden_field_tag 'used_statuses_only', params[:used_statuses_only] %>
|
2011-02-20 18:38:07 +03:00
|
|
|
<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>
|
2012-07-22 17:29:26 +04:00
|
|
|
<%= 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>
|
2012-07-22 17:29:26 +04:00
|
|
|
<%= javascript_tag "hideFieldset($('#assignee_workflows'))" unless @workflows['assignee'].present? %>
|
2011-02-20 18:38:07 +03:00
|
|
|
</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)) -%>
|