10 |
10 |
</tr>
|
11 |
11 |
<tr>
|
12 |
12 |
<td></td>
|
13 |
|
<% for new_status in @statuses %>
|
|
13 |
<%
|
|
14 |
new_status_worflows_present = {}
|
|
15 |
for new_status in @statuses
|
|
16 |
if @used_statuses_only
|
|
17 |
new_status_worflows_present[new_status.id] = workflows.select {|w| w.new_status == new_status}.size > 0
|
|
18 |
end
|
|
19 |
|
|
20 |
if !@used_statuses_only || new_status_worflows_present[new_status.id]
|
|
21 |
-%>
|
14 |
22 |
<td width="<%= 75 / @statuses.size %>%" align="center">
|
15 |
23 |
<%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('table.transitions-#{name} input.new-status-#{new_status.id}')",
|
16 |
|
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
|
|
24 |
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
|
17 |
25 |
<%=h new_status.name %>
|
18 |
26 |
</td>
|
19 |
|
<% end %>
|
|
27 |
<%
|
|
28 |
end
|
|
29 |
end
|
|
30 |
-%>
|
20 |
31 |
</tr>
|
21 |
32 |
</thead>
|
22 |
33 |
<tbody>
|
23 |
|
<% for old_status in @statuses %>
|
|
34 |
<%
|
|
35 |
for old_status in @statuses
|
|
36 |
if @used_statuses_only
|
|
37 |
old_status_worflows_present = workflows.select {|w| w.old_status == old_status}.size > 0
|
|
38 |
end
|
|
39 |
if !@used_statuses_only || old_status_worflows_present
|
|
40 |
-%>
|
24 |
41 |
<tr class="<%= cycle("odd", "even") %>">
|
25 |
42 |
<td>
|
26 |
43 |
<%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('table.transitions-#{name} input.old-status-#{old_status.id}')",
|
27 |
44 |
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
|
28 |
|
|
29 |
45 |
<%=h old_status.name %>
|
30 |
46 |
</td>
|
31 |
|
<% for new_status in @statuses -%>
|
|
47 |
<%
|
|
48 |
for new_status in @statuses
|
|
49 |
if !@used_statuses_only || new_status_worflows_present[new_status.id]
|
|
50 |
-%>
|
32 |
51 |
<td align="center">
|
33 |
52 |
<%= check_box_tag "issue_status[#{ old_status.id }][#{new_status.id}][]", name, workflows.detect {|w| w.old_status_id == old_status.id && w.new_status_id == new_status.id},
|
34 |
53 |
:class => "old-status-#{old_status.id} new-status-#{new_status.id}" %>
|
35 |
54 |
</td>
|
36 |
|
<% end -%>
|
|
55 |
<%
|
|
56 |
end
|
|
57 |
end
|
|
58 |
-%>
|
37 |
59 |
</tr>
|
38 |
|
<% end %>
|
|
60 |
<%
|
|
61 |
end
|
|
62 |
end
|
|
63 |
-%>
|
39 |
64 |
</tbody>
|
40 |
65 |
</table>
|