@@ -1,63 +1,73 | |||||
1 | <%= render :partial => 'action_menu' %> |
|
1 | <%= render :partial => 'action_menu' %> | |
2 |
|
2 | |||
3 | <h2><%=l(:label_workflow)%></h2> |
|
3 | <h2><%=l(:label_workflow)%></h2> | |
4 |
|
4 | |||
5 | <p><%=l(:text_workflow_edit)%>:</p> |
|
5 | <p><%=l(:text_workflow_edit)%>:</p> | |
6 |
|
6 | |||
7 | <% form_tag({}, :method => 'get') do %> |
|
7 | <% form_tag({}, :method => 'get') do %> | |
8 | <p> |
|
8 | <p> | |
9 | <label><%=l(:label_role)%>:</label> |
|
9 | <label><%=l(:label_role)%>:</label> | |
10 | <%= select_tag 'role_id', options_from_collection_for_select(@roles, "id", "name", @role && @role.id) %> |
|
10 | <%= select_tag 'role_id', options_from_collection_for_select(@roles, "id", "name", @role && @role.id) %> | |
11 |
|
11 | |||
12 | <label><%=l(:label_tracker)%>:</label> |
|
12 | <label><%=l(:label_tracker)%>:</label> | |
13 | <%= select_tag 'tracker_id', options_from_collection_for_select(@trackers, "id", "name", @tracker && @tracker.id) %> |
|
13 | <%= select_tag 'tracker_id', options_from_collection_for_select(@trackers, "id", "name", @tracker && @tracker.id) %> | |
14 |
|
14 | |||
15 | <%= hidden_field_tag 'used_statuses_only', '0' %> |
|
15 | <%= hidden_field_tag 'used_statuses_only', '0' %> | |
16 | <label><%= check_box_tag 'used_statuses_only', '1', @used_statuses_only %> <%= l(:label_display_used_statuses_only) %></label> |
|
16 | <label><%= check_box_tag 'used_statuses_only', '1', @used_statuses_only %> <%= l(:label_display_used_statuses_only) %></label> | |
17 | </p> |
|
17 | </p> | |
18 | <p> |
|
18 | <p> | |
19 | <%= submit_tag l(:button_edit), :name => nil %> |
|
19 | <%= submit_tag l(:button_edit), :name => nil %> | |
20 | </p> |
|
20 | </p> | |
21 | <% end %> |
|
21 | <% end %> | |
22 |
|
22 | |||
23 |
|
23 | |||
24 | <% if @tracker && @role && @statuses.any? %> |
|
24 | <% if @tracker && @role && @statuses.any? %> | |
25 | <% form_tag({}, :id => 'workflow_form' ) do %> |
|
25 | <% form_tag({}, :id => 'workflow_form' ) do %> | |
26 | <%= hidden_field_tag 'tracker_id', @tracker.id %> |
|
26 | <%= hidden_field_tag 'tracker_id', @tracker.id %> | |
27 | <%= hidden_field_tag 'role_id', @role.id %> |
|
27 | <%= hidden_field_tag 'role_id', @role.id %> | |
28 | <div class="autoscroll"> |
|
28 | <div class="autoscroll"> | |
29 | <table class="list"> |
|
29 | <table class="list"> | |
30 | <thead> |
|
30 | <thead> | |
31 | <tr> |
|
31 | <tr> | |
32 | <th align="left"><%=l(:label_current_status)%></th> |
|
32 | <th align="left"><%=l(:label_current_status)%></th> | |
33 | <th align="center" colspan="<%= @statuses.length %>"><%=l(:label_new_statuses_allowed)%></th> |
|
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="<%= 75 / @statuses.size %>%" align="center"> |
|
38 | <td width="<%= 75 / @statuses.size %>%" align="center"> | |
|
39 | <%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('input.new-status-#{new_status.id}')", | |||
|
40 | :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %> | |||
|
41 | <%= new_status.name %> | |||
|
42 | </td> | |||
39 | <% end %> |
|
43 | <% end %> | |
40 | </tr> |
|
44 | </tr> | |
41 | </thead> |
|
45 | </thead> | |
42 | <tbody> |
|
46 | <tbody> | |
43 | <% for old_status in @statuses %> |
|
47 | <% for old_status in @statuses %> | |
44 | <tr class="<%= cycle("odd", "even") %>"> |
|
48 | <tr class="<%= cycle("odd", "even") %>"> | |
45 | <td><%= old_status.name %></td> |
|
49 | <td> | |
|
50 | <%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('input.old-status-#{old_status.id}')", | |||
|
51 | :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %> | |||
|
52 | ||||
|
53 | <%= old_status.name %> | |||
|
54 | </td> | |||
46 | <% new_status_ids_allowed = old_status.find_new_statuses_allowed_to([@role], @tracker).collect(&:id) -%> |
|
55 | <% new_status_ids_allowed = old_status.find_new_statuses_allowed_to([@role], @tracker).collect(&:id) -%> | |
47 | <% for new_status in @statuses -%> |
|
56 | <% for new_status in @statuses -%> | |
48 | <td align="center"> |
|
57 | <td align="center"> | |
49 |
<%= check_box_tag "issue_status[#{ old_status.id }][]", new_status.id, new_status_ids_allowed.include?(new_status.id) |
|
58 | <%= check_box_tag "issue_status[#{ old_status.id }][]", new_status.id, new_status_ids_allowed.include?(new_status.id), | |
|
59 | :class => "old-status-#{old_status.id} new-status-#{new_status.id}" %> | |||
50 | </td> |
|
60 | </td> | |
51 | <% end -%> |
|
61 | <% end -%> | |
52 | </tr> |
|
62 | </tr> | |
53 | <% end %> |
|
63 | <% end %> | |
54 | </tbody> |
|
64 | </tbody> | |
55 | </table> |
|
65 | </table> | |
56 | </div> |
|
66 | </div> | |
57 | <p><%= check_all_links 'workflow_form' %></p> |
|
67 | <p><%= check_all_links 'workflow_form' %></p> | |
58 |
|
68 | |||
59 | <%= submit_tag l(:button_save) %> |
|
69 | <%= submit_tag l(:button_save) %> | |
60 | <% end %> |
|
70 | <% end %> | |
61 | <% end %> |
|
71 | <% end %> | |
62 |
|
72 | |||
63 | <% html_title(l(:label_workflow)) -%> |
|
73 | <% html_title(l(:label_workflow)) -%> |
General Comments 0
You need to be logged in to leave comments.
Login now