71 lines
2.1 KiB
Plaintext
71 lines
2.1 KiB
Plaintext
<h2><%=l(:label_workflow)%></h2>
|
|
|
|
<p><%=l(:text_workflow_edit)%>:</p>
|
|
|
|
<%= start_form_tag ({:action => 'workflow'}, :method => 'get') %>
|
|
<div style="float:left;margin-right:10px;">
|
|
<p><label for="role_id"><%=l(:label_role)%></label><br/>
|
|
<select id="role_id" name="role_id">
|
|
<%= options_from_collection_for_select @roles, "id", "name", (@role.id unless @role.nil?) %>
|
|
</select></p>
|
|
</div>
|
|
|
|
<div>
|
|
<p><label for="tracker_id"><%=l(:label_tracker)%></label><br/>
|
|
<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>
|
|
</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>
|
|
<td align="center" colspan="2"><strong><%=l(:label_current_status)%></strong></td>
|
|
<td align="center" colspan="<%= @statuses.length %>"><strong><%=l(:label_new_statuses_allowed)%></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2"></td>
|
|
<% for new_status in @statuses %>
|
|
<td width="80" align="center"><%= new_status.name %></td>
|
|
<% end %>
|
|
</tr>
|
|
|
|
<% for old_status in @statuses %>
|
|
<tr>
|
|
<td width="20" align="center"><div style="background-color:#<%= old_status.html_color %>"> </div></td>
|
|
<td><%= old_status.name %></td>
|
|
|
|
<% 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>
|
|
<a href="javascript:checkAll('workflow_form', true)"><%=l(:button_check_all)%></a> |
|
|
<a href="javascript:checkAll('workflow_form', false)"><%=l(:button_uncheck_all)%></a>
|
|
</p>
|
|
<br />
|
|
<%= submit_tag l(:button_save) %>
|
|
<%= end_form_tag %>
|
|
|
|
<% end %>
|
|
</div> |