##// END OF EJS Templates
Slight changes to the workflow setup screen....
Jean-Philippe Lang -
r1914:3544d6398ab8
parent child
Show More
@@ -8,12 +8,12
8
8
9 <% form_tag({}, :method => 'get') do %>
9 <% form_tag({}, :method => 'get') do %>
10 <p><label for="role_id"><%=l(:label_role)%>:</label>
10 <p><label for="role_id"><%=l(:label_role)%>:</label>
11 <select id="role_id" name="role_id">
11 <select name="role_id">
12 <%= options_from_collection_for_select @roles, "id", "name", (@role.id unless @role.nil?) %>
12 <%= options_from_collection_for_select @roles, "id", "name", (@role.id unless @role.nil?) %>
13 </select>
13 </select>
14
14
15 <label for="tracker_id"><%=l(:label_tracker)%>:</label>
15 <label for="tracker_id"><%=l(:label_tracker)%>:</label>
16 <select id="tracker_id" name="tracker_id">
16 <select name="tracker_id">
17 <%= options_from_collection_for_select @trackers, "id", "name", (@tracker.id unless @tracker.nil?) %>
17 <%= options_from_collection_for_select @trackers, "id", "name", (@tracker.id unless @tracker.nil?) %>
18 </select>
18 </select>
19 <%= submit_tag l(:button_edit), :name => nil %>
19 <%= submit_tag l(:button_edit), :name => nil %>
@@ -22,25 +22,26
22
22
23
23
24
24
25 <% unless @tracker.nil? or @role.nil? %>
25 <% unless @tracker.nil? or @role.nil? or @statuses.empty? %>
26 <% form_tag({}, :id => 'workflow_form' ) do %>
26 <% form_tag({}, :id => 'workflow_form' ) do %>
27 <%= hidden_field_tag 'tracker_id', @tracker.id %>
27 <%= hidden_field_tag 'tracker_id', @tracker.id %>
28 <%= hidden_field_tag 'role_id', @role.id %>
28 <%= hidden_field_tag 'role_id', @role.id %>
29 <div class="box">
29 <table class="list">
30 <table>
30 <thead>
31 <tr>
31 <tr>
32 <td align="center"><strong><%=l(:label_current_status)%></strong></td>
32 <th align="left"><%=l(:label_current_status)%></th>
33 <td align="center" colspan="<%= @statuses.length %>"><strong><%=l(:label_new_statuses_allowed)%></strong></td>
33 <th align="center" colspan="<%= @statuses.length %>"><%=l(:label_new_statuses_allowed)%></th>
34 </tr>
34 </tr>
35 <tr>
35 <tr>
36 <td></td>
36 <td></td>
37 <% for new_status in @statuses %>
37 <% for new_status in @statuses %>
38 <td width="80" align="center"><%= new_status.name %></td>
38 <td width="<%= 75 / @statuses.size %>%" align="center"><%= new_status.name %></td>
39 <% end %>
39 <% end %>
40 </tr>
40 </tr>
41
41 </thead>
42 <tbody>
42 <% for old_status in @statuses %>
43 <% for old_status in @statuses %>
43 <tr>
44 <tr class="<%= cycle("odd", "even") %>">
44 <td><%= old_status.name %></td>
45 <td><%= old_status.name %></td>
45 <% new_status_ids_allowed = old_status.find_new_statuses_allowed_to(@role, @tracker).collect(&:id) -%>
46 <% new_status_ids_allowed = old_status.find_new_statuses_allowed_to(@role, @tracker).collect(&:id) -%>
46 <% for new_status in @statuses -%>
47 <% for new_status in @statuses -%>
@@ -48,14 +49,15
48 <input type="checkbox"
49 <input type="checkbox"
49 name="issue_status[<%= old_status.id %>][]"
50 name="issue_status[<%= old_status.id %>][]"
50 value="<%= new_status.id %>"
51 value="<%= new_status.id %>"
51 <%= 'checked="checked"' if new_status_ids_allowed.include? new_status.id %>>
52 <%= 'checked="checked"' if new_status_ids_allowed.include? new_status.id %> />
52 </td>
53 </td>
53 <% end -%>
54 <% end -%>
54 </tr>
55 </tr>
55 <% end %>
56 <% end %>
56 </table>
57 </tbody>
57 <p><%= check_all_links 'workflow_form' %></p>
58 </table>
58 </div>
59 <p><%= check_all_links 'workflow_form' %></p>
60
59 <%= submit_tag l(:button_save) %>
61 <%= submit_tag l(:button_save) %>
60 <% end %>
62 <% end %>
61
63
General Comments 0
You need to be logged in to leave comments. Login now