From: Jean-Philippe Lang Date: Wed, 9 Dec 2009 13:30:54 +0000 (+0000) Subject: Cleaning workflow edit view. X-Git-Tag: 0.9.0~115 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9f6612651cb4c01a196bd279c7f8af314026f2b7;p=redmine.git Cleaning workflow edit view. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3147 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/views/workflows/edit.rhtml b/app/views/workflows/edit.rhtml index 134dfb3e7..399825de2 100644 --- a/app/views/workflows/edit.rhtml +++ b/app/views/workflows/edit.rhtml @@ -7,52 +7,46 @@

<%=l(:text_workflow_edit)%>:

<% form_tag({}, :method => 'get') do %> -

- - - - -<%= submit_tag l(:button_edit), :name => nil %> +

+ + <%= select_tag 'role_id', options_from_collection_for_select(@roles, "id", "name", @role && @role.id) %> + + + <%= select_tag 'tracker_id', options_from_collection_for_select(@trackers, "id", "name", @tracker && @tracker.id) %> + + <%= submit_tag l(:button_edit), :name => nil %>

<% end %> - - -<% unless @tracker.nil? or @role.nil? or @statuses.empty? %> + +<% 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 %> - - + + - - <% for new_status in @statuses %> + + <% for new_status in @statuses %> - <% end %> + <% end %> <% for old_status in @statuses %> - "> + "> <% new_status_ids_allowed = old_status.find_new_statuses_allowed_to([@role], @tracker).collect(&:id) -%> <% for new_status in @statuses -%> - + <% end -%> - + <% end %>
<%=l(:label_current_status)%><%=l(:label_new_statuses_allowed)%><%=l(:label_current_status)%><%=l(:label_new_statuses_allowed)%>
<%= new_status.name %>
<%= old_status.name %> - /> - + <%= check_box_tag "issue_status[#{ old_status.id }][]", new_status.id, new_status_ids_allowed.include?(new_status.id) %> +
@@ -60,7 +54,6 @@ <%= submit_tag l(:button_save) %> <% end %> - <% end %> <% html_title(l(:label_workflow)) -%>