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