diff --git a/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss b/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss index a860f1e53..073d8dc59 100644 --- a/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss +++ b/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss @@ -23,7 +23,7 @@ $hierarchy-view-collapse-icon: url("data:image/svg+xml, <% end %> diff --git a/app/components/arclight/group_component.html.erb b/app/components/arclight/group_component.html.erb index 8d96e6d04..47fb0fc4c 100644 --- a/app/components/arclight/group_component.html.erb +++ b/app/components/arclight/group_component.html.erb @@ -8,7 +8,9 @@ <% end %>

<%= helpers.link_to_document document %>

<%= tag.span(document.extent, class: 'al-document-extent badge') if document.extent %> - <%= render Arclight::IndexMetadataFieldComponent.with_collection(presenter.field_presenters.select { |field| !compact? || field.field_config.compact }) %> +
+ <%= render Arclight::IndexMetadataFieldComponent.with_collection(presenter.field_presenters.select { |field| !compact? || field.field_config.compact }) %> +
diff --git a/app/components/arclight/index_metadata_field_component.html.erb b/app/components/arclight/index_metadata_field_component.html.erb index 727904f2d..a4ffbae49 100644 --- a/app/components/arclight/index_metadata_field_component.html.erb +++ b/app/components/arclight/index_metadata_field_component.html.erb @@ -4,8 +4,7 @@ <%= tag.dd(class: @classes + ['truncator'], data: { controller: 'arclight-truncate' }) do %> <%= tag.div @field.render, class: 'content', data: { arclight_truncate_target: 'content' } %> <%= button_tag(type: :button, class: 'btn btn-sm btn-link px-0', - data: { action: 'click->arclight-truncate#trigger' }, - aria: { hidden: true }) do %> + data: { action: 'click->arclight-truncate#trigger' }) do %> <%= tag.span t('arclight.truncation.view_more'), class: 'view-more' %> <%= tag.span t('arclight.truncation.view_less'), class: 'view-less' %> <%= tag.span(class: 'icon') %> diff --git a/app/components/arclight/search_result_breadcrumbs_component.html.erb b/app/components/arclight/search_result_breadcrumbs_component.html.erb index 1bf2a6384..4b3240de7 100644 --- a/app/components/arclight/search_result_breadcrumbs_component.html.erb +++ b/app/components/arclight/search_result_breadcrumbs_component.html.erb @@ -1,3 +1,6 @@ - +
Collection Context
+
+ +
diff --git a/app/views/catalog/_document_list.html.erb b/app/views/catalog/_document_list.html.erb new file mode 100644 index 000000000..69486b2fd --- /dev/null +++ b/app/views/catalog/_document_list.html.erb @@ -0,0 +1,8 @@ +<% # Override to remove id="documents" on div. When documents are grouped it causes duplicate id issues %> +<% # https://github.com/projectblacklight/blacklight/blob/v8.1.0/app/views/catalog/_document_list.html.erb %> +<% # container for all documents in index list view -%> +<% view_config = local_assigns[:view_config] || blacklight_config&.view_config(document_index_view_type) %> +
+ <% document_presenters = documents.map { |doc| document_presenter(doc) } -%> + <%= render view_config.document_component.with_collection(document_presenters, partials: view_config.partials, counter_offset: @response&.start || 0) %> +
\ No newline at end of file diff --git a/app/views/catalog/_group.html.erb b/app/views/catalog/_group.html.erb index 06c4f2eb7..148692233 100644 --- a/app/views/catalog/_group.html.erb +++ b/app/views/catalog/_group.html.erb @@ -1,4 +1,4 @@ <% # container for all groups in index view -%> -
+
<%= render (blacklight_config.view_config(document_index_view_type).group_component || Arclight::GroupComponent).with_collection(@response.groups) %>
diff --git a/spec/features/collection_filtering_spec.rb b/spec/features/collection_filtering_spec.rb index f6c6c5f12..1ce6c5ba2 100644 --- a/spec/features/collection_filtering_spec.rb +++ b/spec/features/collection_filtering_spec.rb @@ -21,7 +21,7 @@ click_button 'Search' - expect(page).to have_css('#documents .document', count: 10) # has results + expect(page).to have_css('.al-document-listings .document', count: 10) # has results expect(page).not_to have_css('.constraint-value .filter-value', text: 'Alpha Omega Alpha Archives, 1894-1992') end end @@ -52,7 +52,7 @@ click_button 'Search' expect(page).to have_css('.constraint-value .filter-value', text: 'Alpha Omega Alpha Archives, 1894-1992') - expect(page).to have_css('#documents .document', count: 1) # has results + expect(page).to have_css('.al-document-listings .document', count: 1) # has results end it 'allows the user to choose to search all collections' do @@ -63,7 +63,7 @@ click_button 'Search' expect(page).not_to have_css('.constraint-value .filter-value', text: 'Alpha Omega Alpha Archives, 1894-1992') - expect(page).to have_css('#documents .document', count: 10) # has results + expect(page).to have_css('.al-document-listings .document', count: 10) # has results end end end diff --git a/spec/features/collection_page_spec.rb b/spec/features/collection_page_spec.rb index 91c3ed16c..4b9f565f5 100644 --- a/spec/features/collection_page_spec.rb +++ b/spec/features/collection_page_spec.rb @@ -226,8 +226,8 @@ it 'clicking contents does not change the session results view context' do visit search_catalog_path q: '', search_field: 'all_fields' - expect(page).to have_css('#documents.documents-list') - expect(page).not_to have_css('#documents.documents-hierarchy') + expect(page).to have_css('.al-document-listings.documents-list') + expect(page).not_to have_css('.al-document-listings.documents-hierarchy') end end end