Project

General

Profile

Feature #10717 » RM_10717_worflow_hide_empty_lines_and_columns.patch

Jérôme BATAILLE, 2012-04-19 18:38

View differences:

app/views/workflows/_form.html.erb (copie de travail)
</tr>
<tr>
<td></td>
<% for new_status in @statuses %>
<%
new_status_worflows_present = {}
for new_status in @statuses
if @used_statuses_only
new_status_worflows_present[new_status.id] = workflows.select {|w| w.new_status == new_status}.size > 0
end
if !@used_statuses_only || new_status_worflows_present[new_status.id]
-%>
<td width="<%= 75 / @statuses.size %>%" align="center">
<%= 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)}") %>
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
<%=h new_status.name %>
</td>
<% end %>
<%
end
end
-%>
</tr>
</thead>
<tbody>
<% for old_status in @statuses %>
<%
for old_status in @statuses
if @used_statuses_only
old_status_worflows_present = workflows.select {|w| w.old_status == old_status}.size > 0
end
if !@used_statuses_only || old_status_worflows_present
-%>
<tr class="<%= cycle("odd", "even") %>">
<td>
<%= 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)}") %>
<%=h old_status.name %>
</td>
<% for new_status in @statuses -%>
<%
for new_status in @statuses
if !@used_statuses_only || new_status_worflows_present[new_status.id]
-%>
<td align="center">
<%= 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},
:class => "old-status-#{old_status.id} new-status-#{new_status.id}" %>
</td>
<% end -%>
<%
end
end
-%>
</tr>
<% end %>
<%
end
end
-%>
</tbody>
</table>
    (1-1/1)