2008-09-28 16:03:17 +04:00
|
|
|
<div class="contextual">
|
|
|
|
<%= link_to l(:field_summary), :action => 'index' %>
|
|
|
|
</div>
|
|
|
|
|
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 %>
|
2007-09-22 17:17:49 +04:00
|
|
|
<p><label for="role_id"><%=l(:label_role)%>:</label>
|
2008-09-28 16:36:30 +04:00
|
|
|
<select name="role_id">
|
2007-03-12 20:59:02 +03:00
|
|
|
<%= 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>
|
2008-09-28 16:36:30 +04:00
|
|
|
<select name="tracker_id">
|
2007-03-12 20:59:02 +03:00
|
|
|
<%= options_from_collection_for_select @trackers, "id", "name", (@tracker.id unless @tracker.nil?) %>
|
|
|
|
</select>
|
2008-09-28 16:03:17 +04:00
|
|
|
<%= submit_tag l(:button_edit), :name => nil %>
|
2007-03-12 20:59:02 +03:00
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-09-28 16:36:30 +04:00
|
|
|
<% unless @tracker.nil? or @role.nil? or @statuses.empty? %>
|
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>
|
2008-09-28 16:36:30 +04: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>
|
|
|
|
<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>
|
2007-03-12 20:59:02 +03:00
|
|
|
<% end %>
|
|
|
|
</tr>
|
2008-09-28 16:36:30 +04:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
2007-03-12 20:59:02 +03:00
|
|
|
<% for old_status in @statuses %>
|
2008-09-28 16:36:30 +04:00
|
|
|
<tr class="<%= cycle("odd", "even") %>">
|
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 %>"
|
2008-09-28 16:36:30 +04: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 %>
|
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)) -%>
|