Use controller instead of helper variable

pull/287/head
Hagen Schink 11 years ago
parent a3b0124091
commit 4a633c1743
  1. 6
      app/views/types/_form.html.erb

@ -35,20 +35,20 @@ See doc/COPYRIGHT.rdoc for more details.
<%= hidden_field_tag 'type[custom_field_ids][]', '' %>
<% end %>
<% if @type.new_record? && @types.any? %>
<% if controller.type.new_record? && @types.any? %>
<p><label for="copy_workflow_from"><%= l(:label_copy_workflow_from) %></label>
<%= select_tag(:copy_workflow_from, content_tag("option") + options_from_collection_for_select(@types, :id, :name)) %></p>
<% end %>
<!--[eoform:type]-->
</div>
<%= submit_tag l(@type.new_record? ? :button_create : :button_save) %>
<%= submit_tag l(controller.type.new_record? ? :button_create : :button_save) %>
</div>
<div class="splitcontentright">
<% if @projects.any? %>
<fieldset class="box" id="type_project_ids"><legend><%= l(:label_project_plural) %></legend>
<%= project_nested_ul(@projects) do |p|
content_tag('label', check_box_tag('type[project_ids][]', p.id, @type.projects.include?(p), :id => nil) + ' ' + h(p))
content_tag('label', check_box_tag('type[project_ids][]', p.id, controller.type.projects.include?(p), :id => nil) + ' ' + h(p))
end %>
<%= hidden_field_tag('type[project_ids][]', '', :id => nil) %>
<p><%= check_all_links 'type_project_ids' %></p>

Loading…
Cancel
Save