edit.rhtml
73 lines
| 2.4 KiB
| text/html+ruby
|
RhtmlLexer
|
r3040 | <%= render :partial => 'action_menu' %> | ||
|
r1912 | |||
|
r330 | <h2><%=l(:label_workflow)%></h2> | ||
<p><%=l(:text_workflow_edit)%>:</p> | ||||
|
r1912 | <% form_tag({}, :method => 'get') do %> | ||
|
r3033 | <p> | ||
<label><%=l(:label_role)%>:</label> | ||||
<%= select_tag 'role_id', options_from_collection_for_select(@roles, "id", "name", @role && @role.id) %> | ||||
<label><%=l(:label_tracker)%>:</label> | ||||
<%= select_tag 'tracker_id', options_from_collection_for_select(@trackers, "id", "name", @tracker && @tracker.id) %> | ||||
|
r3074 | |||
<%= hidden_field_tag 'used_statuses_only', '0' %> | ||||
<label><%= check_box_tag 'used_statuses_only', '1', @used_statuses_only %> <%= l(:label_display_used_statuses_only) %></label> | ||||
</p> | ||||
<p> | ||||
<%= submit_tag l(:button_edit), :name => nil %> | ||||
|
r330 | </p> | ||
<% end %> | ||||
|
r3033 | |||
<% if @tracker && @role && @statuses.any? %> | ||||
|
r1912 | <% form_tag({}, :id => 'workflow_form' ) do %> | ||
<%= hidden_field_tag 'tracker_id', @tracker.id %> | ||||
<%= hidden_field_tag 'role_id', @role.id %> | ||||
|
r3262 | <div class="autoscroll"> | ||
|
r1914 | <table class="list"> | ||
<thead> | ||||
|
r330 | <tr> | ||
|
r3033 | <th align="left"><%=l(:label_current_status)%></th> | ||
<th align="center" colspan="<%= @statuses.length %>"><%=l(:label_new_statuses_allowed)%></th> | ||||
|
r330 | </tr> | ||
<tr> | ||||
|
r3033 | <td></td> | ||
<% for new_status in @statuses %> | ||||
|
r3580 | <td width="<%= 75 / @statuses.size %>%" align="center"> | ||
<%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('input.new-status-#{new_status.id}')", | ||||
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %> | ||||
<%= new_status.name %> | ||||
</td> | ||||
|
r3033 | <% end %> | ||
|
r330 | </tr> | ||
|
r1914 | </thead> | ||
<tbody> | ||||
|
r330 | <% for old_status in @statuses %> | ||
|
r3033 | <tr class="<%= cycle("odd", "even") %>"> | ||
|
r3580 | <td> | ||
<%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('input.old-status-#{old_status.id}')", | ||||
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %> | ||||
<%= old_status.name %> | ||||
</td> | ||||
|
r2627 | <% new_status_ids_allowed = old_status.find_new_statuses_allowed_to([@role], @tracker).collect(&:id) -%> | ||
|
r944 | <% for new_status in @statuses -%> | ||
|
r3033 | <td align="center"> | ||
|
r3580 | <%= check_box_tag "issue_status[#{ old_status.id }][]", new_status.id, new_status_ids_allowed.include?(new_status.id), | ||
:class => "old-status-#{old_status.id} new-status-#{new_status.id}" %> | ||||
|
r3033 | </td> | ||
|
r944 | <% end -%> | ||
|
r3033 | </tr> | ||
|
r330 | <% end %> | ||
|
r1914 | </tbody> | ||
</table> | ||||
|
r3262 | </div> | ||
|
r1914 | <p><%= check_all_links 'workflow_form' %></p> | ||
|
r12 | <%= submit_tag l(:button_save) %> | ||
|
r330 | <% end %> | ||
<% end %> | ||||
|
r951 | |||
|
r1019 | <% html_title(l(:label_workflow)) -%> | ||