% orphans ||= [] %> <% files ||= [] %> <% content_for(:javascript) do %> <% end %>
<%= link_to_unless params[:std] == '1', "One at a time", url_for(:controller => controller_name, :action => action_name, :std => 1), :class => 'fake_button' %> <%= link_to_if params[:std] == '1', "Several at once", url_for(:controller => controller_name, :action => action_name, :std => 0), :class => 'fake_button' %>
<% if @file_containers.present? %><%= render({ :partial => 'file_attachments/file_container_select', :locals => { :selected => "#{params[:attachable_type]}_#{params[:attachable_id]}" } }) %>
<% elsif instance_variable_defined?("@#{controller_name.singularize}") %> <% instance = instance_variable_get("@#{controller_name.singularize}") %> <%= hidden_field_tag 'file_attachment[file_container]', "#{instance.class}_#{instance.id}", { :id => 'file_container_select' } %> <% else %> <%= hidden_field_tag 'file_attachment[file_container]', nil, { :id => 'file_container_select' } %> <% end %> <% if params[:std] && params[:std] == '1' %>