<%= 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({}, :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 %>
<% for status in @statuses %> <% end %> <% @fields.each do |field, name| %> "> <% for status in @statuses -%> <% end -%> <% end %> <% if @custom_fields.any? %> <% @custom_fields.each do |field| %> "> <% for status in @statuses -%> <% end -%> <% end %> <% end %>
<%=l(:label_issue_status)%>
<%= status.name %>
  <%= l(:field_core_fields) %>
<%= name %> <%= content_tag('span', '*', :class => 'required') if field_required?(field) %> <%= field_permission_tag(@permissions, status, field, @roles) %> <% unless status == @statuses.last %>»<% end %>
  <%= l(:label_custom_field_plural) %>
<%= field.name %> <%= content_tag('span', '*', :class => 'required') if field_required?(field) %> <%= field_permission_tag(@permissions, status, field, @roles) %> <% unless status == @statuses.last %>»<% end %>
<%= submit_tag l(:button_save) %> <% end %> <% end %> <%= javascript_tag do %> $("a.repeat-value").click(function(e){ e.preventDefault(); var td = $(this).closest('td'); var selected = td.find("select").find(":selected").val(); td.nextAll('td').find("select").val(selected); }); $("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 %>