Mercurial > hg > soundsoftware-site
diff app/views/workflows/.svn/text-base/edit.rhtml.svn-base @ 0:513646585e45
* Import Redmine trunk SVN rev 3859
author | Chris Cannam |
---|---|
date | Fri, 23 Jul 2010 15:52:44 +0100 |
parents | |
children | 051f544170fe |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/views/workflows/.svn/text-base/edit.rhtml.svn-base Fri Jul 23 15:52:44 2010 +0100 @@ -0,0 +1,73 @@ +<%= render :partial => 'action_menu' %> + +<h2><%=l(:label_workflow)%></h2> + +<p><%=l(:text_workflow_edit)%>:</p> + +<% form_tag({}, :method => 'get') do %> +<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) %> + + <%= 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 %> +</p> +<% end %> + + +<% if @tracker && @role && @statuses.any? %> +<% form_tag({}, :id => 'workflow_form' ) do %> +<%= hidden_field_tag 'tracker_id', @tracker.id %> +<%= hidden_field_tag 'role_id', @role.id %> +<div class="autoscroll"> +<table class="list"> +<thead> + <tr> + <th align="left"><%=l(:label_current_status)%></th> + <th align="center" colspan="<%= @statuses.length %>"><%=l(:label_new_statuses_allowed)%></th> + </tr> + <tr> + <td></td> + <% for new_status in @statuses %> + <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> + <% end %> + </tr> +</thead> +<tbody> + <% for old_status in @statuses %> + <tr class="<%= cycle("odd", "even") %>"> + <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> + <% new_status_ids_allowed = old_status.find_new_statuses_allowed_to([@role], @tracker).collect(&:id) -%> + <% for new_status in @statuses -%> + <td align="center"> + <%= 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}" %> + </td> + <% end -%> + </tr> + <% end %> +</tbody> +</table> +</div> +<p><%= check_all_links 'workflow_form' %></p> + +<%= submit_tag l(:button_save) %> +<% end %> +<% end %> + +<% html_title(l(:label_workflow)) -%>