Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎁 [i84] - Integrate Hyrax dynamic metadata feature into Hyku #2258

Draft
wants to merge 49 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
dabd419
Update Hyrax branch
kirkkwang Jun 24, 2024
9b63fe1
Update Hyrax
ShanaLMoore Jul 1, 2024
77a0198
Add HYRAX_FLEXIBLE env var and Hyrax.config.flexible? guards
ShanaLMoore Jul 1, 2024
cda1c39
temp ref specific sha of iiif_print
ShanaLMoore Jul 1, 2024
4689f5f
:construction: WIP: Update m3 profile
ShanaLMoore Jul 2, 2024
958426c
Add Oer/Etd resources to m3_profile + convert iiif print yml
ShanaLMoore Jul 2, 2024
a3773d9
:gift: Add metadata_profiles route
ShanaLMoore Jul 2, 2024
f2e2be8
revert changes to m3 for Hyrax::FileSet
ShanaLMoore Jul 2, 2024
601f5a9
:gift: update m3_profile with Oer and Etd specifications
ShanaLMoore Jul 2, 2024
e57f8e6
Update m3_profile.yaml
ShanaLMoore Jul 2, 2024
7c2ce59
set VALKYRIE_TRANSITION env vars
ShanaLMoore Jul 2, 2024
2704903
:bug: override hyrax to fix files bug - reason for missing pdf.js che…
ShanaLMoore Jul 2, 2024
a48da68
:broom: update indexers for non flexible metadata
ShanaLMoore Jul 2, 2024
98be47c
Update routes.rb
ShanaLMoore Jul 3, 2024
9834baa
Fix bug in configuration menu
Jul 3, 2024
8d849e4
Updates iiif_print and hyrax gems
ShanaLMoore Jul 5, 2024
d3a8bd6
Merge branch 'update-hyrax-to-flexible_double_combo' of https://githu…
ShanaLMoore Jul 5, 2024
7b3100d
:broom: guard against order already if flexible_metadata? is true
ShanaLMoore Jul 5, 2024
d3a7346
:construction: WIP - progress on making attribute_rows dynamic
ShanaLMoore Jul 5, 2024
881f367
add translation for profile version and version to works/collection i…
ShanaLMoore Jul 5, 2024
489d4f8
update hyrax
ShanaLMoore Jul 8, 2024
5638410
Update db/migrate/20240606205215_create_hyrax_flexible_schemas.rb
ShanaLMoore Jul 8, 2024
cbe6a35
Merge branch 'update-hyrax-to-flexible_double_combo' of https://githu…
ShanaLMoore Jul 8, 2024
e605d59
correct guard clause on migration
ShanaLMoore Jul 8, 2024
4bce0e7
:gift: add Hyrax::Administrative set to m3_profile and update hyrax
ShanaLMoore Jul 9, 2024
361ddc2
🧹 move seeds flexible metadata code inside Account iteration
ShanaLMoore Jul 9, 2024
93bcb81
🧹 removes reload config - caused very slow app
ShanaLMoore Jul 9, 2024
fa1134a
updates hyrax version
ShanaLMoore Jul 10, 2024
74d3bc3
Update Hyrax to pull in validations for bad profiles
ShanaLMoore Jul 16, 2024
4bf4bb3
Merge branch 'main' into update-hyrax-to-flexible_double_combo
ShanaLMoore Jul 16, 2024
ac31e36
Update Gemfile.lock
ShanaLMoore Jul 16, 2024
d12b225
Add ability to re run a specific step for debugging
ShanaLMoore Jul 16, 2024
ab0c718
debug pipeline
ShanaLMoore Jul 17, 2024
f0da1a5
bump hyrax to get delete working
orangewolf Aug 17, 2024
fc7d9a9
Update build-test-lint.yaml
ShanaLMoore Aug 23, 2024
0d244ec
Merge branch 'main' into update-hyrax-to-flexible_double_combo
ShanaLMoore Aug 23, 2024
53c040c
💄 rubocop fixes
ShanaLMoore Aug 23, 2024
38a483f
add contexts to hyku
orangewolf Dec 9, 2024
e9c4858
Merge branch 'update-hyrax-to-flexible_double_combo' of github.com:sa…
orangewolf Dec 12, 2024
9becebe
working through double combo update issues
orangewolf Dec 12, 2024
cac96ff
bootstrap 4 uses card instead of panel
orangewolf Dec 12, 2024
48dd019
Merge branch 'main' into update-hyrax-to-flexible_double_combo
orangewolf Dec 12, 2024
b443edc
clean up wings initializer after merge
orangewolf Dec 12, 2024
849140c
Merge branch 'panel-to-card' into update-hyrax-to-flexible_double_combo
orangewolf Dec 12, 2024
37cea10
fix gem versions after merge
orangewolf Dec 18, 2024
44c077e
Merge branch 'main' into update-hyrax-to-flexible_double_combo
orangewolf Dec 20, 2024
1accf06
bump bulkrax
orangewolf Dec 20, 2024
bc5e462
bump hyrax to fix build
orangewolf Dec 21, 2024
a8cb017
Merge branch 'main' into update-hyrax-to-flexible_double_combo
orangewolf Dec 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,6 @@ HYKU_RESTRICT_CREATE_AND_DESTROY_PERMISSIONS=true
HYRAX_ANALYTICS=false
##END## Enable Google Analytics

HYRAX_FLEXIBLE=true
HYRAX_VALKYRIE=true
VALKYRIE_TRANSITION=true
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ gem 'good_job', '~> 2.99'
gem 'googleauth', '~> 1.9.0'
gem 'google-protobuf', force_ruby_platform: true # required because google-protobuf is not compatible with Alpine linux
gem 'grpc', force_ruby_platform: true # required because google-protobuf is not compatible with Alpine linux
gem 'hyrax', github: 'samvera/hyrax', branch: 'double_combo'
gem 'hyrax', github: 'samvera/hyrax', branch: 'flexible_double_combo'
gem 'hyrax-doi', github: 'samvera-labs/hyrax-doi', branch: 'rails_hyrax_upgrade'
gem 'hyrax-iiif_av', github: 'samvera-labs/hyrax-iiif_av', branch: 'rails_hyrax_upgrade'
gem 'i18n-debug', require: false, group: %i[development test]
gem 'i18n-tasks', group: %i[development test]
gem 'iiif_print', github: 'scientist-softserv/iiif_print', branch: 'main'
gem 'iiif_print', github: 'scientist-softserv/iiif_print', branch: 'i84-support-dynamic-metadata'
gem 'jbuilder', '~> 2.5'
gem 'jquery-rails' # Use jquery as the JavaScript library
gem 'openssl', '>= 3.2.0'
Expand Down
17 changes: 8 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ GIT

GIT
remote: https://github.com/samvera/hyrax.git
revision: 6447872e0bcea17abfc1aab477f2eea57639298f
branch: double_combo
revision: 17f1e60f0c6d9d6339da8d8c085c6294517eed3e
branch: flexible_double_combo
specs:
hyrax (5.0.1)
active-fedora (~> 14.0)
Expand All @@ -168,6 +168,7 @@ GIT
dry-logic (~> 1.5)
dry-monads (~> 1.6)
dry-validation (~> 1.10)
faraday (= 2.9.1)
flipflop (~> 2.3)
flot-rails (~> 0.0.6)
font-awesome-rails (~> 4.2)
Expand Down Expand Up @@ -220,10 +221,10 @@ GIT

GIT
remote: https://github.com/scientist-softserv/iiif_print.git
revision: fb07dcdafdf1b2e7e05ebd34a50187bf69b46474
branch: main
revision: 63ef540419fcb3aabc73d61c0010638b173c11aa
branch: i84-support-dynamic-metadata
specs:
iiif_print (2.0.1)
iiif_print (3.0.1)
blacklight_iiif_search (>= 1.0, < 3.0)
derivative-rodeo (~> 0.5)
hyrax (>= 2.5, < 6)
Expand Down Expand Up @@ -586,10 +587,8 @@ GEM
factory_bot_rails (6.4.2)
factory_bot (~> 6.4)
railties (>= 5.0.0)
faraday (2.7.12)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday (2.9.1)
faraday-net_http (>= 2.0, < 3.2)
faraday-encoding (0.0.5)
faraday
faraday-excon (2.1.0)
Expand Down
6 changes: 3 additions & 3 deletions app/forms/collection_resource_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Generated via
# `rails generate hyrax:collection_resource CollectionResource`
class CollectionResourceForm < Hyrax::Forms::PcdmCollectionForm
include Hyrax::FormFields(:basic_metadata)
include Hyrax::FormFields(:bulkrax_metadata)
include Hyrax::FormFields(:collection_resource)
include Hyrax::FormFields(:basic_metadata) unless Hyrax.config.flexible?
include Hyrax::FormFields(:bulkrax_metadata) unless Hyrax.config.flexible?
include Hyrax::FormFields(:collection_resource) unless Hyrax.config.flexible?
include CollectionAccessFiltering
end
6 changes: 3 additions & 3 deletions app/forms/etd_resource_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
class EtdResourceForm < Hyrax::Forms::ResourceForm(EtdResource)
# Commented out basic_metadata because these terms were added to etd_resource so we can customize it.
# include Hyrax::FormFields(:basic_metadata)
include Hyrax::FormFields(:etd_resource)
include Hyrax::FormFields(:with_pdf_viewer)
include Hyrax::FormFields(:with_video_embed)
include Hyrax::FormFields(:etd_resource) unless Hyrax.config.flexible?
include Hyrax::FormFields(:with_pdf_viewer) unless Hyrax.config.flexible?
include Hyrax::FormFields(:with_video_embed) unless Hyrax.config.flexible?
include VideoEmbedBehavior::Validation
# Define custom form fields using the Valkyrie::ChangeSet interface
#
Expand Down
10 changes: 5 additions & 5 deletions app/forms/generic_work_resource_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
# @see https://github.com/samvera/hyrax/wiki/Hyrax-Valkyrie-Usage-Guide#forms
# @see https://github.com/samvera/valkyrie/wiki/ChangeSets-and-Dirty-Tracking
class GenericWorkResourceForm < Hyrax::Forms::ResourceForm(GenericWorkResource)
include Hyrax::FormFields(:basic_metadata)
include Hyrax::FormFields(:bulkrax_metadata)
include Hyrax::FormFields(:generic_work_resource)
include Hyrax::FormFields(:with_pdf_viewer)
include Hyrax::FormFields(:with_video_embed)
include Hyrax::FormFields(:basic_metadata) unless Hyrax.config.flexible?
include Hyrax::FormFields(:bulkrax_metadata) unless Hyrax.config.flexible?
include Hyrax::FormFields(:generic_work_resource) unless Hyrax.config.flexible?
include Hyrax::FormFields(:with_pdf_viewer) unless Hyrax.config.flexible?
include Hyrax::FormFields(:with_video_embed) unless Hyrax.config.flexible?
include VideoEmbedBehavior::Validation
end
4 changes: 2 additions & 2 deletions app/forms/hyrax/forms/pcdm_collection_form_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# OVERRIDE Hyraxv5.0.0 to add the ability to upload a collection thumbnail

Hyrax::Forms::PcdmCollectionForm.class_eval do
include Hyrax::FormFields(:basic_metadata)
include Hyrax::FormFields(:bulkrax_metadata)
include Hyrax::FormFields(:basic_metadata) unless Hyrax.config.flexible?
include Hyrax::FormFields(:bulkrax_metadata) unless Hyrax.config.flexible?
include CollectionAccessFiltering

ThumbnailInfoPrepopulator = lambda do |_options = nil|
Expand Down
10 changes: 5 additions & 5 deletions app/forms/image_resource_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
# @see https://github.com/samvera/hyrax/wiki/Hyrax-Valkyrie-Usage-Guide#forms
# @see https://github.com/samvera/valkyrie/wiki/ChangeSets-and-Dirty-Tracking
class ImageResourceForm < Hyrax::Forms::ResourceForm(ImageResource)
include Hyrax::FormFields(:basic_metadata)
include Hyrax::FormFields(:bulkrax_metadata)
include Hyrax::FormFields(:image_resource)
include Hyrax::FormFields(:with_pdf_viewer)
include Hyrax::FormFields(:with_video_embed)
include Hyrax::FormFields(:basic_metadata) unless Hyrax.config.flexible?
include Hyrax::FormFields(:bulkrax_metadata) unless Hyrax.config.flexible?
include Hyrax::FormFields(:image_resource) unless Hyrax.config.flexible?
include Hyrax::FormFields(:with_pdf_viewer) unless Hyrax.config.flexible?
include Hyrax::FormFields(:with_video_embed) unless Hyrax.config.flexible?
include VideoEmbedBehavior::Validation
end
6 changes: 3 additions & 3 deletions app/forms/oer_resource_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
class OerResourceForm < Hyrax::Forms::ResourceForm(OerResource)
# Commented out basic_metadata because these terms were added to etd_resource so we can customize it.
# include Hyrax::FormFields(:basic_metadata)
include Hyrax::FormFields(:oer_resource)
include Hyrax::FormFields(:with_pdf_viewer)
include Hyrax::FormFields(:with_video_embed)
include Hyrax::FormFields(:oer_resource) unless Hyrax.config.flexible?
include Hyrax::FormFields(:with_pdf_viewer) unless Hyrax.config.flexible?
include Hyrax::FormFields(:with_video_embed) unless Hyrax.config.flexible?
include VideoEmbedBehavior::Validation
# Define custom form fields using the Valkyrie::ChangeSet interface
#
Expand Down
3 changes: 3 additions & 0 deletions app/indexers/admin_set_resource_indexer.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# frozen_string_literal: true

class AdminSetResourceIndexer < Hyrax::Indexers::AdministrativeSetIndexer
# include Hyrax::Indexer(:core_metadata) unless Hyrax.config.flexible?
# include Hyrax::Indexer('AdminSetResource') if Hyrax.config.flexible?
end

8 changes: 5 additions & 3 deletions app/indexers/collection_resource_indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
# Generated via
# `rails generate hyrax:collection_resource CollectionResource`
class CollectionResourceIndexer < Hyrax::Indexers::PcdmCollectionIndexer
include Hyrax::Indexer(:basic_metadata)
include Hyrax::Indexer(:bulkrax_metadata)
include Hyrax::Indexer(:collection_resource)
include Hyrax::Indexer(:basic_metadata) unless Hyrax.config.flexible?
include Hyrax::Indexer(:bulkrax_metadata) unless Hyrax.config.flexible?
include Hyrax::Indexer(:collection_resource) unless Hyrax.config.flexible?
include Hyrax::Indexer('CollectionResource') if Hyrax.config.flexible?

include Hyrax::IndexesThumbnails

def to_solr
Expand Down
11 changes: 6 additions & 5 deletions app/indexers/etd_resource_indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
# Generated via
# `rails generate hyrax:work_resource EtdResource`
class EtdResourceIndexer < Hyrax::ValkyrieWorkIndexer
include Hyrax::Indexer(:basic_metadata)
include Hyrax::Indexer(:bulkrax_metadata)
include Hyrax::Indexer(:etd_resource)
include Hyrax::Indexer(:with_pdf_viewer)
include Hyrax::Indexer(:with_video_embed)
include Hyrax::Indexer(:basic_metadata) unless Hyrax.config.flexible?
include Hyrax::Indexer(:bulkrax_metadata) unless Hyrax.config.flexible?
include Hyrax::Indexer(:etd_resource) unless Hyrax.config.flexible?
include Hyrax::Indexer(:with_pdf_viewer) unless Hyrax.config.flexible?
include Hyrax::Indexer(:with_video_embed) unless Hyrax.config.flexible?
include Hyrax::Indexer('EtdResource') if Hyrax.config.flexible?

include HykuIndexing

Expand Down
11 changes: 6 additions & 5 deletions app/indexers/generic_work_resource_indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
# Generated via
# `rails generate hyrax:work_resource GenericWorkResource`
class GenericWorkResourceIndexer < Hyrax::ValkyrieWorkIndexer
include Hyrax::Indexer(:basic_metadata)
include Hyrax::Indexer(:bulkrax_metadata)
include Hyrax::Indexer(:generic_work_resource)
include Hyrax::Indexer(:with_pdf_viewer)
include Hyrax::Indexer(:with_video_embed)
include Hyrax::Indexer(:basic_metadata) unless Hyrax.config.flexible?
include Hyrax::Indexer(:bulkrax_metadata) unless Hyrax.config.flexible?
include Hyrax::Indexer(:generic_work_resource) unless Hyrax.config.flexible?
include Hyrax::Indexer(:with_pdf_viewer) unless Hyrax.config.flexible?
include Hyrax::Indexer(:with_video_embed) unless Hyrax.config.flexible?
include Hyrax::Indexer('GenericWorkResource') if Hyrax.config.flexible?

include HykuIndexing
# Uncomment this block if you want to add custom indexing behavior:
Expand Down
11 changes: 6 additions & 5 deletions app/indexers/image_resource_indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
# Generated via
# `rails generate hyrax:work_resource ImageResource`
class ImageResourceIndexer < Hyrax::ValkyrieWorkIndexer
include Hyrax::Indexer(:basic_metadata)
include Hyrax::Indexer(:bulkrax_metadata)
include Hyrax::Indexer(:image_resource)
include Hyrax::Indexer(:with_pdf_viewer)
include Hyrax::Indexer(:with_video_embed)
include Hyrax::Indexer(:basic_metadata) unless Hyrax.config.flexible?
include Hyrax::Indexer(:bulkrax_metadata) unless Hyrax.config.flexible?
include Hyrax::Indexer(:image_resource) unless Hyrax.config.flexible?
include Hyrax::Indexer(:with_pdf_viewer) unless Hyrax.config.flexible?
include Hyrax::Indexer(:with_video_embed) unless Hyrax.config.flexible?
include Hyrax::Indexer('ImageResource') if Hyrax.config.flexible?

include HykuIndexing
# Uncomment this block if you want to add custom indexing behavior:
Expand Down
11 changes: 6 additions & 5 deletions app/indexers/oer_resource_indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
# Generated via
# `rails generate hyrax:work_resource OerResource`
class OerResourceIndexer < Hyrax::ValkyrieWorkIndexer
include Hyrax::Indexer(:basic_metadata)
include Hyrax::Indexer(:bulkrax_metadata)
include Hyrax::Indexer(:oer_resource)
include Hyrax::Indexer(:with_pdf_viewer)
include Hyrax::Indexer(:with_video_embed)
include Hyrax::Indexer(:basic_metadata) unless Hyrax.config.flexible?
include Hyrax::Indexer(:bulkrax_metadata) unless Hyrax.config.flexible?
include Hyrax::Indexer(:oer_resource) unless Hyrax.config.flexible?
include Hyrax::Indexer(:with_pdf_viewer) unless Hyrax.config.flexible?
include Hyrax::Indexer(:with_video_embed) unless Hyrax.config.flexible?
include Hyrax::Indexer('OerResource') if Hyrax.config.flexible?

include HykuIndexing

Expand Down
8 changes: 4 additions & 4 deletions app/models/collection_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# Generated via
# `rails generate hyrax:collection_resource CollectionResource`
class CollectionResource < Hyrax::PcdmCollection
include Hyrax::Schema(:basic_metadata)
include Hyrax::Schema(:bulkrax_metadata)
include Hyrax::Schema(:collection_resource)
include Hyrax::Schema(:basic_metadata) unless Hyrax.config.flexible?
include Hyrax::Schema(:bulkrax_metadata) unless Hyrax.config.flexible?
include Hyrax::Schema(:collection_resource) unless Hyrax.config.flexible?
include Hyrax::ArResource
include HykuIndexing

Expand All @@ -19,7 +19,7 @@ class CollectionResource < Hyrax::PcdmCollection

include WithPermissionTemplateShim

prepend OrderAlready.for(:creator)
prepend OrderAlready.for(:creator) unless Hyrax.config.flexible?

##
# @!group Methods to Extract
Expand Down
28 changes: 28 additions & 0 deletions app/models/concerns/hyrax/solr_document_behavior_decorator.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# frozen_string_literal: true
# OVERRIDE: Hyrax v5.0.1 to fix a bug
# previously presenter.file_set_presenters didn't know it
# had any files to display.
module Hyrax
##
# @api public
#
# Hyrax extensions for +Blacklight+'s generated +SolrDocument+.
#
# @example using with +Blacklight::Solr::Document+
# class SolrDocument
# include Blacklight::Solr::Document
# include Hyrax::SolrDocumentBehavior
# end
#
# @see https://github.com/projectblacklight/blacklight/wiki/Understanding-Rails-and-Blacklight#models
module SolrDocumentBehaviorDecorator
# Method to return the model
def hydra_model(classifier: nil)
model = first('has_model_ssim')&.safe_constantize
model = (first('has_model_ssim')&.+ 'Resource')&.safe_constantize if Hyrax.config.valkyrie_transition?
model || model_classifier(classifier).classifier(self).best_model
end
end
end

Hyrax::SolrDocumentBehavior.prepend(Hyrax::SolrDocumentBehaviorDecorator)
10 changes: 5 additions & 5 deletions app/models/etd_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
class EtdResource < Hyrax::Work
# Commented out basic_metadata because these terms were added to etd_resource so we can customize it.
# include Hyrax::Schema(:basic_metadata)
include Hyrax::Schema(:etd_resource)
include Hyrax::Schema(:bulkrax_metadata)
include Hyrax::Schema(:with_pdf_viewer)
include Hyrax::Schema(:with_video_embed)
include Hyrax::Schema(:etd_resource) unless Hyrax.config.flexible?
include Hyrax::Schema(:bulkrax_metadata) unless Hyrax.config.flexible?
include Hyrax::Schema(:with_pdf_viewer) unless Hyrax.config.flexible?
include Hyrax::Schema(:with_video_embed) unless Hyrax.config.flexible?
include Hyrax::ArResource
include Hyrax::NestedWorks

Expand All @@ -19,7 +19,7 @@ class EtdResource < Hyrax::Work
pdf_splitter_service: IiifPrint::TenantConfig::PdfSplitter
)

prepend OrderAlready.for(:creator)
prepend OrderAlready.for(:creator) unless Hyrax.config.flexible?

def human_readable_type
super.upcase
Expand Down
12 changes: 6 additions & 6 deletions app/models/generic_work_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
# Generated via
# `rails generate hyrax:work_resource GenericWorkResource`
class GenericWorkResource < Hyrax::Work
include Hyrax::Schema(:basic_metadata)
include Hyrax::Schema(:bulkrax_metadata)
include Hyrax::Schema(:generic_work_resource)
include Hyrax::Schema(:with_pdf_viewer)
include Hyrax::Schema(:with_video_embed)
include Hyrax::Schema(:basic_metadata) unless Hyrax.config.flexible?
include Hyrax::Schema(:bulkrax_metadata) unless Hyrax.config.flexible?
include Hyrax::Schema(:generic_work_resource) unless Hyrax.config.flexible?
include Hyrax::Schema(:with_pdf_viewer) unless Hyrax.config.flexible?
include Hyrax::Schema(:with_video_embed) unless Hyrax.config.flexible?
include Hyrax::ArResource
include Hyrax::NestedWorks

Expand All @@ -18,5 +18,5 @@ class GenericWorkResource < Hyrax::Work
pdf_splitter_service: IiifPrint::TenantConfig::PdfSplitter
)

prepend OrderAlready.for(:creator)
prepend OrderAlready.for(:creator) unless Hyrax.config.flexible?
end
4 changes: 2 additions & 2 deletions app/models/hyrax/file_set_decorator.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# frozen_string_literal: true

Hyrax::FileSet.class_eval do
include Hyrax::Schema(:bulkrax_metadata)
include Hyrax::Schema(:hyku_file_set_metadata)
include Hyrax::Schema(:bulkrax_metadata) unless Hyrax.config.flexible?
include Hyrax::Schema(:hyku_file_set_metadata) unless Hyrax.config.flexible?
include Hyrax::ArResource
end

Expand Down
12 changes: 6 additions & 6 deletions app/models/image_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
# Generated via
# `rails generate hyrax:work_resource ImageResource`
class ImageResource < Hyrax::Work
include Hyrax::Schema(:basic_metadata)
include Hyrax::Schema(:bulkrax_metadata)
include Hyrax::Schema(:image_resource)
include Hyrax::Schema(:with_pdf_viewer)
include Hyrax::Schema(:with_video_embed)
include Hyrax::Schema(:basic_metadata) unless Hyrax.config.flexible?
include Hyrax::Schema(:bulkrax_metadata) unless Hyrax.config.flexible?
include Hyrax::Schema(:image_resource) unless Hyrax.config.flexible?
include Hyrax::Schema(:with_pdf_viewer) unless Hyrax.config.flexible?
include Hyrax::Schema(:with_video_embed) unless Hyrax.config.flexible?
include Hyrax::ArResource
include Hyrax::NestedWorks

Expand All @@ -18,5 +18,5 @@ class ImageResource < Hyrax::Work
pdf_splitter_service: IiifPrint::TenantConfig::PdfSplitter
)

prepend OrderAlready.for(:creator)
prepend OrderAlready.for(:creator) unless Hyrax.config.flexible?
end
Loading