_form.html.erb
44 lines
| 1.8 KiB
| text/plain
|
TextLexer
|
r12649 | <table class="list workflows transitions transitions-<%= name %>"> | ||
|
r4775 | <thead> | ||
|
r6556 | <tr> | ||
|
r12038 | <th> | ||
|
r14686 | <%= link_to_function('', "toggleCheckboxesBySelector('table.transitions-#{name} input')", | ||
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}", | ||||
:class => 'icon-only icon-checked') %> | ||||
|
r4775 | <%=l(:label_current_status)%> | ||
</th> | ||||
|
r12038 | <th colspan="<%= @statuses.length %>"><%=l(:label_new_statuses_allowed)%></th> | ||
|
r6556 | </tr> | ||
<tr> | ||||
<td></td> | ||||
<% for new_status in @statuses %> | ||||
|
r12038 | <td style="width:<%= 75 / @statuses.size %>%;"> | ||
|
r14686 | <%= 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') %> | ||||
|
r13661 | <%= new_status.name %> | ||
|
r6556 | </td> | ||
<% end %> | ||||
</tr> | ||||
|
r4775 | </thead> | ||
<tbody> | ||||
|
r14076 | <% for old_status in [nil] + @statuses %> | ||
<% next if old_status.nil? && name != 'always' %> | ||||
|
r6556 | <tr class="<%= cycle("odd", "even") %>"> | ||
|
r12038 | <td class="name"> | ||
|
r14686 | <%= 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') %> | ||||
|
r6558 | |||
|
r14076 | <%= old_status ? old_status.name : content_tag('em', l(:label_issue_new)) %> | ||
|
r6556 | </td> | ||
<% for new_status in @statuses -%> | ||||
|
r14076 | <% checked = workflows.detect {|w| w.old_status == old_status && w.new_status == new_status} %> | ||
|
r12038 | <td class="<%= checked ? 'enabled' : '' %>"> | ||
|
r12649 | <%= transition_tag workflows, old_status, new_status, name %> | ||
|
r6556 | </td> | ||
<% end -%> | ||||
</tr> | ||||
<% end %> | ||||
|
r4775 | </tbody> | ||
|
r6556 | </table> | ||