@@ -1119,6 +1119,12 module ApplicationHelper | |||
|
1119 | 1119 | link_to_function(l(:button_uncheck_all), "checkAll('#{form_name}', false)") |
|
1120 | 1120 | end |
|
1121 | 1121 | |
|
1122 | def toggle_checkboxes_link(selector) | |
|
1123 | link_to_function image_tag('toggle_check.png'), | |
|
1124 | "toggleCheckboxesBySelector('#{selector}')", | |
|
1125 | :title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}" | |
|
1126 | end | |
|
1127 | ||
|
1122 | 1128 | def progress_bar(pcts, options={}) |
|
1123 | 1129 | pcts = [pcts, pcts] unless pcts.is_a?(Array) |
|
1124 | 1130 | pcts = pcts.collect(&:round) |
@@ -1,5 +1,5 | |||
|
1 | 1 | <fieldset class="box"> |
|
2 | <legend><%= l(:label_project_plural) %></legend> | |
|
2 | <legend><%= l(:label_project_plural) %> <%= toggle_checkboxes_link('.projects-selection input:enabled') %></legend> | |
|
3 | 3 | <div style="max-height:300px; overflow:auto;"> |
|
4 | 4 | <div class="projects-selection"> |
|
5 | 5 | <%= render_project_nested_lists(@projects) do |p| %> |
@@ -12,11 +12,13 | |||
|
12 | 12 | </fieldset> |
|
13 | 13 | |
|
14 | 14 | <fieldset class="box"> |
|
15 | <legend><%= l(:label_role_plural) %></legend> | |
|
15 | <legend><%= l(:label_role_plural) %> <%= toggle_checkboxes_link('.roles-selection input') %></legend> | |
|
16 | <div class="roles-selection"> | |
|
16 | 17 | <% @roles.each do |role| %> |
|
17 | <label class="inline"> | |
|
18 | <label> | |
|
18 | 19 | <%= check_box_tag 'membership[role_ids][]', role.id, false, :id => nil %> |
|
19 |
<%= |
|
|
20 | <%= role %> | |
|
20 | 21 | </label> |
|
21 | 22 | <% end %> |
|
23 | </div> | |
|
22 | 24 | </fieldset> |
General Comments 0
You need to be logged in to leave comments.
Login now