diff --git a/app/presenters/hyrax/work_show_presenter.rb b/app/presenters/hyrax/work_show_presenter.rb
index 558ac78d5b..de02ef558e 100644
--- a/app/presenters/hyrax/work_show_presenter.rb
+++ b/app/presenters/hyrax/work_show_presenter.rb
@@ -55,8 +55,8 @@ def download_url
Hyrax::Engine.routes.url_helpers.download_url(representative_presenter, host: request.host)
end
- # @return [Boolean] render the UniversalViewer
- def universal_viewer?
+ # @return [Boolean] render a IIIF viewer
+ def iiif_viewer?
representative_id.present? &&
representative_presenter.present? &&
representative_presenter.image? &&
@@ -64,6 +64,9 @@ def universal_viewer?
members_include_viewable_image?
end
+ alias universal_viewer? iiif_viewer?
+ deprecation_deprecate universal_viewer?: "use iiif_viewer? instead"
+
# Override this method to declare a different iiif viewer for your work type
# @return [Symbol] the name of the IIIF viewer partial to render
def iiif_viewer
diff --git a/app/views/hyrax/base/show.html.erb b/app/views/hyrax/base/show.html.erb
index 8bc6b19c06..1af6cdebd2 100644
--- a/app/views/hyrax/base/show.html.erb
+++ b/app/views/hyrax/base/show.html.erb
@@ -15,13 +15,13 @@
<%= render 'workflow_actions_widget', presenter: @presenter %>
- <% if @presenter.universal_viewer? %>
+ <% if @presenter.iiif_viewer? %>
<%= render 'representative_media', presenter: @presenter, viewer: true %>
<% end %>
- <%= render 'representative_media', presenter: @presenter, viewer: false unless @presenter.universal_viewer? %>
+ <%= render 'representative_media', presenter: @presenter, viewer: false unless @presenter.iiif_viewer? %>
<%= render 'citations', presenter: @presenter %>
<%= render 'social_media' %>
diff --git a/lib/generators/hyrax/templates/config/initializers/hyrax.rb b/lib/generators/hyrax/templates/config/initializers/hyrax.rb
index 73cefeb676..5c53040664 100644
--- a/lib/generators/hyrax/templates/config/initializers/hyrax.rb
+++ b/lib/generators/hyrax/templates/config/initializers/hyrax.rb
@@ -121,7 +121,7 @@
# config.show_work_item_rows = 10
# Enable IIIF image service. This is required to use the
- # UniversalViewer-ified show page
+ # IIIF viewer enabled show page
#
# If you have run the riiif generator, an embedded riiif service
# will be used to deliver images via IIIF. If you have not, you will
diff --git a/lib/hyrax/configuration.rb b/lib/hyrax/configuration.rb
index 8886d198a7..a486b97723 100644
--- a/lib/hyrax/configuration.rb
+++ b/lib/hyrax/configuration.rb
@@ -367,7 +367,7 @@ def cache_path
end
# Enable IIIF image service. This is required to use the
- # UniversalViewer-enabled show page
+ # IIIF viewer enabled show page
#
# If you have run the hyrax:riiif generator, an embedded riiif service
# will be used to deliver images via IIIF. If you have not, you will
diff --git a/spec/presenters/hyrax/work_show_presenter_spec.rb b/spec/presenters/hyrax/work_show_presenter_spec.rb
index c4b01a967c..199c29a52a 100644
--- a/spec/presenters/hyrax/work_show_presenter_spec.rb
+++ b/spec/presenters/hyrax/work_show_presenter_spec.rb
@@ -45,7 +45,7 @@
it { is_expected.to eq 'http://example.org/concern/generic_works/888888/manifest' }
end
- describe '#universal_viewer?' do
+ describe '#iiif_viewer?' do
let(:id_present) { false }
let(:representative_presenter) { double('representative', present?: false) }
let(:image_boolean) { false }
@@ -64,7 +64,7 @@
allow(Hyrax.config).to receive(:iiif_image_server?).and_return(iiif_enabled)
end
- subject { presenter.universal_viewer? }
+ subject { presenter.iiif_viewer? }
context 'with no representative_id' do
it { is_expected.to be false }
diff --git a/spec/views/hyrax/base/show.html.erb_spec.rb b/spec/views/hyrax/base/show.html.erb_spec.rb
index 0474892966..03afcf8ce4 100644
--- a/spec/views/hyrax/base/show.html.erb_spec.rb
+++ b/spec/views/hyrax/base/show.html.erb_spec.rb
@@ -69,9 +69,9 @@
expect(page).to have_content 'Foobar'
end
- describe 'UniversalViewer integration' do
+ describe 'IIIF viewer integration' do
before do
- allow(presenter).to receive(:universal_viewer?).and_return(viewer_enabled)
+ allow(presenter).to receive(:iiif_viewer?).and_return(viewer_enabled)
render template: 'hyrax/base/show.html.erb'
end