Skip to content

Commit

Permalink
πŸ› Sort by: Published Date (#814)
Browse files Browse the repository at this point in the history
# Story

The "Sort by Published Date" (both ascending and descending) feature in
the catalog search and in collections does not properly sort based on
the "Publication date" metadata field.

Ref:
- #185

# Expected Behavior Before Changes

Title, author, and publication date sort fields did not sort properly on
the catalog search results page or the collection show page.

# Expected Behavior After Changes

The user is able to sort by title, author, and publication date on the
catalog search results page as well as the collection show page.

# Screenshots / Video


https://github.com/user-attachments/assets/23ca2643-f0f4-498f-91b3-2ccc2b5e9714

# Notes

This updated required an update of the submodule as well as reindexing
local works and collections.
  • Loading branch information
sjproctor authored Sep 23, 2024
2 parents 8b9a9e0 + 55a6c6f commit f8ad7ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/controllers/catalog_controller_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ def self.uploaded_field
# TODO: replace CatalogController.creator_field to return 'creator_ssi'
config.add_sort_field "creator_ssi asc", label: "Author"
# TODO: replace CatalogController.created_field to return 'created_ssi'
config.add_sort_field "created_ssi asc", label: "Published Date (Ascending)"
config.add_sort_field "created_ssi desc", label: "Published Date (Descending)"
config.add_sort_field "#{CatalogController.created_field} asc", label: "Published Date (Ascending)"
config.add_sort_field "#{CatalogController.created_field} desc", label: "Published Date (Descending)"
config.add_sort_field "#{CatalogController.modified_field} asc", label: "Upload Date (Ascending)"
config.add_sort_field "#{CatalogController.modified_field} desc", label: "Upload Date (Descending)"
end

0 comments on commit f8ad7ff

Please sign in to comment.