From c4a928abec6a1d8413c3579e4cda91fd85f1a964 Mon Sep 17 00:00:00 2001 From: GriffinJ Date: Thu, 21 Mar 2019 13:57:48 -0400 Subject: [PATCH] Using the Figgy URLs from the configuration --- app/helpers/application_helper.rb | 11 +++-------- app/models/solr_document.rb | 3 --- app/views/catalog/_universal_viewer_default.html.erb | 2 +- config/config.yml | 3 ++- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 6f71bd0a..77be58e3 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -70,22 +70,17 @@ def universal_viewer_url private - # Access the base URL for the UV installation - # @return [String] - def universal_viewer_url_base - "https://figgy-staging.princeton.edu" - end - # Generate the URL for the configuration for the UV # @return [String] def universal_viewer_config_url - "#{universal_viewer_url_base}/viewer/exhibit/config?manifest=#{@document.manifest}" + url_base = Pomegranate.config["universal_viewer_config_url"] + "#{url_base}?manifest=#{@document.manifest}" end # Generate the URL for the UV viewer # @return [String] def universal_viewer_instance_url - "#{universal_viewer_url_base}/uv/uv" + Pomegranate.config["universal_viewer_url"] end # Construct the object used to handle Universal Viewer installations diff --git a/app/models/solr_document.rb b/app/models/solr_document.rb index 4bf65c2b..29c2e920 100644 --- a/app/models/solr_document.rb +++ b/app/models/solr_document.rb @@ -54,8 +54,5 @@ def update(current_exhibit, new_attributes) def manifest values = fetch(Spotlight::Engine.config.iiif_manifest_field, nil) values.first - - # Using this for the purposes of debugging - "https://figgy-staging.princeton.edu/concern/scanned_resources/a88d4c51-34a0-4816-b232-0e2fbb43a01e/manifest" end end diff --git a/app/views/catalog/_universal_viewer_default.html.erb b/app/views/catalog/_universal_viewer_default.html.erb index ad2cad7b..fe2555fb 100644 --- a/app/views/catalog/_universal_viewer_default.html.erb +++ b/app/views/catalog/_universal_viewer_default.html.erb @@ -1,4 +1,4 @@ -
+
<%= link_to image_tag("iiif.png", class: "logo", alt: "IIIF Drag and Drop"), universal_viewer_url %>
diff --git a/config/config.yml b/config/config.yml index 8ffea464..5223dc15 100644 --- a/config/config.yml +++ b/config/config.yml @@ -1,12 +1,13 @@ defaults: &defaults all_collection_manifest_url: "https://figgy.princeton.edu/iiif/collections" + universal_viewer_url: "https://figgy.princeton.edu/uv/uv" + universal_viewer_config_url: "https://figgy.princeton.edu/viewer/exhibit/config" events: server: 'amqp://localhost:5672' exchange: 'plum_events' development: <<: *defaults - # all_collection_manifest_url: "http://localhost:3000/iiif/collections" test: <<: *defaults