% content_for :header_tags do %> <% if defined? observe_field %> <%= javascript_include_tag('toggle_functions_prototype', :plugin => 'sidebar') %> <% else %> <%= javascript_include_tag('toggle_functions_jquery', :plugin => 'sidebar') %> <% end %> <% end %> <% if defined? remote_form_for %> <% form = remote_form_for(:sidebar, :url => { :controller => 'sidebar', :action => 'edit', :id => @project }, :html => { :id => 'sidebar-content-form', :class => 'tabular' }) do %> <%= render(:partial => 'sidebar/form', :locals => { :sidebar => @sidebar, :project => @project }) %>
<% end %> <% else %> <% form = form_for(:sidebar, :url => { :controller => 'sidebar', :action => 'edit', :id => @project }, :html => { :id => 'sidebar-content-form', :class => 'tabular' }, :remote => true) do %> <%= render(:partial => 'sidebar/form', :locals => { :sidebar => @sidebar, :project => @project }) %> <% end %> <% end %> <%= form if Rails::VERSION::MAJOR >= 3 %>