- @page_title = t('workarea.admin.searches.show.title') .view.view--mixed-results .view__header .grid.grid--middle.grid--center .grid__cell.grid__cell--50 .view__heading = link_to "↑ #{t('workarea.admin.searches.show.dashboard_link')}", root_path %h1 - if params[:q].blank? = t('workarea.admin.searches.show.all_searches') - else = t('workarea.admin.searches.show.results_for', params: "#{params[:q]}" ) - if @search.results.blank? %p.heading.heading--2.align-center= t('workarea.admin.searches.show.no_results') %p.heading.heading--4.align-center= t('workarea.admin.searches.show.less_specific') .view__container .browsing-controls.browsing-controls--with-divider.browsing-controls--center{ class: ('browsing-controls--filters-displayed' unless @search.toggle_facets?) } = form_tag search_path, method: 'get', class: 'browsing-controls__form' do = facet_hidden_inputs(@search.facets) .browsing-controls__sort .property.property--inline = label_tag 'sort', t('workarea.admin.searches.show.sort_by'), class: 'property__name' = select_tag :sort, options_for_select(@search.sorts, selected: @search.sort), data: { form_submitting_control: '' } .browsing-controls__search .search-form = text_field_tag :q, params[:q], class: 'search-form__input', id: 'search_again', title: t('workarea.admin.search.keywords'), placeholder: t('workarea.admin.search.keywords') = submit_tag 'search_again', class: 'search-form__button' - if @search.facets.present? - @search.facets.each do |facet| = render "workarea/admin/facets/#{facet.type}", facet: facet - if @search.toggle_facets? .browsing-controls__toggle-filters %button.text-button{ type: 'button', data: { toggle_filters: '' } } = t('workarea.admin.searches.show.show_filters') = render 'workarea/admin/facets/applied', search: @search, reset_path: search_path %p.browsing-controls__count= pluralize(@search.results.total, 'result') - if @search.results.present? - if @search.results.any? .grid.grid--auto.grid--flush.grid--center - @search.results.each do |result| .grid__cell= render_summary_for(result) - if @search.results.total_pages > 1 = render 'workarea/admin/shared/pagination', collection: @search.results