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