]> source.dussan.org Git - redmine.git/commitdiff
Add "Check/Unckeck all" buttons to rows and columns on workflow edit screen (#3201).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 27 Apr 2010 17:54:27 +0000 (17:54 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 27 Apr 2010 17:54:27 +0000 (17:54 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3694 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/workflows/edit.rhtml

index e1862a6d7e61b97f9a4b2cedfe8e0576a327c6f7..26f2cf96cc5306bc7c0746b22b8d5db8e9f8c2b7 100644 (file)
        <tr>
                <td></td>
                <% for new_status in @statuses %>
-               <td width="<%= 75 / @statuses.size %>%" align="center"><%= new_status.name %></td>
+               <td width="<%= 75 / @statuses.size %>%" align="center">
+                       <%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('input.new-status-#{new_status.id}')",
+                                                                       :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
+                       <%= new_status.name %>
+               </td>
                <% end %>
        </tr>
 </thead>
 <tbody>
        <% for old_status in @statuses %>
        <tr class="<%= cycle("odd", "even") %>">
-               <td><%= old_status.name %></td>
+               <td>
+                       <%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('input.old-status-#{old_status.id}')",
+                                                                                       :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
+                       
+                       <%= old_status.name %>
+               </td>
                <% new_status_ids_allowed = old_status.find_new_statuses_allowed_to([@role], @tracker).collect(&:id) -%>
                <% for new_status in @statuses -%>
                <td align="center">
-                       <%= check_box_tag "issue_status[#{ old_status.id }][]", new_status.id, new_status_ids_allowed.include?(new_status.id) %>                        
+                       <%= check_box_tag "issue_status[#{ old_status.id }][]", new_status.id, new_status_ids_allowed.include?(new_status.id),
+                                               :class => "old-status-#{old_status.id} new-status-#{new_status.id}" %>                  
                </td>
                <% end -%>
        </tr>