- @page_title = t('workarea.admin.content_pages.index.page_title') .view .view__header .grid.grid--middle.grid--center .grid__cell.grid__cell--50 .view__heading = link_to "↑ #{t('workarea.admin.content_pages.index.dashboard_link')}", store_dashboards_path, class: 'view__dashboard-button' %h1.heading--no-margin= t('workarea.admin.content_pages.index.title') %p= t('workarea.admin.content_pages.index.description') .view__container .browsing-controls.browsing-controls--with-divider.browsing-controls--center{ class: ('browsing-controls--filters-displayed' unless @search.toggle_facets?) } = form_tag content_pages_path, method: 'get', id: 'page_search_form', class: 'browsing-controls__form' do = facet_hidden_inputs(@search.facets) .browsing-controls__sort .property.property--inline = label_tag 'sort', t('workarea.admin.search.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_products', title: t('workarea.admin.search.keywords'), placeholder: t('workarea.admin.search.keywords') = submit_tag 'search_pages', class: 'search-form__button' = render 'workarea/admin/shared/creation_date', search: @search, form_path: content_pages_path - 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.search.show_filters') = render 'workarea/admin/facets/applied', search: @search, reset_path: content_pages_path %p.browsing-controls__count{ data: { browsing_controls_count: @search.total } } = t('workarea.admin.content_pages.pluralize', count: @search.total) - if @search.results.any? %table.index-table %thead %tr %th.index-table__control-cell .checkbox = check_box_tag 'select_all', nil, false, id: 'select_all', class: 'checkbox__input', data: { bulk_action_select_all: '' } = label_tag 'select_all', t('workarea.admin.bulk_actions.select_all'), class: 'checkbox__label' %th= t('workarea.admin.fields.name') %th= t('workarea.admin.fields.breadcrumbs') %th= t('workarea.admin.fields.template') %th= t('workarea.admin.fields.updated_at') %tbody - @search.results.each do |result| %tr.index-table__row{ class: ('index-table__row--inactive' unless result.active) } %td.index-table__control-cell .checkbox = check_box_tag 'global_id', result.to_gid_param, false, class: 'checkbox__input', id: dom_id(result), data: { bulk_action_item: '' } = label_tag dom_id(result), '', class: 'checkbox__label', title: t('workarea.admin.bulk_actions.add_summary_button') %td = link_to result.name, content_page_path(result) = upcoming_changesets_icon_for(result) = comments_icon_for(result) %td - if result.breadcrumbs.blank? %em= t('workarea.admin.fields.no_taxonomy') - else = result.breadcrumbs.join(' > ') %td= result.template.capitalize %td= local_time_ago(result.updated_at) - if @search.results.total_pages > 1 = render 'workarea/admin/shared/pagination', collection: @search.results .workflow-bar .grid .grid__cell.grid__cell--50 = render 'workarea/admin/shared/bulk_actions', klass: Workarea::Content::Page, search: @search .grid__cell.grid__cell--50.align-right = link_to t('workarea.admin.content_pages.index.add_new_page'), create_content_pages_path, id: 'add_page', class: 'workflow-bar__button workflow-bar__button--create'