-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding IIIF drag-and-drop icon to item show pages
- Loading branch information
Showing
10 changed files
with
82 additions
and
12 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,8 @@ def robots | |
respond_to :text | ||
expires_in 6.hours, public: true | ||
end | ||
|
||
def viewers | ||
respond_to :html | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
<% manifest = document.fetch(Spotlight::Engine.config.iiif_manifest_field).first %> | ||
<div class="uv__overlay" onClick="style.pointerEvents='none'"></div> | ||
<div class="uv viewer" data-config="/uv_config.json" data-uri="<%= document.fetch(Spotlight::Engine.config.iiif_manifest_field).first %>"></div> | ||
<div class="uv viewer" data-config="/uv_config.json" data-uri="<%= manifest %>"></div> | ||
<%= PulUvRails::UniversalViewer.script_tag %> | ||
<%= link_to image_tag("iiif.png", class: "logo", alt: "IIIF Drag and Drop"), | ||
viewers_page_path(manifest: manifest, format: :html) %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<% @page_title = "Viewers" %> | ||
<div class="container-fluid"> | ||
<div class="col-xs-12 col-md-10"> | ||
<h2>IIIF and Digital Object Viewers</h2> | ||
<p>Digital PUL uses <a href="https://iiif.io/">IIIF</a> (International Image Interoperability Framework) | ||
to share our digital objects. This allows our content to viewed with several different interoperable | ||
viewers, including <a href="http://projectmirador.org/">Mirador</a> and | ||
<a href="https://universalviewer.io/">Universal Viewer</a>.</p> | ||
</div> | ||
|
||
<div class="col-xs-12 col-md-10"> | ||
<h2>Drag and Drop</h2> | ||
<p>When you see the <%= link_to image_tag("iiif.png", alt: "IIIF"), request_url %> icon, you can drag the | ||
icon into a compatible IIIF viewer to load the object in that viewer. For example, you can open the | ||
<a href="http://projectmirador.org/demo/">Mirador Viewer</a> in another window, and drag the IIIF icon | ||
from Digital PUL (or many other IIIF-enabled sites) to load objects and compare them side-by-side.</p> | ||
|
||
<p>Sites that support IIIF drag and drop include | ||
<a href="http://digital.bodleian.ox.ac.uk/inquire/Discover/Search/#/?p=c+,t+ox%5C:collection:Oriental*,rsrs+0,rsps+10,fa+,so+ox%3Asort%5Easc,scids+,pid+,vi+">Digital Bodleian</a>, | ||
<a href="http://www.e-codices.unifr.ch/en/searchresult/list/one/kba/0016-1">e-codices</a>, | ||
<a href="http://www.getty.edu/art/collection/objects/826/vincent-van-gogh-irises-dutch-1889/">The J. Paul Getty Museum</a>, | ||
<a href="https://searchworks.stanford.edu/catalog?f%5Biiif_resources%5D%5B%5D=available">Stanford SearchWorks</a>, and | ||
<a href="http://collections.britishart.yale.edu/vufind/Record/1665373">Yale Center for British Art</a>. | ||
</p> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.describe "pages/viewers.html.erb" do | ||
describe "iiif drag and drop" do | ||
let(:request_url) { "http://example.com/viewers?manifest=abc" } | ||
|
||
before do | ||
allow(view).to receive(:request_url).and_return(request_url) | ||
render | ||
end | ||
it "includes a iiif manifest link" do | ||
expect(response).to have_link("IIIF", href: request_url) | ||
end | ||
end | ||
end |