<%= render :partial => 'action_menu' %> <%= title l(:label_workflow) %>

<%=l(:text_workflow_edit)%>:

<%= form_tag({}, :method => 'get') do %>

<%= submit_tag l(:button_edit), :name => nil %> <%= hidden_field_tag 'used_statuses_only', '0', :id => nil %>

<% end %> <% if @trackers && @roles && @statuses.any? %> <%= form_tag workflows_path, method: :patch, id: 'workflow_form' do %> <%= @trackers.map {|tracker| hidden_field_tag 'tracker_id[]', tracker.id, :id => nil}.join.html_safe %> <%= @roles.map {|role| hidden_field_tag 'role_id[]', role.id, :id => nil}.join.html_safe %> <%= hidden_field_tag 'used_statuses_only', params[:used_statuses_only], :id => nil %>
<%= render :partial => 'form', :locals => {:name => 'always', :workflows => @workflows['always']} %>
<%= l(:label_additional_workflow_transitions_for_author) %>
<%= render :partial => 'form', :locals => {:name => 'author', :workflows => @workflows['author']} %>
<%= javascript_tag "hideFieldset($('#author_workflows'))" unless @workflows['author'].present? %>
<%= l(:label_additional_workflow_transitions_for_assignee) %>
<%= render :partial => 'form', :locals => {:name => 'assignee', :workflows => @workflows['assignee']} %>
<%= javascript_tag "hideFieldset($('#assignee_workflows'))" unless @workflows['assignee'].present? %>
<%= submit_tag l(:button_save) %> <% end %> <% end %>