- @title = t('workarea.storefront.searches.title') - content_for :head do %meta{ property: 'recent-view', content: recent_view_content(search: @search.query_string) } = append_partials('storefront.search_head', search: @search) - if @search.first_page? %link{ href: search_path(q: @search.query_string), rel: 'canonical' } %meta{ name: 'robots', content: 'noindex, follow' } - unless @search.last_page? %link{ href: url_for(q: @search.query_string, page: @search.next_page), rel: 'next' } - unless @search.first_page? %link{ href: url_for(q: @search.query_string, page: @search.prev_page), rel: 'prev' } %meta{ property: 'og:url', content: url_for } %meta{ property: 'og:title', content: page_title } %meta{ property: 'og:type', content: 'website' } %meta{ property: 'og:image', content: root_path + image_path('workarea/storefront/logo.png') } - content_for :breadcrumbs do %p.breadcrumbs__node-group %span.breadcrumbs__node{ itemprop: 'breadcrumb' } = link_to t('workarea.storefront.layouts.home'), root_path, rel: 'home' %span.breadcrumbs__node{ itemprop: 'breadcrumb' } %span= t('workarea.storefront.searches.title') %span.breadcrumbs__node{ itemprop: 'breadcrumb' } %span= @search.query_string .view{ data: { analytics: search_results_view_analytics_data(@search).to_json } } - if @search.customization_content_blocks_for('above_results').present? .search-query-content= render_content_blocks(@search.customization_content_blocks_for('above_results')) - if @search.multiple_result_types? %h1.visually-hidden= pluralize(@search.total, t('workarea.storefront.searches.content_result')) %ul.search-result-types - if @search.product_total > 0 %li= link_to pluralize(@search.product_total, t('workarea.storefront.searches.product_result')), search_path(q: @search.query_string, type: 'show') %li= pluralize(@search.content_total, t('workarea.storefront.searches.content_result')) - else %h1= pluralize(@search.total, t('workarea.storefront.searches.result')) - if @search.query_suggestions.any? .related-searches %p= t('workarea.storefront.searches.suggestions') %ul - @search.query_suggestions.each do |search| %li= link_to search, content_search_path(q: search) .grid.grid--auto.grid--middle .grid__cell = form_tag content_search_path, method: 'get' do = hidden_field_tag :q, @search.query_string .property.property--responsive = label_tag 'sort_top', nil, class: 'property__name' do %span.property__text= t('workarea.storefront.searches.sort_by') %span.value= select_tag :sort, options_for_select(@search.sorts, selected: @search.sort), id: 'sort_top', data: { form_submitting_control: '' } .hidden-if-js-enabled= button_tag t('workarea.storefront.searches.sort'), value: 'sort_content_top', class: 'button' = append_partials('storefront.search_browse_controls', search: @search) .pagination{ data: { pagination: pagination_data(@search.content) } } %ul - @search.content.each do |result| %li{ data: { pagination_item: '' } } = link_to result.name, send("#{result.resource_name}_path", result) %p= truncate(result.summary, length: 100) - if show_pagination?(@search.content) .pagination__button = link_to t('workarea.storefront.pagination.next_page'), pagination_path_for(page: @search.next_page), class: 'button button--large', data: { pagination_button: '' }