diff --git a/app/views/catalog/_document_list.html.erb b/app/views/catalog/_document_list.html.erb
new file mode 100644
index 000000000..0879a83b3
--- /dev/null
+++ b/app/views/catalog/_document_list.html.erb
@@ -0,0 +1,8 @@
+<% # Override to conditionally add 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) %>
+
class="al-document-listings documents-<%= view_config&.key || 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