<%= render :partial => 'action_menu' %>

<%=l(:label_workflow)%>

<%=l(:text_workflow_edit)%>:

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

<%= select_tag 'role_id', options_from_collection_for_select(@roles, "id", "name", @role && @role.id) %> <%= select_tag 'tracker_id', options_from_collection_for_select(@trackers, "id", "name", @tracker && @tracker.id) %> <%= hidden_field_tag 'used_statuses_only', '0' %>

<%= submit_tag l(:button_edit), :name => nil %>

<% end %> <% if @tracker && @role && @statuses.any? %> <% form_tag({}, :id => 'workflow_form' ) do %> <%= hidden_field_tag 'tracker_id', @tracker.id %> <%= hidden_field_tag 'role_id', @role.id %>
<%= render :partial => 'form', :locals => {:name => 'always', :workflows => @workflows['always']} %>
Autorisations supplémentaires lorsque l'utilisateur a créé la demande
<%= render :partial => 'form', :locals => {:name => 'author', :workflows => @workflows['author']} %>
<%= javascript_tag "hideFieldset($('author_workflows'))" unless @workflows['author'].present? %>
Autorisations supplémentaires lorsque la demande est assignée à l'utilisateur
<%= 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 %> <% html_title(l(:label_workflow)) -%>