Skip to content

Commit

Permalink
Using the Figgy URLs from the configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgriffiniii committed Mar 21, 2019
1 parent 99c4b03 commit c4a928a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
11 changes: 3 additions & 8 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions app/models/solr_document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion app/views/catalog/_universal_viewer_default.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="uv__overlay">
<div class="uv__overlay" onClick="style.pointerEvents='none'">
<iframe allowfullscreen="true" src="<%= universal_viewer_url %>"></iframe>
<%= link_to image_tag("iiif.png", class: "logo", alt: "IIIF Drag and Drop"), universal_viewer_url %>
</div>
3 changes: 2 additions & 1 deletion config/config.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit c4a928a

Please sign in to comment.