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

<%= notice %>

<%= 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] > @max_number_of_results %>
<%= t('page.limit_exceeded', count: @max_number_of_results) %> <%- end -%>

<%= form_for :manifestations, url: manifestations_path, html: {method: 'get'} do -%>

<%= select_tag 'per_page', options_for_select({ t('page.per_page', num: 10) => 10, t('page.per_page', num: 20) => 20, t('page.per_page', num: 50) => 50, t('page.per_page', num: 100) => 100, }, selected: params[:per_page]) %> <%= select_tag 'sort_by', options_for_select({ [t('page.sort_criteria.created_at'), t('page.sort_criteria.date_desc')].join(" : ") => 'created_at:desc', [t('page.sort_criteria.created_at'), t('page.sort_criteria.date_asc')].join(" : ") => 'created_at:asc', [t('activerecord.attributes.manifestation.pub_date'), t('page.sort_criteria.date_desc')].join(" : ") => 'pub_date:desc', [t('activerecord.attributes.manifestation.pub_date'), t('page.sort_criteria.date_asc')].join(" : ") => 'pub_date:asc', [t('page.score'), t('page.sort_criteria.score_desc')].join(" : ") => 'score:desc', [t('page.title'), t('page.sort_criteria.title_asc')].join(" : ") => 'title:asc', [t('page.title'), t('page.sort_criteria.title_desc')].join(" : ") => 'title:desc', }, selected: params[:sort_by] || 'created_at:desc') -%> <%= hidden_field_tag 'query', @query -%> <%= submit_tag t('page.show') -%>

<%- end -%>
<%= render @manifestations %>
<%= paginate(@manifestations) -%>
<% if defined?(EnjuBookmark) %>

<%= t('activerecord.models.tag') -%>

<%= image_tag 'spinner.gif', id: 'spinner_tag_cloud', style: 'padding-bottom: 15px; padding-left: 40px;' -%>
<% end %> <%- else -%> <%- if @parent -%>

<%= t('manifestation.record_not_added') %>

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