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>
|
|
|
|
|
|
|
|
<p><%=l(:text_workflow_edit)%>:</p>
|
|
|
|
|
2008-09-28 16:03:17 +04:00
|
|
|
<% form_tag({}, :method => 'get') do %>
|
2009-12-09 16:30:54 +03:00
|
|
|
<p>
|
|
|
|
<label><%=l(:label_role)%>:</label>
|
|
|
|
<%= select_tag 'role_id', options_from_collection_for_select(@roles, "id", "name", @role && @role.id) %>
|
|
|
|
|
|
|
|
<label><%=l(:label_tracker)%>:</label>
|
|
|
|
<%= select_tag 'tracker_id', options_from_collection_for_select(@trackers, "id", "name", @tracker && @tracker.id) %>
|
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>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<%= submit_tag l(:button_edit), :name => nil %>
|
2007-03-12 20:59:02 +03:00
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
|
2009-12-09 16:30:54 +03:00
|
|
|
|
|
|
|
<% if @tracker && @role && @statuses.any? %>
|
2008-09-28 16:03:17 +04:00
|
|
|
<% form_tag({}, :id => 'workflow_form' ) do %>
|
|
|
|
<%= hidden_field_tag 'tracker_id', @tracker.id %>
|
|
|
|
<%= hidden_field_tag 'role_id', @role.id %>
|
2008-09-28 16:36:30 +04:00
|
|
|
<table class="list">
|
|
|
|
<thead>
|
2007-03-12 20:59:02 +03:00
|
|
|
<tr>
|
2009-12-09 16:30:54 +03:00
|
|
|
<th align="left"><%=l(:label_current_status)%></th>
|
|
|
|
<th align="center" colspan="<%= @statuses.length %>"><%=l(:label_new_statuses_allowed)%></th>
|
2007-03-12 20:59:02 +03:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2009-12-09 16:30:54 +03:00
|
|
|
<td></td>
|
|
|
|
<% for new_status in @statuses %>
|
2008-09-28 16:36:30 +04:00
|
|
|
<td width="<%= 75 / @statuses.size %>%" align="center"><%= new_status.name %></td>
|
2009-12-09 16:30:54 +03:00
|
|
|
<% end %>
|
2007-03-12 20:59:02 +03:00
|
|
|
</tr>
|
2008-09-28 16:36:30 +04:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
2007-03-12 20:59:02 +03:00
|
|
|
<% for old_status in @statuses %>
|
2009-12-09 16:30:54 +03:00
|
|
|
<tr class="<%= cycle("odd", "even") %>">
|
2007-12-07 14:19:30 +03:00
|
|
|
<td><%= old_status.name %></td>
|
2009-05-10 14:54:31 +04:00
|
|
|
<% new_status_ids_allowed = old_status.find_new_statuses_allowed_to([@role], @tracker).collect(&:id) -%>
|
2007-12-07 14:19:30 +03:00
|
|
|
<% for new_status in @statuses -%>
|
2009-12-09 16:30:54 +03:00
|
|
|
<td align="center">
|
|
|
|
<%= check_box_tag "issue_status[#{ old_status.id }][]", new_status.id, new_status_ids_allowed.include?(new_status.id) %>
|
|
|
|
</td>
|
2007-12-07 14:19:30 +03:00
|
|
|
<% end -%>
|
2009-12-09 16:30:54 +03:00
|
|
|
</tr>
|
2007-03-12 20:59:02 +03:00
|
|
|
<% end %>
|
2008-09-28 16:36:30 +04:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<p><%= check_all_links 'workflow_form' %></p>
|
|
|
|
|
2006-07-29 23:54:22 +04:00
|
|
|
<%= submit_tag l(:button_save) %>
|
2007-03-12 20:59:02 +03:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2007-12-07 21:42:40 +03:00
|
|
|
|
2008-01-03 01:41:53 +03:00
|
|
|
<% html_title(l(:label_workflow)) -%>
|