2007-03-12 20:59:02 +03:00
|
|
|
<h2><%=l(:label_workflow)%></h2>
|
|
|
|
|
|
|
|
<p><%=l(:text_workflow_edit)%>:</p>
|
|
|
|
|
2007-04-23 20:46:04 +04:00
|
|
|
<% form_tag({:action => 'workflow'}, :method => 'get') do %>
|
2007-09-22 17:17:49 +04:00
|
|
|
<p><label for="role_id"><%=l(:label_role)%>:</label>
|
2007-03-12 20:59:02 +03:00
|
|
|
<select id="role_id" name="role_id">
|
|
|
|
<%= options_from_collection_for_select @roles, "id", "name", (@role.id unless @role.nil?) %>
|
2007-09-22 17:17:49 +04:00
|
|
|
</select>
|
2007-03-12 20:59:02 +03:00
|
|
|
|
2007-09-22 17:17:49 +04:00
|
|
|
<label for="tracker_id"><%=l(:label_tracker)%>:</label>
|
2007-03-12 20:59:02 +03:00
|
|
|
<select id="tracker_id" name="tracker_id">
|
|
|
|
<%= options_from_collection_for_select @trackers, "id", "name", (@tracker.id unless @tracker.nil?) %>
|
|
|
|
</select>
|
|
|
|
<%= submit_tag l(:button_edit) %>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<% unless @tracker.nil? or @role.nil? %>
|
2007-09-22 17:17:49 +04:00
|
|
|
<% form_tag({:action => 'workflow', :role_id => @role, :tracker_id => @tracker }, :id => 'workflow_form' ) do %>
|
2007-03-12 20:59:02 +03:00
|
|
|
<div class="box">
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td align="center"><strong><%=l(:label_current_status)%></strong></td>
|
|
|
|
<td align="center" colspan="<%= @statuses.length %>"><strong><%=l(:label_new_statuses_allowed)%></strong></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td></td>
|
|
|
|
<% for new_status in @statuses %>
|
|
|
|
<td width="80" align="center"><%= new_status.name %></td>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<% for old_status in @statuses %>
|
|
|
|
<tr>
|
2007-12-07 14:19:30 +03:00
|
|
|
<td><%= old_status.name %></td>
|
|
|
|
<% new_status_ids_allowed = old_status.find_new_statuses_allowed_to(@role, @tracker).collect(&:id) -%>
|
|
|
|
<% for new_status in @statuses -%>
|
2007-03-12 20:59:02 +03:00
|
|
|
<td align="center">
|
2007-12-07 14:19:30 +03:00
|
|
|
<input type="checkbox"
|
2007-03-12 20:59:02 +03:00
|
|
|
name="issue_status[<%= old_status.id %>][]"
|
|
|
|
value="<%= new_status.id %>"
|
2007-12-07 14:19:30 +03:00
|
|
|
<%= 'checked="checked"' if new_status_ids_allowed.include? new_status.id %>>
|
2007-03-12 20:59:02 +03:00
|
|
|
</td>
|
2007-12-07 14:19:30 +03:00
|
|
|
<% end -%>
|
2007-03-12 20:59:02 +03:00
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|
2007-09-22 17:17:49 +04:00
|
|
|
<p><%= check_all_links 'workflow_form' %></p>
|
|
|
|
</div>
|
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)) -%>
|