Skip to content

Commit

Permalink
make iiif print off by default so we can mark it as an experimental f…
Browse files Browse the repository at this point in the history
…eature (#2041)
  • Loading branch information
orangewolf authored Nov 29, 2023
1 parent 2f36cee commit dcd78fa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions app/models/generic_work.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
class GenericWork < ActiveFedora::Base
include ::Hyrax::WorkBehavior
include ::Hyrax::BasicMetadata
include IiifPrint.model_configuration(
pdf_split_child_model: self
)
if ActiveModel::Type::Boolean.new.cast(ENV.fetch('HYKU_IIIF_PRINT', false))
include IiifPrint.model_configuration(
pdf_split_child_model: self
)
end

validates :title, presence: { message: 'Your work must have a title.' }

Expand Down
8 changes: 5 additions & 3 deletions app/models/image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
# `rails generate hyrax:work Image`
class Image < ActiveFedora::Base
include ::Hyrax::WorkBehavior
include IiifPrint.model_configuration(
pdf_split_child_model: self
)
if ActiveModel::Type::Boolean.new.cast(ENV.fetch('HYKU_IIIF_PRINT', false))
include IiifPrint.model_configuration(
pdf_split_child_model: self
)
end

property :extent, predicate: ::RDF::Vocab::DC.extent, multiple: true do |index|
index.as :stored_searchable
Expand Down

0 comments on commit dcd78fa

Please sign in to comment.