##// END OF EJS Templates
Add "Check/Unckeck all" buttons to rows and columns on workflow edit screen (#3201)....
Jean-Philippe Lang -
r3580:a925435b2943
parent child
Show More
@@ -1,63 +1,73
1 1 <%= render :partial => 'action_menu' %>
2 2
3 3 <h2><%=l(:label_workflow)%></h2>
4 4
5 5 <p><%=l(:text_workflow_edit)%>:</p>
6 6
7 7 <% form_tag({}, :method => 'get') do %>
8 8 <p>
9 9 <label><%=l(:label_role)%>:</label>
10 10 <%= select_tag 'role_id', options_from_collection_for_select(@roles, "id", "name", @role && @role.id) %>
11 11
12 12 <label><%=l(:label_tracker)%>:</label>
13 13 <%= select_tag 'tracker_id', options_from_collection_for_select(@trackers, "id", "name", @tracker && @tracker.id) %>
14 14
15 15 <%= hidden_field_tag 'used_statuses_only', '0' %>
16 16 <label><%= check_box_tag 'used_statuses_only', '1', @used_statuses_only %> <%= l(:label_display_used_statuses_only) %></label>
17 17 </p>
18 18 <p>
19 19 <%= submit_tag l(:button_edit), :name => nil %>
20 20 </p>
21 21 <% end %>
22 22
23 23
24 24 <% if @tracker && @role && @statuses.any? %>
25 25 <% form_tag({}, :id => 'workflow_form' ) do %>
26 26 <%= hidden_field_tag 'tracker_id', @tracker.id %>
27 27 <%= hidden_field_tag 'role_id', @role.id %>
28 28 <div class="autoscroll">
29 29 <table class="list">
30 30 <thead>
31 31 <tr>
32 32 <th align="left"><%=l(:label_current_status)%></th>
33 33 <th align="center" colspan="<%= @statuses.length %>"><%=l(:label_new_statuses_allowed)%></th>
34 34 </tr>
35 35 <tr>
36 36 <td></td>
37 37 <% for new_status in @statuses %>
38 <td width="<%= 75 / @statuses.size %>%" align="center"><%= new_status.name %></td>
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 43 <% end %>
40 44 </tr>
41 45 </thead>
42 46 <tbody>
43 47 <% for old_status in @statuses %>
44 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 55 <% new_status_ids_allowed = old_status.find_new_statuses_allowed_to([@role], @tracker).collect(&:id) -%>
47 56 <% for new_status in @statuses -%>
48 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 60 </td>
51 61 <% end -%>
52 62 </tr>
53 63 <% end %>
54 64 </tbody>
55 65 </table>
56 66 </div>
57 67 <p><%= check_all_links 'workflow_form' %></p>
58 68
59 69 <%= submit_tag l(:button_save) %>
60 70 <% end %>
61 71 <% end %>
62 72
63 73 <% html_title(l(:label_workflow)) -%>
General Comments 0
You need to be logged in to leave comments. Login now