2012-07-15 19:25:26 +04:00
|
|
|
<table class="list transitions transitions-<%= name %>">
|
2011-02-20 18:38:07 +03:00
|
|
|
<thead>
|
2011-08-28 03:39:10 +04:00
|
|
|
<tr>
|
2013-11-16 11:48:27 +04:00
|
|
|
<th>
|
2011-08-28 03:39:10 +04:00
|
|
|
<%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('table.transitions-#{name} input')",
|
|
|
|
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
|
2011-02-20 18:38:07 +03:00
|
|
|
<%=l(:label_current_status)%>
|
|
|
|
</th>
|
2013-11-16 11:48:27 +04:00
|
|
|
<th colspan="<%= @statuses.length %>"><%=l(:label_new_statuses_allowed)%></th>
|
2011-08-28 03:39:10 +04:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td></td>
|
|
|
|
<% for new_status in @statuses %>
|
2013-11-16 11:48:27 +04:00
|
|
|
<td style="width:<%= 75 / @statuses.size %>%;">
|
2011-08-28 03:39:10 +04:00
|
|
|
<%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('table.transitions-#{name} input.new-status-#{new_status.id}')",
|
|
|
|
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
|
|
|
|
<%=h new_status.name %>
|
|
|
|
</td>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
2011-02-20 18:38:07 +03:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
2011-08-28 03:39:10 +04:00
|
|
|
<% for old_status in @statuses %>
|
|
|
|
<tr class="<%= cycle("odd", "even") %>">
|
2013-11-16 11:48:27 +04:00
|
|
|
<td class="name">
|
2011-08-28 03:39:10 +04:00
|
|
|
<%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('table.transitions-#{name} input.old-status-#{old_status.id}')",
|
|
|
|
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
|
2011-08-28 03:40:45 +04:00
|
|
|
|
2011-08-28 03:39:10 +04:00
|
|
|
<%=h old_status.name %>
|
|
|
|
</td>
|
|
|
|
<% for new_status in @statuses -%>
|
2012-07-15 19:25:26 +04:00
|
|
|
<% checked = workflows.detect {|w| w.old_status_id == old_status.id && w.new_status_id == new_status.id} %>
|
2013-11-16 11:48:27 +04:00
|
|
|
<td class="<%= checked ? 'enabled' : '' %>">
|
2012-07-15 19:25:26 +04:00
|
|
|
<%= check_box_tag "issue_status[#{ old_status.id }][#{new_status.id}][]", name, checked,
|
2011-08-28 03:40:45 +04:00
|
|
|
:class => "old-status-#{old_status.id} new-status-#{new_status.id}" %>
|
2011-08-28 03:39:10 +04:00
|
|
|
</td>
|
|
|
|
<% end -%>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
2011-02-20 18:38:07 +03:00
|
|
|
</tbody>
|
2011-08-28 03:39:10 +04:00
|
|
|
</table>
|