Skip to content

Commit

Permalink
Implementation of #1372. Added 'rendering' property and a new
Browse files Browse the repository at this point in the history
'manifest_extras' method to the manifest_enabled_work_show_presenter to
pass the rendering into iiif_manifest.
  • Loading branch information
Julie Allinson committed Sep 11, 2017
1 parent ba46d2f commit 6dae59f
Show file tree
Hide file tree
Showing 19 changed files with 276 additions and 89 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ end

gem 'blacklight', '~> 6.7'

gem 'hyrax', git: 'https://github.com/projecthydra-labs/hyrax.git', ref: '5bd285ed56fba95f4f414724fc00d5dcd657b3fe'
gem 'hyrax', git: 'https://github.com/samvera/hyrax.git'
gem 'rsolr', '~> 2.0'

gem 'devise'
Expand Down
147 changes: 73 additions & 74 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
GIT
remote: https://github.com/projecthydra-labs/hyrax.git
revision: 5bd285ed56fba95f4f414724fc00d5dcd657b3fe
ref: 5bd285ed56fba95f4f414724fc00d5dcd657b3fe
remote: https://github.com/samvera/hyrax.git
revision: d9bdb7086331f5bf6940fc8776490446efa25592
specs:
hyrax (2.0.0.alpha)
active-fedora (>= 11.3.1)
Expand Down Expand Up @@ -50,30 +49,30 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (5.1.2)
actionpack (= 5.1.2)
actioncable (5.1.3)
actionpack (= 5.1.3)
nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
actionmailer (5.1.2)
actionpack (= 5.1.2)
actionview (= 5.1.2)
activejob (= 5.1.2)
actionmailer (5.1.3)
actionpack (= 5.1.3)
actionview (= 5.1.3)
activejob (= 5.1.3)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.1.2)
actionview (= 5.1.2)
activesupport (= 5.1.2)
actionpack (5.1.3)
actionview (= 5.1.3)
activesupport (= 5.1.3)
rack (~> 2.0)
rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.1.2)
activesupport (= 5.1.2)
actionview (5.1.3)
activesupport (= 5.1.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
active-fedora (11.3.1)
active-fedora (11.4.0)
active-triples (~> 0.11.0)
activemodel (>= 4.2, < 6)
activesupport (>= 4.2.4, < 6)
Expand All @@ -98,18 +97,18 @@ GEM
active-fedora (>= 9.7, < 12)
noid (~> 0.9)
rails (>= 5.0.0, < 6)
activejob (5.1.2)
activesupport (= 5.1.2)
activejob (5.1.3)
activesupport (= 5.1.3)
globalid (>= 0.3.6)
activemodel (5.1.2)
activesupport (= 5.1.2)
activerecord (5.1.2)
activemodel (= 5.1.2)
activesupport (= 5.1.2)
activemodel (5.1.3)
activesupport (= 5.1.3)
activerecord (5.1.3)
activemodel (= 5.1.3)
activesupport (= 5.1.3)
arel (~> 8.0)
activerecord-import (0.19.0)
activerecord-import (0.19.1)
activerecord (>= 3.2)
activesupport (5.1.2)
activesupport (5.1.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
minitest (~> 5.1)
Expand All @@ -124,18 +123,18 @@ GEM
arel (8.0.0)
ast (2.3.0)
atomic (1.1.99)
autoprefixer-rails (7.1.1.2)
autoprefixer-rails (7.1.2.3)
execjs
awesome_nested_set (3.1.3)
activerecord (>= 4.0.0, < 5.2)
aws-sdk (2.10.3)
aws-sdk-resources (= 2.10.3)
aws-sdk-core (2.10.3)
aws-sdk (2.10.21)
aws-sdk-resources (= 2.10.21)
aws-sdk-core (2.10.21)
aws-sigv4 (~> 1.0)
jmespath (~> 1.0)
aws-sdk-resources (2.10.3)
aws-sdk-core (= 2.10.3)
aws-sigv4 (1.0.0)
aws-sdk-resources (2.10.21)
aws-sdk-core (= 2.10.21)
aws-sigv4 (1.0.1)
babel-source (5.8.35)
babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6)
Expand Down Expand Up @@ -166,7 +165,7 @@ GEM
autoprefixer-rails (>= 5.2.1)
sass (>= 3.3.4)
breadcrumbs_on_rails (3.0.1)
browse-everything (0.13.1)
browse-everything (0.14.0)
addressable (~> 2.5)
aws-sdk
bootstrap-sass
Expand Down Expand Up @@ -256,33 +255,33 @@ GEM
dry-container (~> 0.2, >= 0.2.6)
dry-core (~> 0.2)
dry-equalizer (~> 0.2)
dry-struct (0.3.0)
dry-struct (0.3.1)
dry-configurable (~> 0.1)
dry-core (~> 0.3)
dry-equalizer (~> 0.2)
dry-types (~> 0.9, >= 0.9.0)
ice_nine (~> 0.11)
dry-types (0.10.3)
dry-types (0.11.0)
concurrent-ruby (~> 1.0)
dry-configurable (~> 0.1)
dry-container (~> 0.3)
dry-core (~> 0.2, >= 0.2.1)
dry-equalizer (~> 0.2)
dry-logic (~> 0.4, >= 0.4.0)
inflecto (~> 0.0.0, >= 0.0.2)
dry-validation (0.10.7)
dry-validation (0.11.0)
concurrent-ruby (~> 1.0)
dry-configurable (~> 0.1, >= 0.1.3)
dry-core (~> 0.2, >= 0.2.1)
dry-equalizer (~> 0.2)
dry-logic (~> 0.4, >= 0.4.0)
dry-types (~> 0.9, >= 0.9.0)
dry-types (~> 0.11.0)
easy_translate (0.5.0)
json
thread
thread_safe
ebnf (1.1.0)
rdf (~> 2.0)
ebnf (1.1.1)
rdf (~> 2.2)
sxp (~> 1.0)
equivalent-xml (0.6.0)
nokogiri (>= 1.4.3)
Expand All @@ -294,7 +293,7 @@ GEM
factory_girl_rails (4.8.0)
factory_girl (~> 4.8.0)
railties (>= 3.0.0)
faraday (0.12.1)
faraday (0.12.2)
multipart-post (>= 1.2, < 3)
faraday-encoding (0.0.4)
faraday
Expand Down Expand Up @@ -322,15 +321,15 @@ GEM
google-api-client (>= 0.11.0, < 0.13.0)
googleauth (>= 0.5.0, < 1.0.0)
nokogiri (>= 1.5.3, < 2.0.0)
googleauth (0.5.1)
faraday (~> 0.9)
googleauth (0.5.3)
faraday (~> 0.12)
jwt (~> 1.4)
logging (~> 2.0)
memoist (~> 0.12)
multi_json (~> 1.11)
os (~> 0.9)
signet (~> 0.7)
haml (5.0.1)
haml (5.0.2)
temple (>= 0.8.0)
tilt
hamster (3.0.0)
Expand All @@ -345,7 +344,7 @@ GEM
mimemagic
multipart-post
http_logger (0.5.1)
httparty (0.15.5)
httparty (0.15.6)
multi_xml (>= 0.5.2)
httpclient (2.8.3)
hydra-access-controls (10.5.0)
Expand Down Expand Up @@ -387,7 +386,7 @@ GEM
hydra-file_characterization (~> 0.3, >= 0.3.3)
hydra-pcdm (>= 0.9)
om (~> 3.1)
i18n (0.8.4)
i18n (0.8.6)
i18n-debug (1.1.0)
i18n (< 1)
i18n-tasks (0.9.15)
Expand Down Expand Up @@ -427,7 +426,7 @@ GEM
jquery-ui-rails (5.0.5)
railties (>= 3.2.16)
json (2.1.0)
json-ld (2.1.4)
json-ld (2.1.5)
multi_json (~> 1.12)
rdf (~> 2.2)
json-schema (2.8.0)
Expand Down Expand Up @@ -514,9 +513,9 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mimemagic (0.3.2)
mini_magick (4.7.2)
mini_magick (4.8.0)
mini_portile2 (2.2.0)
minitest (5.10.2)
minitest (5.10.3)
mods (2.1.0)
iso-639
nokogiri
Expand Down Expand Up @@ -601,17 +600,17 @@ GEM
rack
rack-test (0.6.3)
rack (>= 1.0)
rails (5.1.2)
actioncable (= 5.1.2)
actionmailer (= 5.1.2)
actionpack (= 5.1.2)
actionview (= 5.1.2)
activejob (= 5.1.2)
activemodel (= 5.1.2)
activerecord (= 5.1.2)
activesupport (= 5.1.2)
bundler (>= 1.3.0, < 2.0)
railties (= 5.1.2)
rails (5.1.3)
actioncable (= 5.1.3)
actionmailer (= 5.1.3)
actionpack (= 5.1.3)
actionview (= 5.1.3)
activejob (= 5.1.3)
activemodel (= 5.1.3)
activerecord (= 5.1.3)
activesupport (= 5.1.3)
bundler (>= 1.3.0)
railties (= 5.1.3)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.2)
actionpack (~> 5.x, >= 5.0.1)
Expand All @@ -624,9 +623,9 @@ GEM
loofah (~> 2.0)
rails_autolink (1.1.6)
rails (> 3.1)
railties (5.1.2)
actionpack (= 5.1.2)
activesupport (= 5.1.2)
railties (5.1.3)
actionpack (= 5.1.3)
activesupport (= 5.1.3)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
Expand All @@ -636,7 +635,7 @@ GEM
rb-fsevent (0.9.8)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rdf (2.2.6)
rdf (2.2.7)
hamster (~> 3.0)
link_header (~> 0.0, >= 0.0.8)
rdf-aggregate-repo (2.2.0)
Expand All @@ -654,13 +653,13 @@ GEM
rdf (~> 2.0)
rdf-normalize (0.3.2)
rdf (~> 2.0)
rdf-rdfa (2.2.2)
rdf-rdfa (2.2.3)
haml (~> 5.0)
htmlentities (~> 4.3)
rdf (~> 2.2)
rdf-aggregate-repo (~> 2.2)
rdf-xsd (~> 2.1)
rdf-rdfxml (2.0.0)
rdf-rdfxml (2.2.0)
htmlentities (~> 4.3)
rdf (~> 2.0)
rdf-rdfa (~> 2.0)
Expand All @@ -685,7 +684,7 @@ GEM
rdf-turtle (2.2.0)
ebnf (~> 1.1)
rdf (~> 2.2)
rdf-vocab (2.2.2)
rdf-vocab (2.2.3)
rdf (~> 2.2)
rdf-xsd (2.2.0)
rdf (~> 2.1)
Expand All @@ -703,7 +702,7 @@ GEM
responders (2.4.0)
actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3)
retriable (3.0.2)
retriable (3.1.1)
riiif (1.4.4)
railties (>= 4.2, < 6)
rolify (5.1.0)
Expand Down Expand Up @@ -748,7 +747,7 @@ GEM
ruby_dep (1.5.0)
rubyzip (1.2.1)
safe_yaml (1.0.4)
sass (3.4.24)
sass (3.4.25)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
Expand Down Expand Up @@ -797,13 +796,13 @@ GEM
nokogiri
stomp
xml-simple
sparql (2.2.0)
sparql (2.2.1)
builder (~> 3.2)
ebnf (~> 1.1)
rdf (~> 2.1)
rdf-aggregate-repo (~> 2.0)
rdf (~> 2.2)
rdf-aggregate-repo (~> 2.2)
rdf-xsd (~> 2.1)
sparql-client (~> 2.0)
sparql-client (~> 2.1)
sxp (~> 1.0)
sparql-client (2.1.0)
net-http-persistent (~> 2.9)
Expand Down Expand Up @@ -834,9 +833,9 @@ GEM
thor (0.19.4)
thread (0.2.2)
thread_safe (0.3.6)
tilt (2.0.7)
tilt (2.0.8)
tins (1.14.0)
tinymce-rails (4.6.4)
tinymce-rails (4.6.5)
railties (>= 3.1.1)
turbolinks (5.0.1)
turbolinks-source (~> 5)
Expand Down Expand Up @@ -940,4 +939,4 @@ DEPENDENCIES
zk

BUNDLED WITH
1.15.1
1.15.3
6 changes: 5 additions & 1 deletion app/forms/hyrax/generic_work_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ module Hyrax
class GenericWorkForm < Hyrax::Forms::WorkForm
self.model_class = ::GenericWork
include HydraEditor::Form::Permissions
self.terms += [:resource_type]
self.terms += [:resource_type, :rendering_ids]

def secondary_terms
super - [:rendering_ids]
end
end
end
6 changes: 5 additions & 1 deletion app/forms/hyrax/image_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
module Hyrax
class ImageForm < Hyrax::Forms::WorkForm
self.model_class = ::Image
self.terms += [:resource_type, :extent]
self.terms += [:resource_type, :extent, :rendering_ids]

def secondary_terms
super - [:rendering_ids]
end
end
end
5 changes: 5 additions & 0 deletions app/indexers/file_set_indexer.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
class FileSetIndexer < Hyrax::FileSetIndexer
self.thumbnail_path_service = IIIFWorkThumbnailPathService
def generate_solr_document
super.tap do |solr_doc|
solr_doc['hasFormat_ssim'] = object.rendering_ids
end
end
end

0 comments on commit 6dae59f

Please sign in to comment.