@@ -7,52 +7,46 | |||
|
7 | 7 | <p><%=l(:text_workflow_edit)%>:</p> |
|
8 | 8 | |
|
9 | 9 | <% form_tag({}, :method => 'get') do %> |
|
10 | <p><label for="role_id"><%=l(:label_role)%>:</label> | |
|
11 | <select name="role_id"> | |
|
12 |
|
|
|
13 | </select> | |
|
14 | ||
|
15 | <label for="tracker_id"><%=l(:label_tracker)%>:</label> | |
|
16 | <select name="tracker_id"> | |
|
17 | <%= options_from_collection_for_select @trackers, "id", "name", (@tracker.id unless @tracker.nil?) %> | |
|
18 | </select> | |
|
19 | <%= submit_tag l(:button_edit), :name => nil %> | |
|
10 | <p> | |
|
11 | <label><%=l(:label_role)%>:</label> | |
|
12 | <%= select_tag 'role_id', options_from_collection_for_select(@roles, "id", "name", @role && @role.id) %> | |
|
13 | ||
|
14 | <label><%=l(:label_tracker)%>:</label> | |
|
15 | <%= select_tag 'tracker_id', options_from_collection_for_select(@trackers, "id", "name", @tracker && @tracker.id) %> | |
|
16 | ||
|
17 | <%= submit_tag l(:button_edit), :name => nil %> | |
|
20 | 18 | </p> |
|
21 | 19 | <% end %> |
|
22 | ||
|
23 | ||
|
24 | 20 | |
|
25 | <% unless @tracker.nil? or @role.nil? or @statuses.empty? %> | |
|
21 | ||
|
22 | <% if @tracker && @role && @statuses.any? %> | |
|
26 | 23 | <% form_tag({}, :id => 'workflow_form' ) do %> |
|
27 | 24 | <%= hidden_field_tag 'tracker_id', @tracker.id %> |
|
28 | 25 | <%= hidden_field_tag 'role_id', @role.id %> |
|
29 | 26 | <table class="list"> |
|
30 | 27 | <thead> |
|
31 | 28 | <tr> |
|
32 | <th align="left"><%=l(:label_current_status)%></th> | |
|
33 | <th align="center" colspan="<%= @statuses.length %>"><%=l(:label_new_statuses_allowed)%></th> | |
|
29 | <th align="left"><%=l(:label_current_status)%></th> | |
|
30 | <th align="center" colspan="<%= @statuses.length %>"><%=l(:label_new_statuses_allowed)%></th> | |
|
34 | 31 | </tr> |
|
35 | 32 | <tr> |
|
36 | <td></td> | |
|
37 | <% for new_status in @statuses %> | |
|
33 | <td></td> | |
|
34 | <% for new_status in @statuses %> | |
|
38 | 35 | <td width="<%= 75 / @statuses.size %>%" align="center"><%= new_status.name %></td> |
|
39 | <% end %> | |
|
36 | <% end %> | |
|
40 | 37 | </tr> |
|
41 | 38 | </thead> |
|
42 | 39 | <tbody> |
|
43 | 40 | <% for old_status in @statuses %> |
|
44 |
|
|
|
41 | <tr class="<%= cycle("odd", "even") %>"> | |
|
45 | 42 | <td><%= old_status.name %></td> |
|
46 | 43 | <% new_status_ids_allowed = old_status.find_new_statuses_allowed_to([@role], @tracker).collect(&:id) -%> |
|
47 | 44 | <% for new_status in @statuses -%> |
|
48 |
|
|
|
49 | <input type="checkbox" | |
|
50 | name="issue_status[<%= old_status.id %>][]" | |
|
51 | value="<%= new_status.id %>" | |
|
52 | <%= 'checked="checked"' if new_status_ids_allowed.include? new_status.id %> /> | |
|
53 | </td> | |
|
45 | <td align="center"> | |
|
46 | <%= check_box_tag "issue_status[#{ old_status.id }][]", new_status.id, new_status_ids_allowed.include?(new_status.id) %> | |
|
47 | </td> | |
|
54 | 48 | <% end -%> |
|
55 |
|
|
|
49 | </tr> | |
|
56 | 50 | <% end %> |
|
57 | 51 | </tbody> |
|
58 | 52 | </table> |
@@ -60,7 +54,6 | |||
|
60 | 54 | |
|
61 | 55 | <%= submit_tag l(:button_save) %> |
|
62 | 56 | <% end %> |
|
63 | ||
|
64 | 57 | <% end %> |
|
65 | 58 | |
|
66 | 59 | <% html_title(l(:label_workflow)) -%> |
General Comments 0
You need to be logged in to leave comments.
Login now