2006-07-29 23:54:22 +04:00
|
|
|
<h2><%=l(:label_workflow)%></h2>
|
2006-06-28 22:11:03 +04:00
|
|
|
|
2006-07-29 23:54:22 +04:00
|
|
|
<p><%=l(:text_workflow_edit)%>:</p>
|
2006-06-28 22:11:03 +04:00
|
|
|
|
|
|
|
<%= start_form_tag ({:action => 'workflow'}, :method => 'get') %>
|
|
|
|
<div style="float:left;margin-right:10px;">
|
2006-07-29 23:54:22 +04:00
|
|
|
<p><label for="role_id"><%=l(:label_role)%></label><br/>
|
2006-06-28 22:11:03 +04:00
|
|
|
<select id="role_id" name="role_id">
|
|
|
|
<%= options_from_collection_for_select @roles, "id", "name", (@role.id unless @role.nil?) %>
|
|
|
|
</select></p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
2006-07-29 23:54:22 +04:00
|
|
|
<p><label for="tracker_id"><%=l(:label_tracker)%></label><br/>
|
2006-06-28 22:11:03 +04:00
|
|
|
<select id="tracker_id" name="tracker_id">
|
|
|
|
<%= options_from_collection_for_select @trackers, "id", "name", (@tracker.id unless @tracker.nil?) %>
|
|
|
|
</select>
|
|
|
|
|
2006-07-29 23:54:22 +04:00
|
|
|
<%= submit_tag l(:button_edit) %>
|
2006-06-28 22:11:03 +04:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<%= end_form_tag %>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<% unless @tracker.nil? or @role.nil? %>
|
|
|
|
<div class="box">
|
|
|
|
<%= form_tag ({:action => 'workflow', :role_id => @role, :tracker_id => @tracker }, :id => 'workflow_form' ) %>
|
|
|
|
<table>
|
|
|
|
<tr>
|
2006-12-26 18:02:33 +03:00
|
|
|
<td align="center"><strong><%=l(:label_current_status)%></strong></td>
|
2006-07-29 23:54:22 +04:00
|
|
|
<td align="center" colspan="<%= @statuses.length %>"><strong><%=l(:label_new_statuses_allowed)%></strong></td>
|
2006-06-28 22:11:03 +04:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2006-12-26 18:02:33 +03:00
|
|
|
<td></td>
|
2006-06-28 22:11:03 +04:00
|
|
|
<% for new_status in @statuses %>
|
2006-10-15 13:00:05 +04:00
|
|
|
<td width="80" align="center"><%= new_status.name %></td>
|
2006-06-28 22:11:03 +04:00
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<% for old_status in @statuses %>
|
|
|
|
<tr>
|
2006-12-26 18:02:33 +03:00
|
|
|
<td><div class="square" style="background:#<%= old_status.html_color %>;"></div> <%= old_status.name %></td>
|
2006-06-28 22:11:03 +04:00
|
|
|
<% for new_status in @statuses %>
|
|
|
|
<td align="center">
|
|
|
|
|
|
|
|
<input type="checkbox"
|
|
|
|
name="issue_status[<%= old_status.id %>][]"
|
|
|
|
value="<%= new_status.id %>"
|
|
|
|
<%if old_status.new_statuses_allowed_to(@role, @tracker).include? new_status%>checked="checked"<%end%>
|
|
|
|
<%if old_status==new_status%>disabled<%end%>
|
|
|
|
>
|
|
|
|
</td>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|
|
|
|
<br />
|
|
|
|
<p>
|
2006-07-29 23:54:22 +04:00
|
|
|
<a href="javascript:checkAll('workflow_form', true)"><%=l(:button_check_all)%></a> |
|
|
|
|
<a href="javascript:checkAll('workflow_form', false)"><%=l(:button_uncheck_all)%></a>
|
2006-06-28 22:11:03 +04:00
|
|
|
</p>
|
|
|
|
<br />
|
2006-07-29 23:54:22 +04:00
|
|
|
<%= submit_tag l(:button_save) %>
|
2006-06-28 22:11:03 +04:00
|
|
|
<%= end_form_tag %>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
</div>
|