Slight changes to the workflow setup screen.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1916 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2008-09-28 12:36:30 +00:00
parent 5083e92772
commit 3544d6398a
1 changed files with 16 additions and 14 deletions

View File

@ -8,12 +8,12 @@
<% form_tag({}, :method => 'get') do %>
<p><label for="role_id"><%=l(:label_role)%>:</label>
<select id="role_id" name="role_id">
<select name="role_id">
<%= options_from_collection_for_select @roles, "id", "name", (@role.id unless @role.nil?) %>
</select>
<label for="tracker_id"><%=l(:label_tracker)%>:</label>
<select id="tracker_id" name="tracker_id">
<select name="tracker_id">
<%= options_from_collection_for_select @trackers, "id", "name", (@tracker.id unless @tracker.nil?) %>
</select>
<%= submit_tag l(:button_edit), :name => nil %>
@ -22,25 +22,26 @@
<% unless @tracker.nil? or @role.nil? %>
<% unless @tracker.nil? or @role.nil? or @statuses.empty? %>
<% form_tag({}, :id => 'workflow_form' ) do %>
<%= hidden_field_tag 'tracker_id', @tracker.id %>
<%= hidden_field_tag 'role_id', @role.id %>
<div class="box">
<table>
<table class="list">
<thead>
<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>
<th align="left"><%=l(:label_current_status)%></th>
<th align="center" colspan="<%= @statuses.length %>"><%=l(:label_new_statuses_allowed)%></th>
</tr>
<tr>
<td></td>
<% for new_status in @statuses %>
<td width="80" align="center"><%= new_status.name %></td>
<td width="<%= 75 / @statuses.size %>%" align="center"><%= new_status.name %></td>
<% end %>
</tr>
</thead>
<tbody>
<% for old_status in @statuses %>
<tr>
<tr class="<%= cycle("odd", "even") %>">
<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 -%>
@ -48,14 +49,15 @@
<input type="checkbox"
name="issue_status[<%= old_status.id %>][]"
value="<%= new_status.id %>"
<%= 'checked="checked"' if new_status_ids_allowed.include? new_status.id %>>
<%= 'checked="checked"' if new_status_ids_allowed.include? new_status.id %> />
</td>
<% end -%>
</tr>
<% end %>
</table>
<p><%= check_all_links 'workflow_form' %></p>
</div>
</tbody>
</table>
<p><%= check_all_links 'workflow_form' %></p>
<%= submit_tag l(:button_save) %>
<% end %>