Redmine/redmine/app/views/roles/workflow.rhtml

70 lines
1.9 KiB
Plaintext
Raw Normal View History

<h2><%=_('Workflow setup')%></h2>
<p><%=_('Select a workflow to edit')%>:</p>
<%= start_form_tag ({:action => 'workflow'}, :method => 'get') %>
<div style="float:left;margin-right:10px;">
<p><label for="role_id"><%=_('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"><%=_('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 _('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"><strong><%=_('Issue status')%></strong></td>
<td align="center" colspan="<%= @statuses.length %>"><strong><%=_('New statuses allowed')%></strong></td>
</tr>
<tr>
<td></td>
<% for new_status in @statuses %>
<td width="60" align="center"><%= new_status.name %></td>
<% end %>
</tr>
<% for old_status in @statuses %>
<tr>
<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)"><%=_('Check all')%></a> |
<a href="javascript:checkAll('workflow_form', false)"><%=_('Uncheck all')%></a>
</p>
<br />
<%= submit_tag _('Save') %>
<%= end_form_tag %>
<% end %>
</div>