Cleaning workflow edit view.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3147 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2009-12-09 13:30:54 +00:00
parent 1c3722b5cb
commit 9f6612651c
1 changed files with 19 additions and 26 deletions

View File

@ -7,22 +7,19 @@
<p><%=l(:text_workflow_edit)%>:</p> <p><%=l(:text_workflow_edit)%>:</p>
<% form_tag({}, :method => 'get') do %> <% form_tag({}, :method => 'get') do %>
<p><label for="role_id"><%=l(:label_role)%>:</label> <p>
<select name="role_id"> <label><%=l(:label_role)%>:</label>
<%= options_from_collection_for_select @roles, "id", "name", (@role.id unless @role.nil?) %> <%= select_tag 'role_id', options_from_collection_for_select(@roles, "id", "name", @role && @role.id) %>
</select>
<label for="tracker_id"><%=l(:label_tracker)%>:</label> <label><%=l(:label_tracker)%>:</label>
<select name="tracker_id"> <%= select_tag 'tracker_id', options_from_collection_for_select(@trackers, "id", "name", @tracker && @tracker.id) %>
<%= options_from_collection_for_select @trackers, "id", "name", (@tracker.id unless @tracker.nil?) %>
</select> <%= submit_tag l(:button_edit), :name => nil %>
<%= submit_tag l(:button_edit), :name => nil %>
</p> </p>
<% end %> <% end %>
<% if @tracker && @role && @statuses.any? %>
<% unless @tracker.nil? or @role.nil? or @statuses.empty? %>
<% form_tag({}, :id => 'workflow_form' ) do %> <% form_tag({}, :id => 'workflow_form' ) do %>
<%= hidden_field_tag 'tracker_id', @tracker.id %> <%= hidden_field_tag 'tracker_id', @tracker.id %>
<%= hidden_field_tag 'role_id', @role.id %> <%= hidden_field_tag 'role_id', @role.id %>
@ -46,10 +43,7 @@
<% new_status_ids_allowed = old_status.find_new_statuses_allowed_to([@role], @tracker).collect(&:id) -%> <% new_status_ids_allowed = old_status.find_new_statuses_allowed_to([@role], @tracker).collect(&:id) -%>
<% for new_status in @statuses -%> <% for new_status in @statuses -%>
<td align="center"> <td align="center">
<input type="checkbox" <%= check_box_tag "issue_status[#{ old_status.id }][]", new_status.id, new_status_ids_allowed.include?(new_status.id) %>
name="issue_status[<%= old_status.id %>][]"
value="<%= new_status.id %>"
<%= 'checked="checked"' if new_status_ids_allowed.include? new_status.id %> />
</td> </td>
<% end -%> <% end -%>
</tr> </tr>
@ -60,7 +54,6 @@
<%= submit_tag l(:button_save) %> <%= submit_tag l(:button_save) %>
<% end %> <% end %>
<% end %> <% end %>
<% html_title(l(:label_workflow)) -%> <% html_title(l(:label_workflow)) -%>