%= render :partial => 'action_menu' %>
<%= title l(:label_workflow) %>
- <%= link_to l(:label_status_transitions), workflows_edit_path(:role_id => @roles, :tracker_id => @trackers), :class => 'selected' %>
- <%= link_to l(:label_fields_permissions), workflows_permissions_path(:role_id => @roles, :tracker_id => @trackers) %>
<%=l(:text_workflow_edit)%>:
<%= form_tag({}, :method => 'get') do %>
<%= image_tag 'bullet_toggle_plus.png' %>
<%= image_tag 'bullet_toggle_plus.png' %>
<%= submit_tag l(:button_edit), :name => nil %>
<%= hidden_field_tag 'used_statuses_only', '0', :id => nil %>
<% end %>
<% if @trackers && @roles && @statuses.any? %>
<%= form_tag({}, :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 %>
<%= submit_tag l(:button_save) %>
<% end %>
<% end %>
<%= javascript_tag do %>
$("a[data-expands]").click(function(e){
e.preventDefault();
var target = $($(this).attr("data-expands"));
if (target.attr("multiple")) {
target.attr("multiple", false);
target.find("option[value=all]").show();
} else {
target.attr("multiple", true);
target.find("option[value=all]").attr("selected", false).hide();
}
});
<% end %>