Skip to content

Commit

Permalink
Merge pull request #127 from scientist-softserv/i76-default-collectio…
Browse files Browse the repository at this point in the history
…n-img-followup

🧹 Customize default collection image
  • Loading branch information
ShanaLMoore authored Aug 30, 2024
2 parents 5411178 + 009c4eb commit 7cadd74
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Binary file added app/assets/images/default-collection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions app/services/adl/thumbnail_path_service_decorator.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

# OVERRIDE Hyrax v5.0.0rc2 + Hyku v6.0 - to set custom collection thumbnail default

module Adl
module ThumbnailPathServiceDecorator
def default_collection_image
Site.instance.default_collection_image&.url || ActionController::Base.helpers.image_path('default-collection.png')
end
end
end

Hyrax::ThumbnailPathServiceDecorator.prepend(Adl::ThumbnailPathServiceDecorator)

0 comments on commit 7cadd74

Please sign in to comment.