Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Use configured class instead of hard-coded #6717

Merged
merged 2 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/presenters/hyrax/pcdm_member_presenter_factory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ def work_presenters
def presenter_for(document:, ability:)
case document['has_model_ssim'].first
when *Hyrax::ModelRegistry.file_set_rdf_representations
Hyrax::FileSetPresenter.new(document, ability)
file_presenter_class.new(document, ability)
else
Hyrax::WorkShowPresenter.new(document, ability)
work_presenter_class.new(document, ability)
end
end

Expand Down
4 changes: 2 additions & 2 deletions app/presenters/hyrax/work_show_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ def download_url

# @return [Boolean] render a IIIF viewer
def iiif_viewer?
representative_id.present? &&
Hyrax.config.iiif_image_server? &&
representative_id.present? &&
representative_presenter.present? &&
representative_presenter.image? &&
Hyrax.config.iiif_image_server? &&
members_include_viewable_image?
end

Expand Down