<%= t('page.listing', model: t('activerecord.models.search_history')) -%>

<% if current_user.try(:has_role?, 'Librarian') %> <%- if params[:mode] == 'not_found' -%> <%= reverse_tag_cloud(SearchHistory.not_found_query(2, 6.month.ago)) -%>

<%= link_to t('search_history.all_history'), search_histories_path -%>

<%- else -%>

<%= link_to t('search_history.failed_search'), search_histories_path(mode: 'not_found') -%>

<%- end -%> <% end %> <%- unless params[:mode] == 'not_found' -%> <%- end -%> <%- @search_histories.each_with_index do |search_history, i| -%> "> <%- unless params[:mode] == 'not_found' -%> <%- end -%> <%- end -%>
<%= t('activerecord.attributes.search_history.query') -%> <%= t('activerecord.attributes.search_history.number_of_records') -%><%= t('activerecord.attributes.search_history.start_record') -%><%= t('search_history.searched_at') -%>
<%= link_to h(search_history.query), manifestations_path(:query => search_history.query) -%> <%= search_history.number_of_records -%><%= search_history.start_record -%><%= l(search_history.created_at) -%> <%- if policy(search_history).show? -%> <%= link_to t('page.show'), search_history -%> <% end %> <%- if policy(search_history).destroy? -%> <%= link_to t('page.destroy'), search_history, data: {confirm: t('page.are_you_sure')}, method: :delete -%> <%- end -%>
<%= paginate(@search_histories) -%>