<%= t('page.search_resource', :model => t('page.resource')) -%>

<%= render 'manifestations/title', :manifestation => @manifestation if @manifestation -%> <% case %> <% when @index_agent[:creator] %> <%= render 'index_form_creator' %> <% when @index_agent[:contributor] %> <%= render 'index_form_contributor' %> <% when @index_agent[:publisher] %> <%= render 'index_form_publisher' %> <% when @manifestation %> <%= render 'index_form_manifestation' %> <% when @item %> <%= render 'index_form_item' %> <% when @parent %> <%= render 'index_form_parent' %> <% else %> <%= render 'index_form' %> <% end %> <%= set_focus_on_search_form %> <% if @parent %> <%= render 'show_parent' %> <% end %> <%- if @manifestations.total_count > 0 -%>

<%= t('page.number_of_search_results', :count => @count[:query_result], :numdocs => Manifestation.search.total, :seconds => sprintf("%.3f", @seconds)) -%> <%- if @count[:query_result] > Setting.max_number_of_results -%>
<%= t('page.limit_exceeded', :count => Setting.max_number_of_results) -%> <%- end -%>

<%= t('page.sort_by') -%>: <%- if params[:sort_by].blank? -%> <%= t('manifestation.date_of_acquisition') -%> <%- else -%> <%= link_to t('manifestation.date_of_acquisition'), url_for(params.merge(:sort_by => nil, :only_path => true)) -%> <%- end -%> <%- if params[:sort_by] == 'pub_date' -%> <%= t('activerecord.attributes.manifestation.date_of_publication') -%> <%- else -%> <%= link_to t('activerecord.attributes.manifestation.date_of_publication'), url_for(params.merge(:sort_by => 'pub_date', :only_path => true)) -%> <%- end -%> <%- if params[:sort_by] == 'title' -%> <%= t('page.title') -%> <%- else -%> <%= link_to t('page.title'), url_for(params.merge(:sort_by => 'title', :only_path => true)) -%> <%- end -%>

<%= render @manifestations %>
<%= paginate(@manifestations) -%>
<%- else -%> <%= render 'manifestations/not_found' -%> <%- end -%>
<% if @manifestation_ids and @search_query %> <%= render 'session_ids' %> <% end %>