hyrax-iiif_av 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,40 +0,0 @@
1
- # frozen_string_literal: true
2
- # Copyright 2011-2018, The Trustees of Indiana University and Northwestern
3
- # University. Additional copyright may be held by others, as reflected in
4
- # the commit history.
5
- #
6
- # Licensed under the Apache License, Version 2.0 (the "License");
7
- # you may not use this file except in compliance with the License.
8
- # You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing, software
13
- # distributed under the License is distributed on an "AS IS" BASIS,
14
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- # See the License for the specific language governing permissions and
16
- # limitations under the License.
17
- # --- END LICENSE_HEADER BLOCK ---
18
-
19
- module Hyrax
20
- module IiifAv
21
- module IiifAvHelper
22
- def iiif_viewer_display(presenter, locals = {})
23
- render iiif_viewer_display_partial(presenter),
24
- locals.merge(presenter: presenter)
25
- end
26
-
27
- def iiif_viewer_display_partial(work_presenter)
28
- 'hyrax/base/iiif_viewers/' + iiif_viewer_for_work(work_presenter).to_s
29
- end
30
-
31
- def iiif_viewer_for_work(work_presenter)
32
- if work_presenter.respond_to? :iiif_viewer
33
- work_presenter.iiif_viewer
34
- else
35
- :universal_viewer
36
- end
37
- end
38
- end
39
- end
40
- end
@@ -1,27 +0,0 @@
1
- <%#
2
- Copyright 2011-2018, The Trustees of Indiana University and Northwestern
3
- University. Additional copyright may be held by others, as reflected in
4
- the commit history.
5
-
6
- Licensed under the Apache License, Version 2.0 (the "License");
7
- you may not use this file except in compliance with the License.
8
- You may obtain a copy of the License at
9
-
10
- http://www.apache.org/licenses/LICENSE-2.0
11
-
12
- Unless required by applicable law or agreed to in writing, software
13
- distributed under the License is distributed on an "AS IS" BASIS,
14
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- See the License for the specific language governing permissions and
16
- limitations under the License.
17
- --- END LICENSE_HEADER BLOCK ---
18
- %>
19
- <% if presenter.representative_id.present? && presenter.representative_presenter.present? %>
20
- <% if defined?(viewer) && viewer %>
21
- <%= iiif_viewer_display presenter %>
22
- <% else %>
23
- <%= media_display presenter.representative_presenter %>
24
- <% end %>
25
- <% else %>
26
- <%= image_tag 'default.png', class: "canonical-image" %>
27
- <% end %>
@@ -1,4 +0,0 @@
1
- <%= PulUvRails::UniversalViewer.script_tag %>
2
- <div class="viewer-wrapper">
3
- <div class="uv viewer" data-uri="<%= main_app.polymorphic_path [main_app, :manifest, presenter], { locale: nil } %>"></div>
4
- </div>