1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-24 17:31:14 +00:00
redmine/app/views/workflows/_form.html.erb
Jean-Philippe Lang 7467c145c0 Replace uses of image_tag() with CSS (#21256).
* Replace image_tag() with CSS classes
* Create some CSS classes where necessary
* Change "check all" positioned on the right in "Trackers -> Summary" and
  "Roles -> Permissions report" instead of left like in "Worfklow"
* Add missing title attribute in a few places
* Makes some lines shorter while at it

Patch by Daniel Ritz.

git-svn-id: http://svn.redmine.org/redmine/trunk@15068 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-01-20 08:50:39 +00:00

45 lines
1.8 KiB
Plaintext

<table class="list workflows transitions transitions-<%= name %>">
<thead>
<tr>
<th>
<%= link_to_function('', "toggleCheckboxesBySelector('table.transitions-#{name} input')",
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
:class => 'icon-only icon-checked') %>
<%=l(:label_current_status)%>
</th>
<th colspan="<%= @statuses.length %>"><%=l(:label_new_statuses_allowed)%></th>
</tr>
<tr>
<td></td>
<% for new_status in @statuses %>
<td style="width:<%= 75 / @statuses.size %>%;">
<%= link_to_function('', "toggleCheckboxesBySelector('table.transitions-#{name} input.new-status-#{new_status.id}')",
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
:class => 'icon-only icon-checked') %>
<%= new_status.name %>
</td>
<% end %>
</tr>
</thead>
<tbody>
<% for old_status in [nil] + @statuses %>
<% next if old_status.nil? && name != 'always' %>
<tr class="<%= cycle("odd", "even") %>">
<td class="name">
<%= link_to_function('', "toggleCheckboxesBySelector('table.transitions-#{name} input.old-status-#{old_status.try(:id) || 0}')",
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
:class => 'icon-only icon-checked') %>
<%= old_status ? old_status.name : content_tag('em', l(:label_issue_new)) %>
</td>
<% for new_status in @statuses -%>
<% checked = workflows.detect {|w| w.old_status == old_status && w.new_status == new_status} %>
<td class="<%= checked ? 'enabled' : '' %>">
<%= transition_tag workflows, old_status, new_status, name %>
</td>
<% end -%>
</tr>
<% end %>
</tbody>
</table>