diff --git a/.env b/.env index 6371a8abd..cfa46e5a0 100644 --- a/.env +++ b/.env @@ -70,5 +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 diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index ce0c2ec5c..8c13861a7 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -1,4 +1,4 @@ -name: "Build" +name: "build-test-lint" run-name: Build of ${{ github.ref_name }} by @${{ github.actor }} on: push: diff --git a/.gitignore b/.gitignore index ff801b915..258ea0ba0 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,4 @@ docker-compose.override.yml *~undo-tree~ .DS_Store /bundler.d/ +.tool-versions diff --git a/Gemfile b/Gemfile index e3dc4abd1..64264f8b3 100644 --- a/Gemfile +++ b/Gemfile @@ -30,7 +30,7 @@ gem 'blacklight_range_limit' gem 'bolognese', '>= 1.9.10' gem 'bootstrap', '~> 4.6' gem 'bootstrap-datepicker-rails' -gem 'bulkrax', '~> 9.0.0' +gem 'bulkrax', '~> 9.0.0' # github: 'samvera/bulkrax', branch: 'bootstrap_card_fixes' gem 'byebug', group: %i[development test] gem 'capybara', group: %i[test] gem 'capybara-screenshot', '~> 1.0', group: %i[test] @@ -53,12 +53,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: 'main' +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' diff --git a/Gemfile.lock b/Gemfile.lock index 9b7993627..0948890c7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -120,8 +120,8 @@ GIT GIT remote: https://github.com/samvera/hyrax.git - revision: abd5955f325b966ebd21d0de8d96b61cf0421cf3 - branch: main + revision: 260376bba8c1f78585250dfd4e0dfee409261b55 + branch: flexible_double_combo specs: hyrax (5.0.1) active-fedora (~> 14.0) @@ -194,8 +194,8 @@ GIT GIT remote: https://github.com/scientist-softserv/iiif_print.git - revision: acef382ce710d6aad63e11cfa83b5803a9f30fa2 - branch: main + revision: 63ef540419fcb3aabc73d61c0010638b173c11aa + branch: i84-support-dynamic-metadata specs: iiif_print (3.0.1) blacklight_iiif_search (>= 1.0, < 3.0) @@ -245,11 +245,11 @@ GEM active_encode (0.8.2) rails sprockets (< 4) - activemodel-serializers-xml (1.0.2) - activemodel (> 5.x) - activesupport (> 5.x) + activemodel-serializers-xml (1.0.3) + activemodel (>= 5.0.0.a) + activesupport (>= 5.0.0.a) builder (~> 3.1) - activerecord-import (1.7.0) + activerecord-import (2.0.0) activerecord (>= 4.2) activerecord-nulldb-adapter (1.0.1) activerecord (>= 5.2.0, < 7.2) @@ -268,8 +268,8 @@ GEM attr_required (1.0.1) autoprefixer-rails (10.4.16.0) execjs (~> 2) - awesome_nested_set (3.6.0) - activerecord (>= 4.0.0, < 7.2) + awesome_nested_set (3.8.0) + activerecord (>= 4.0.0, < 8.1) aws-eventstream (1.3.0) aws-partitions (1.865.0) aws-sdk-core (3.190.0) @@ -336,17 +336,16 @@ GEM blacklight (> 6.0, < 8) cancancan (>= 1.8) deprecation (~> 1.0) - blacklight-gallery (4.4.0) + blacklight-gallery (4.6.4) blacklight (>= 7.17, < 9) - rails (>= 6.1, < 8) + rails (>= 6.1, < 9) blacklight_advanced_search (7.0.0) blacklight (~> 7.0) parslet - blacklight_iiif_search (2.1.0) + blacklight_iiif_search (2.0.0) blacklight (~> 7.0) - ffi (~> 1.16.3) iiif-presentation - rails (>= 6, < 7.3) + rails (>= 5.1, < 7) blacklight_oai_provider (7.0.2) blacklight (~> 7.0) oai (~> 1.2) @@ -379,19 +378,20 @@ GEM rdf-rdfxml (~> 3.1) rdf-turtle (~> 3.1) thor (>= 0.19) - bootstrap (4.6.2.1) + bootstrap (4.6.2) autoprefixer-rails (>= 9.1.0) popper_js (>= 1.16.1, < 2) + sassc-rails (>= 2.0.0) bootstrap-datepicker-rails (1.10.0.1) railties (>= 3.0) breadcrumbs_on_rails (3.0.1) - browse-everything (1.3.0) + browse-everything (1.5.0) addressable (~> 2.5) aws-sdk-s3 dropbox_api (>= 0.1.20) google-apis-drive_v3 googleauth (>= 0.6.6, < 2.0) - rails (>= 4.2, < 7.2) + rails (>= 4.2, < 8.1) ruby-box signet (~> 0.8) typhoeus @@ -515,7 +515,7 @@ GEM dropbox_api (0.1.21) faraday (< 3.0) oauth2 (~> 1.1) - dry-configurable (1.1.0) + dry-configurable (1.2.0) dry-core (~> 1.0, < 2) zeitwerk (~> 2.6) dry-container (0.11.0) @@ -611,8 +611,8 @@ GEM flot-rails (0.0.7) jquery-rails flutie (2.2.0) - font-awesome-rails (4.7.0.8) - railties (>= 3.2, < 8.0) + font-awesome-rails (4.7.0.9) + railties (>= 3.2, < 9.0) fugit (1.11.1) et-orbi (~> 1, >= 1.2.11) raabro (~> 1.4) @@ -627,7 +627,7 @@ GEM gender_detector (0.1.2) unicode_utils (>= 1.3.0) geo_coord (0.2.0) - geocoder (1.8.3) + geocoder (1.8.5) base64 (>= 0.1.0) csv (>= 3.0.0) globalid (1.2.1) @@ -641,31 +641,31 @@ GEM thor (>= 0.14.1) webrick (>= 1.3) zeitwerk (>= 2.0) - google-analytics-data (0.6.0) + google-analytics-data (0.6.1) google-analytics-data-v1beta (>= 0.11, < 2.a) google-cloud-core (~> 1.6) - google-analytics-data-v1beta (0.12.0) + google-analytics-data-v1beta (0.14.0) gapic-common (>= 0.21.1, < 2.a) google-cloud-errors (~> 1.0) - google-apis-core (0.15.0) + google-apis-core (0.15.1) addressable (~> 2.5, >= 2.5.1) googleauth (~> 1.9) - httpclient (>= 2.8.1, < 3.a) + httpclient (>= 2.8.3, < 3.a) mini_mime (~> 1.0) + mutex_m representable (~> 3.0) retriable (>= 2.0, < 4.a) - rexml - google-apis-drive_v3 (0.51.0) + google-apis-drive_v3 (0.61.0) google-apis-core (>= 0.15.0, < 2.a) - google-cloud-core (1.7.0) + google-cloud-core (1.7.1) google-cloud-env (>= 1.0, < 3.a) google-cloud-errors (~> 1.0) google-cloud-env (2.1.1) faraday (>= 1.0, < 3.a) google-cloud-errors (1.4.0) - google-protobuf (3.25.5) - googleapis-common-protos (1.5.0) - google-protobuf (~> 3.18) + google-protobuf (3.25.3) + googleapis-common-protos (1.6.0) + google-protobuf (>= 3.18, < 5.a) googleapis-common-protos-types (~> 1.7) grpc (~> 1.41) googleapis-common-protos-types (1.14.0) @@ -715,13 +715,13 @@ GEM deprecation mime-types (> 2.0, < 4.0) mini_magick (>= 3.2, < 5) - hydra-editor (6.2.0) + hydra-editor (6.3.0) active-fedora (>= 9.0.0) - activerecord (>= 5.2, < 7.1) + activerecord (>= 5.2, < 8.0) almond-rails (~> 0.1) cancancan psych (~> 3.3, < 4) - rails (>= 5.2, < 7.1) + rails (>= 5.2, < 8.0) simple_form (>= 4.1.0, < 5.2) sprockets (>= 3.7) sprockets-es6 @@ -731,13 +731,13 @@ GEM hydra-access-controls (= 12.1.0) hydra-core (= 12.1.0) rails (>= 5.2, < 7.1) - hydra-pcdm (1.3.0) - active-fedora (>= 10, < 15) + hydra-pcdm (1.4.0) + active-fedora (>= 10) mime-types (>= 1) rdf-vocab - hydra-works (2.1.0) - activesupport (>= 5.2, < 7.1) - hydra-derivatives (~> 3.6) + hydra-works (2.2.0) + activesupport (>= 5.2, < 8.0) + hydra-derivatives (>= 3.6) hydra-file_characterization (~> 1.0) hydra-pcdm (>= 0.9) i18n (1.14.1) @@ -778,10 +778,9 @@ GEM thor (>= 0.14, < 2.0) json (2.7.1) json-canonicalization (0.3.1) - json-jwt (1.16.6) + json-jwt (1.16.3) activesupport (>= 4.2) aes_key_wrap - base64 bindata faraday (~> 2.0) faraday-follow_redirects @@ -795,8 +794,9 @@ GEM json-ld-preloaded (3.2.2) json-ld (~> 3.2) rdf (~> 3.2) - json-schema (4.3.0) - addressable (>= 2.8) + json-schema (5.1.1) + addressable (~> 2.8) + bigdecimal (~> 3.1) jsonlint (0.3.0) oj (~> 3) optimist (~> 3) @@ -880,7 +880,7 @@ GEM listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - logger (1.6.0) + logger (1.6.4) lograge (0.14.0) actionpack (>= 4) activesupport (>= 4) @@ -919,7 +919,7 @@ GEM mime-types-data (3.2023.1205) mini_magick (4.12.0) mini_mime (1.1.5) - mini_portile2 (2.8.7) + mini_portile2 (2.8.5) minitest (5.20.0) mods (2.4.1) edtf @@ -929,13 +929,14 @@ GEM multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.3.0) + mutex_m (0.3.0) namae (1.1.1) negative_captcha (0.5) actionpack activesupport nest (3.2.0) redic - net-http-persistent (4.0.2) + net-http-persistent (4.0.5) connection_pool (~> 2.2) net-imap (0.4.9) date @@ -946,10 +947,10 @@ GEM timeout net-smtp (0.4.0) net-protocol - nio4r (2.7.3) + nio4r (2.7.0) noid (0.9.0) - noid-rails (3.1.0) - actionpack (>= 5.0.0, < 7.1) + noid-rails (3.2.0) + actionpack (>= 5.0.0, < 8) noid (~> 0.9) nokogiri (1.13.10) mini_portile2 (~> 2.8.0) @@ -977,7 +978,7 @@ GEM bigdecimal (>= 3.0) oj_mimic_json (1.0.1) okcomputer (1.18.5) - omniauth (2.1.2) + omniauth (2.1.1) hashie (>= 3.4.6) rack (>= 2.2.3) rack-protection @@ -986,9 +987,9 @@ GEM omniauth-rails_csrf_protection (1.0.1) actionpack (>= 4.2) omniauth (~> 2.0) - omniauth-saml (2.1.2) - omniauth (~> 2.1) - ruby-saml (~> 1.17) + omniauth-saml (2.1.0) + omniauth (~> 2.0) + ruby-saml (~> 1.12) omniauth_openid_connect (0.7.1) omniauth (>= 1.9, < 3) openid_connect (~> 2.2) @@ -1005,8 +1006,8 @@ GEM validate_email validate_url webfinger (~> 2.0) - openseadragon (0.6.0) - rails (> 3.2.0) + openseadragon (1.0.11) + rails (> 6.1.0) openssl (3.2.0) optimist (3.1.0) order_already (0.3.2) @@ -1034,20 +1035,20 @@ GEM pry (>= 0.13, < 0.15) psych (3.3.4) public_suffix (4.0.7) - puma (5.6.9) + puma (5.6.7) nio4r (~> 2.0) - qa (5.11.0) + qa (5.14.0) activerecord-import deprecation faraday (< 3.0, != 2.0.0) geocoder ldpath nokogiri (~> 1.6) - rails (>= 5.0, < 7.2) + rails (>= 5.0, < 8.1) rdf raabro (1.4.0) - racc (1.8.1) - rack (2.2.9) + racc (1.7.3) + rack (2.2.8) rack-oauth2 (2.2.0) activesupport attr_required @@ -1055,8 +1056,7 @@ GEM faraday-follow_redirects json-jwt (>= 1.11.0) rack (>= 2.1.0) - rack-protection (3.2.0) - base64 (>= 0.1.0) + rack-protection (3.1.0) rack (~> 2.2, >= 2.2.4) rack-test (0.7.0) rack (>= 1.0, < 3) @@ -1251,7 +1251,7 @@ GEM multipart-post oauth2 ruby-progressbar (1.13.0) - ruby-saml (1.17.0) + ruby-saml (1.16.0) nokogiri (>= 1.13.10) rexml ruby2_keywords (0.0.5) @@ -1470,7 +1470,7 @@ GEM psych (>= 3.3) rdf (~> 3.2, >= 3.2.9) rdf-xsd (~> 3.2) - yard (0.9.36) + yard (0.9.34) zeitwerk (2.6.12) zlib (2.1.1) diff --git a/app/forms/collection_resource_form.rb b/app/forms/collection_resource_form.rb index 3e9795dde..5a55af498 100644 --- a/app/forms/collection_resource_form.rb +++ b/app/forms/collection_resource_form.rb @@ -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 diff --git a/app/forms/etd_resource_form.rb b/app/forms/etd_resource_form.rb index b3d7616d5..1c590737d 100644 --- a/app/forms/etd_resource_form.rb +++ b/app/forms/etd_resource_form.rb @@ -9,10 +9,10 @@ class EtdResourceForm < Hyrax::Forms::ResourceForm(EtdResource) # Commented out basic_metadata because the terms were added to the resource's yaml # so we can customize it # include Hyrax::FormFields(:basic_metadata) - include Hyrax::FormFields(:bulkrax_metadata) - include Hyrax::FormFields(:etd_resource) - include Hyrax::FormFields(:with_pdf_viewer) - include Hyrax::FormFields(:with_video_embed) + include Hyrax::FormFields(:bulkrax_metadata) unless Hyrax.config.flexible? + 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 # this duplicates Hyrax::BasicMetadataFormFieldsBehavior behavior which previously # came in dynamically via lib/hyrax/form_fields.rb diff --git a/app/forms/generic_work_resource_form.rb b/app/forms/generic_work_resource_form.rb index 35a9d6bed..714b0cd3a 100644 --- a/app/forms/generic_work_resource_form.rb +++ b/app/forms/generic_work_resource_form.rb @@ -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 diff --git a/app/forms/hyrax/forms/pcdm_collection_form_decorator.rb b/app/forms/hyrax/forms/pcdm_collection_form_decorator.rb index ee5e37753..e5086c3b9 100644 --- a/app/forms/hyrax/forms/pcdm_collection_form_decorator.rb +++ b/app/forms/hyrax/forms/pcdm_collection_form_decorator.rb @@ -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| diff --git a/app/forms/image_resource_form.rb b/app/forms/image_resource_form.rb index f51e4c2ae..bbaa4e81f 100644 --- a/app/forms/image_resource_form.rb +++ b/app/forms/image_resource_form.rb @@ -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 diff --git a/app/forms/oer_resource_form.rb b/app/forms/oer_resource_form.rb index b61b71cbb..4d13bff01 100644 --- a/app/forms/oer_resource_form.rb +++ b/app/forms/oer_resource_form.rb @@ -9,10 +9,10 @@ class OerResourceForm < Hyrax::Forms::ResourceForm(OerResource) # Commented out basic_metadata because the terms were added to the resource's yaml # so we can customize it # include Hyrax::FormFields(:basic_metadata) - include Hyrax::FormFields(:bulkrax_metadata) - include Hyrax::FormFields(:oer_resource) - include Hyrax::FormFields(:with_pdf_viewer) - include Hyrax::FormFields(:with_video_embed) + include Hyrax::FormFields(:bulkrax_metadata) unless Hyrax.config.flexible? + 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 # this duplicates Hyrax::BasicMetadataFormFieldsBehavior behavior which previously # came in dynamically via lib/hyrax/form_fields.rb diff --git a/app/indexers/admin_set_resource_indexer.rb b/app/indexers/admin_set_resource_indexer.rb index f8555ef99..93f6066c7 100644 --- a/app/indexers/admin_set_resource_indexer.rb +++ b/app/indexers/admin_set_resource_indexer.rb @@ -1,4 +1,6 @@ # 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 diff --git a/app/indexers/collection_resource_indexer.rb b/app/indexers/collection_resource_indexer.rb index 79f261ef1..a43483197 100644 --- a/app/indexers/collection_resource_indexer.rb +++ b/app/indexers/collection_resource_indexer.rb @@ -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 include HykuIndexing diff --git a/app/indexers/etd_resource_indexer.rb b/app/indexers/etd_resource_indexer.rb index 999eb6260..30bfa34ee 100644 --- a/app/indexers/etd_resource_indexer.rb +++ b/app/indexers/etd_resource_indexer.rb @@ -3,12 +3,12 @@ # Generated via # `rails generate hyrax:work_resource EtdResource` class EtdResourceIndexer < Hyrax::ValkyrieWorkIndexer - # Commented out basic_metadata because these terms were added to etd_resource so we can customize it. - # 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 diff --git a/app/indexers/generic_work_resource_indexer.rb b/app/indexers/generic_work_resource_indexer.rb index 2ea0303ba..ab2a7fd92 100644 --- a/app/indexers/generic_work_resource_indexer.rb +++ b/app/indexers/generic_work_resource_indexer.rb @@ -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: diff --git a/app/indexers/hyku/indexers/file_set_indexer.rb b/app/indexers/hyku/indexers/file_set_indexer.rb index febbb2dd7..3ab8f73be 100644 --- a/app/indexers/hyku/indexers/file_set_indexer.rb +++ b/app/indexers/hyku/indexers/file_set_indexer.rb @@ -3,8 +3,8 @@ module Hyku module Indexers class FileSetIndexer < Hyrax::Indexers::FileSetIndexer - include Hyrax::Indexer(:bulkrax_metadata) - include Hyrax::Indexer(:hyku_file_set_metadata) + include Hyrax::Indexer(:bulkrax_metadata) unless Hyrax.config.flexible? + include Hyrax::Indexer(:hyku_file_set_metadata) unless Hyrax.config.flexible? def to_solr return super unless Flipflop.default_pdf_viewer? diff --git a/app/indexers/image_resource_indexer.rb b/app/indexers/image_resource_indexer.rb index 6a2de1a5c..9d0005702 100644 --- a/app/indexers/image_resource_indexer.rb +++ b/app/indexers/image_resource_indexer.rb @@ -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: diff --git a/app/indexers/oer_resource_indexer.rb b/app/indexers/oer_resource_indexer.rb index 31f8d1a7c..3d8ffd989 100644 --- a/app/indexers/oer_resource_indexer.rb +++ b/app/indexers/oer_resource_indexer.rb @@ -3,12 +3,12 @@ # Generated via # `rails generate hyrax:work_resource OerResource` class OerResourceIndexer < Hyrax::ValkyrieWorkIndexer - # Commented out basic_metadata because these terms were added to etd_resource so we can customize it. - # 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 diff --git a/app/models/collection_resource.rb b/app/models/collection_resource.rb index 688bf3855..924434e38 100644 --- a/app/models/collection_resource.rb +++ b/app/models/collection_resource.rb @@ -3,10 +3,11 @@ # 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(:with_thumbnail) + + 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::Schema(:with_thumbnail) unless Hyrax.config.flexible? include Hyrax::ArResource Hyrax::ValkyrieLazyMigration.migrating(self, from: ::Collection) @@ -19,7 +20,7 @@ class CollectionResource < Hyrax::PcdmCollection include WithPermissionTemplateShim - prepend OrderAlready.for(:creator) + prepend OrderAlready.for(:creator) unless Hyrax.config.flexible? ## # @!group Methods to Extract diff --git a/app/models/etd_resource.rb b/app/models/etd_resource.rb index 3bbaffd47..b36e77731 100644 --- a/app/models/etd_resource.rb +++ b/app/models/etd_resource.rb @@ -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 @@ -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 diff --git a/app/models/generic_work_resource.rb b/app/models/generic_work_resource.rb index 74d8791da..caae0e419 100644 --- a/app/models/generic_work_resource.rb +++ b/app/models/generic_work_resource.rb @@ -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 @@ -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 diff --git a/app/models/hyrax/file_set_decorator.rb b/app/models/hyrax/file_set_decorator.rb index add44198d..2c4284b17 100644 --- a/app/models/hyrax/file_set_decorator.rb +++ b/app/models/hyrax/file_set_decorator.rb @@ -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 diff --git a/app/models/image_resource.rb b/app/models/image_resource.rb index fba13fafc..92e35d418 100644 --- a/app/models/image_resource.rb +++ b/app/models/image_resource.rb @@ -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 @@ -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 diff --git a/app/models/oer_resource.rb b/app/models/oer_resource.rb index 990663567..8dca0765c 100644 --- a/app/models/oer_resource.rb +++ b/app/models/oer_resource.rb @@ -5,10 +5,10 @@ class OerResource < 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(:oer_resource) - include Hyrax::Schema(:bulkrax_metadata) - include Hyrax::Schema(:with_pdf_viewer) - include Hyrax::Schema(:with_video_embed) + include Hyrax::Schema(:oer_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 @@ -19,7 +19,7 @@ class OerResource < Hyrax::Work pdf_splitter_service: IiifPrint::TenantConfig::PdfSplitter ) - prepend OrderAlready.for(:creator) + prepend OrderAlready.for(:creator) unless Hyrax.config.flexible? def previous_version @previous_version ||= Hyrax.query_service.find_many_by_ids(ids: previous_version_id) if previous_version_id.present? diff --git a/app/views/hyrax/base/_attribute_rows.html.erb b/app/views/hyrax/base/_attribute_rows.html.erb new file mode 100644 index 000000000..f8a2b91cc --- /dev/null +++ b/app/views/hyrax/base/_attribute_rows.html.erb @@ -0,0 +1,25 @@ +<%# OVERRIDE hyrax-doi to support dynamic metadata %> +<%# TODO: remove after hyrax-doi gem v0.2.0 and code is removed %> +<%# hyrax-doi doesn't work post hyrax v3.0.0 %> +<% if Hyrax.config.flexible? %> + <% view_options_for(presenter).each do |field, options| %> + <%= presenter.attribute_to_html(conform_field(field, options), conform_options(field, options)) %> + <% end %> +<% else %> + <%# Copied from hyrax-doi v0.2.0 %> + <%= presenter.attribute_to_html(:date_modified, label: t('hyrax.base.show.last_modified'), html_dl: true) %> + <%= presenter.attribute_to_html(:creator, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:contributor, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:subject, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:publisher, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:language, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:identifier, render_as: :linked, search_field: 'identifier_tesim', html_dl: true) %> + <%= presenter.attribute_to_html(:keyword, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:date_created, render_as: :linked, search_field: 'date_created_tesim', html_dl: true) %> + <%= presenter.attribute_to_html(:based_near_label, html_dl: true) %> + <%= presenter.attribute_to_html(:related_url, render_as: :external_link, html_dl: true) %> + <%= presenter.attribute_to_html(:resource_type, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:source, html_dl: true) %> + <%= presenter.attribute_to_html(:rights_statement, render_as: :rights_statement, html_dl: true) %> + <%= presenter.attribute_to_html(:doi, render_as: :external_link, html_dl: true) if respond_to?(:render_doi?) && render_doi?(presenter) %> +<% end %> diff --git a/app/views/hyrax/dashboard/collections/_list_collections.html.erb b/app/views/hyrax/dashboard/collections/_list_collections.html.erb index cd09d7e71..02cf74b50 100644 --- a/app/views/hyrax/dashboard/collections/_list_collections.html.erb +++ b/app/views/hyrax/dashboard/collections/_list_collections.html.erb @@ -58,6 +58,9 @@ <% if !current_ability.admin? %> <%= collection_presenter.managed_access %> <% end %> + <% if Hyrax.config.flexible? %> + <%= collection_presenter.schema_version.to_f if collection_presenter.schema_version %> + <% end %> <%= collection_presenter.collection_type_badge %> diff --git a/app/views/hyrax/dashboard/sidebar/_configuration.html.erb b/app/views/hyrax/dashboard/sidebar/_configuration.html.erb index dc44c82a8..529aad365 100644 --- a/app/views/hyrax/dashboard/sidebar/_configuration.html.erb +++ b/app/views/hyrax/dashboard/sidebar/_configuration.html.erb @@ -1,5 +1,4 @@ <%# OVERRIDE Hyrax v5.0.1 add account settings and title attributes %> - <% if menu.show_configuration? %> <% if can? :manage, Site %> @@ -8,17 +7,14 @@ <%= menu.nav_link(main_app.edit_admin_account_path, class: "nav-link", title: t('hyrax.admin.sidebar.accounts')) do %> <%= t('hyrax.admin.sidebar.accounts') %> <% end %> - <% if Flipflop.show_identity_provider_in_admin_dashboard? %> <%= menu.nav_link(main_app.identity_providers_path, class: 'nav-link', title: t('hyrax.admin.sidebar.identity_provider')) do %> <%= t('hyrax.admin.sidebar.identity_provider') %> <% end %> <% end %> - <%= menu.nav_link(main_app.edit_site_labels_path, class: "nav-link", title: t('hyrax.admin.sidebar.labels')) do %> <%= t('hyrax.admin.sidebar.labels') %> <% end %> - <% if can?(:update, :appearance) %> <%= menu.nav_link(hyrax.admin_appearance_path, class: "nav-link", title: t('hyrax.admin.sidebar.appearance')) do %> <%= t('hyrax.admin.sidebar.appearance') %> @@ -46,18 +42,15 @@ <% end %> <% end %> - <% if Flipflop.show_workflow_roles_menu_item_in_admin_dashboard_sidebar? && can?(:manage, Sipity::WorkflowResponsibility) %> <%= menu.nav_link(hyrax.admin_workflow_roles_path, class: "nav-link", title: t('hyrax.admin.sidebar.workflow_roles')) do %> <%= t('hyrax.admin.sidebar.workflow_roles') %> <% end %> <% end %> - - <% if can?(:update, RolesService) %> + <% if can?(:update, RolesService) %> <%= menu.nav_link(main_app.admin_roles_service_jobs_path, class: "nav-link", title: t('hyrax.admin.sidebar.roles_service_jobs')) do %> <%= t('hyrax.admin.sidebar.roles_service_jobs') %> <% end %> - <% end %> - + <% end %> <%= render 'hyrax/dashboard/sidebar/menu_partials', menu: menu, section: :configuration %> <% end %> diff --git a/app/views/hyrax/dashboard/works/_list_works.html.erb b/app/views/hyrax/dashboard/works/_list_works.html.erb index d39ec5023..f6a52ac75 100644 --- a/app/views/hyrax/dashboard/works/_list_works.html.erb +++ b/app/views/hyrax/dashboard/works/_list_works.html.erb @@ -33,7 +33,9 @@ - + <% if Hyrax.config.flexible? %> + <%= document.schema_version.to_f if document.schema_version %> + <% end %> <%= document.date_modified %> <%= presenter.workflow.state_label %> <%= render_visibility_link document %> diff --git a/app/views/hyrax/etds/_attribute_rows.html.erb b/app/views/hyrax/etds/_attribute_rows.html.erb index bd2a37cde..9b8b42074 100644 --- a/app/views/hyrax/etds/_attribute_rows.html.erb +++ b/app/views/hyrax/etds/_attribute_rows.html.erb @@ -1,27 +1,40 @@ -<%= presenter.attribute_to_html(:admin_note, html_dl: true) if presenter.editor? %> -<%= presenter.attribute_to_html(:creator, render_as: :faceted, label: label_for(term: :creator, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:contributor, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:subject, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:publisher, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:abstract, html_dl: true) %> -<%= presenter.attribute_to_html(:language, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:identifier, render_as: :linked, search_field: 'identifier_tesim', html_dl: true) %> -<%= presenter.attribute_to_html(:keyword, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:date_created, render_as: :linked, search_field: 'date_created_tesim', label: label_for(term: :date_created, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:based_near_label, html_dl: true) %> -<%= presenter.attribute_to_html(:related_url, render_as: :external_link, html_dl: true, label: 'Related URL') %> -<%= presenter.attribute_to_html(:resource_type, render_as: :faceted, label: label_for(term: :resource_type, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:source, html_dl: true) %> -<%= presenter.attribute_to_html(:bibliographic_citation, html_dl: true) %> -<%= presenter.attribute_to_html(:rights_statement, label: label_for(term: :rights_statement, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:additional_information, html_dl: true) %> -<%= presenter.attribute_to_html(:rights_notes, render_as: :linked, html_dl: true) %> -<%= presenter.attribute_to_html(:extent) %> -<%= presenter.attribute_to_html(:format, label: label_for(term: :format, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:degree_name, label: label_for(term: :degree_name, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:degree_level, label: label_for(term: :degree_level, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:degree_discipline, label: label_for(term: :degree_discipline, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:degree_grantor, label: label_for(term: :degree_grantor, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:advisor, label: label_for(term: :advisor, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:committee_member, label: label_for(term: :committee_member, record_class: Etd), html_dl: true) %> -<%= presenter.attribute_to_html(:department, label: label_for(term: :department, record_class: Etd), html_dl: true) %> +<%# OVERRIDE hyrax-doi to support dynamic metadata %> +<%# TODO: remove after hyrax-doi gem v0.2.0 and code is removed %> +<%# hyrax-doi doesn't work post hyrax v3.0.0 %> +<% if Hyrax.config.flexible? %> + <% view_options_for(presenter).each do |field, options| %> + <% if field == :admin_note %> + <%= presenter.attribute_to_html(:admin_note, options) if presenter.editor? %> + <% else %> + <%= presenter.attribute_to_html(conform_field(field, options), conform_options(field, options)) %> + <% end %> + <% end %> + <% else %> + <%= presenter.attribute_to_html(:admin_note, html_dl: true) if presenter.editor? %> + <%= presenter.attribute_to_html(:creator, render_as: :faceted, label: label_for(term: :creator, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:contributor, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:subject, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:publisher, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:abstract, html_dl: true) %> + <%= presenter.attribute_to_html(:language, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:identifier, render_as: :linked, search_field: 'identifier_tesim', html_dl: true) %> + <%= presenter.attribute_to_html(:keyword, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:date_created, render_as: :linked, search_field: 'date_created_tesim', label: label_for(term: :date_created, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:based_near_label, html_dl: true) %> + <%= presenter.attribute_to_html(:related_url, render_as: :external_link, html_dl: true, label: 'Related URL') %> + <%= presenter.attribute_to_html(:resource_type, render_as: :faceted, label: label_for(term: :resource_type, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:source, html_dl: true) %> + <%= presenter.attribute_to_html(:bibliographic_citation, html_dl: true) %> + <%= presenter.attribute_to_html(:rights_statement, label: label_for(term: :rights_statement, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:additional_information, html_dl: true) %> + <%= presenter.attribute_to_html(:rights_notes, render_as: :linked, html_dl: true) %> + <%= presenter.attribute_to_html(:extent) %> + <%= presenter.attribute_to_html(:format, label: label_for(term: :format, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:degree_name, label: label_for(term: :degree_name, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:degree_level, label: label_for(term: :degree_level, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:degree_discipline, label: label_for(term: :degree_discipline, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:degree_grantor, label: label_for(term: :degree_grantor, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:advisor, label: label_for(term: :advisor, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:committee_member, label: label_for(term: :committee_member, record_class: Etd), html_dl: true) %> + <%= presenter.attribute_to_html(:department, label: label_for(term: :department, record_class: Etd), html_dl: true) %> + <% end %> \ No newline at end of file diff --git a/app/views/hyrax/my/collections/_list_collections.html.erb b/app/views/hyrax/my/collections/_list_collections.html.erb index 893942d2c..1960c21a1 100644 --- a/app/views/hyrax/my/collections/_list_collections.html.erb +++ b/app/views/hyrax/my/collections/_list_collections.html.erb @@ -58,6 +58,9 @@ + <% if Hyrax.config.flexible? %> + <%= collection_presenter.schema_version.to_f if collection_presenter.schema_version %> + <% end %> <%= collection_presenter.collection_type_badge %> diff --git a/app/views/hyrax/my/works/_list_works.html.erb b/app/views/hyrax/my/works/_list_works.html.erb index 545404058..8a70869fd 100644 --- a/app/views/hyrax/my/works/_list_works.html.erb +++ b/app/views/hyrax/my/works/_list_works.html.erb @@ -28,6 +28,9 @@ + <% if Hyrax.config.flexible? %> + <%= document.schema_version.to_f if document.schema_version %> + <% end %> <%= document.date_modified %> diff --git a/app/views/hyrax/oers/_attribute_rows.html.erb b/app/views/hyrax/oers/_attribute_rows.html.erb index eea43464c..58adeb0cf 100644 --- a/app/views/hyrax/oers/_attribute_rows.html.erb +++ b/app/views/hyrax/oers/_attribute_rows.html.erb @@ -1,31 +1,44 @@ -<%= presenter.attribute_to_html(:admin_note, html_dl: true) if presenter.editor? %> -<%= presenter.attribute_to_html(:title, html_dl: true) %> -<%= presenter.attribute_to_html(:alternative_title, html_dl: true) %> -<%= presenter.attribute_to_html(:creator, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:contributor, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:related_url, render_as: :external_link, html_dl: true, label: 'Related URL') %> -<%= presenter.attribute_to_html(:learning_resource_type, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:abstract, html_dl: true) %> -<%= presenter.attribute_to_html(:education_level, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:audience, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:discipline, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:date_created, html_dl: true) %> -<%= presenter.attribute_to_html(:table_of_contents, html_dl: true) %> -<%= presenter.attribute_to_html(:subject, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:based_near_label, html_dl: true) %> -<%= presenter.attribute_to_html(:rights_statement, render_as: :rights_statement, html_dl: true) %> -<%= presenter.attribute_to_html(:license, render_as: :license, html_dl: true) %> -<%= presenter.attribute_to_html(:rights_holder, render_as: :linked, html_dl: true) %> -<%= presenter.attribute_to_html(:rights_notes, render_as: :linked, html_dl: true) %> -<%= presenter.attribute_to_html(:additional_information, html_dl: true) %> -<%= presenter.attribute_to_html(:language, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:oer_size, label: t('simple_form.labels.default.size'), html_dl: true) %> -<%= presenter.attribute_to_html(:publisher, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:identifier, search_field: 'identifier_tesim', html_dl: true) %> -<%= presenter.attribute_to_html(:resource_type, label: t("hyrax.oer.labels.resource_type"), render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:accessibility_feature, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:accessibility_hazard, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:accessibility_summary, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:keyword, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:source, html_dl: true) %> -<%= presenter.attribute_to_html(:bibliographic_citation, html_dl: true) %> \ No newline at end of file +<%# OVERRIDE hyrax-doi to support dynamic metadata %> +<%# TODO: remove after hyrax-doi gem v0.2.0 and code is removed %> +<%# hyrax-doi doesn't work post hyrax v3.0.0 %> +<% if Hyrax.config.flexible? %> + <% view_options_for(presenter).each do |field, options| %> + <% if field == :admin_note %> + <%= presenter.attribute_to_html(:admin_note, options) if presenter.editor? %> + <% else %> + <%= presenter.attribute_to_html(conform_field(field, options), conform_options(field, options)) %> + <% end %> + <% end %> +<% else %> + <%= presenter.attribute_to_html(:admin_note, html_dl: true) if presenter.editor? %> + <%= presenter.attribute_to_html(:title, html_dl: true) %> + <%= presenter.attribute_to_html(:alternative_title, html_dl: true) %> + <%= presenter.attribute_to_html(:creator, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:contributor, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:related_url, render_as: :external_link, html_dl: true, label: 'Related URL') %> + <%= presenter.attribute_to_html(:learning_resource_type, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:abstract, html_dl: true) %> + <%= presenter.attribute_to_html(:education_level, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:audience, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:discipline, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:date_created, html_dl: true) %> + <%= presenter.attribute_to_html(:table_of_contents, html_dl: true) %> + <%= presenter.attribute_to_html(:subject, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:based_near_label, html_dl: true) %> + <%= presenter.attribute_to_html(:rights_statement, render_as: :rights_statement, html_dl: true) %> + <%= presenter.attribute_to_html(:license, render_as: :license, html_dl: true) %> + <%= presenter.attribute_to_html(:rights_holder, render_as: :linked, html_dl: true) %> + <%= presenter.attribute_to_html(:rights_notes, render_as: :linked, html_dl: true) %> + <%= presenter.attribute_to_html(:additional_information, html_dl: true) %> + <%= presenter.attribute_to_html(:language, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:oer_size, label: t('simple_form.labels.default.size'), html_dl: true) %> + <%= presenter.attribute_to_html(:publisher, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:identifier, search_field: 'identifier_tesim', html_dl: true) %> + <%= presenter.attribute_to_html(:resource_type, label: t("hyrax.oer.labels.resource_type"), render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:accessibility_feature, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:accessibility_hazard, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:accessibility_summary, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:keyword, render_as: :faceted, html_dl: true) %> + <%= presenter.attribute_to_html(:source, html_dl: true) %> + <%= presenter.attribute_to_html(:bibliographic_citation, html_dl: true) %> +<% end %> diff --git a/config/initializers/wings.rb b/config/initializers/wings.rb index 00928f0dc..ed4058a14 100644 --- a/config/initializers/wings.rb +++ b/config/initializers/wings.rb @@ -87,11 +87,6 @@ ].each do |handler| Hyrax.query_service.services[1].custom_queries.register_query_handler(handler) end - - Wings::ModelRegistry.register(GenericWorkResource, GenericWork) - Wings::ModelRegistry.register(ImageResource, Image) - Wings::ModelRegistry.register(EtdResource, Etd) - Wings::ModelRegistry.register(OerResource, Oer) end Rails.application.config.to_prepare do diff --git a/config/locales/hyrax.en.yml b/config/locales/hyrax.en.yml index a061e061e..a248176b5 100644 --- a/config/locales/hyrax.en.yml +++ b/config/locales/hyrax.en.yml @@ -707,6 +707,7 @@ en: highlighted: Highlighted items: Items last_modified: Last modified + profile_version: Profile Version title: Title type: Type visibility: Visibility diff --git a/config/metadata_profiles/m3_profile.yaml b/config/metadata_profiles/m3_profile.yaml new file mode 100644 index 000000000..426886747 --- /dev/null +++ b/config/metadata_profiles/m3_profile.yaml @@ -0,0 +1,1781 @@ +--- +m3_version: 1.0.beta2 +profile: + date_modified: '2024-06-01' + responsibility: https://samvera.org + responsibility_statement: Hyku Initial Profile + type: Hyku Initial Profile + version: 1 +classes: + GenericWorkResource: + display_label: Generic Work + ImageResource: + display_label: Image + OerResource: + display_label: OER + EtdResource: + display_label: ETD + AdminSetResource: + display_label: AdminSetResource + CollectionResource: + display_label: pcdmcollection + Hyrax::AdministrativeSet: + display_label: Administrative Set + Hyrax::FileSet: + display_label: FileSet + Hyrax::PcdmCollection: + display_label: PcdmCollection +contexts: + flexible_context: + display_label: Flexible Metadata Example + special_context: + display_label: Special Context +mappings: + blacklight: + name: Additional Blacklight Solr Mappings + metatags: + name: Metatags + mods_oai_pmh: + name: MODS OAI PMH + qualified_dc_pmh: + name: Qualified DC OAI PMH + simple_dc_pmh: + name: Simple DC OAI PMH +properties: + title: + available_on: + class: + - AdminSetResource + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 1 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + definition: + default: Enter a standardized title for display. If only one title is needed, + transcribe the title from the source itself. + display_label: + default: Title + index_documentation: displayable, searchable + indexing: + - title_sim + - title_tesim + form: + required: true + primary: true + multi_value: true + mappings: + metatags: twitter:title, og:title + mods_oai_pmh: mods:titleInfo/mods:title + qualified_dc_pmh: dcterms:title + simple_dc_pmh: dc:title + property_uri: http://purl.org/dc/terms/title + range: http://www.w3.org/2001/XMLSchema#string + requirement: required + sample_values: + - Pencil drawn portrait study of woman + view: + label: + en: 'Title' + es: 'Título' + html_dl: true + date_modified: + available_on: + class: + - AdminSetResource + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + display_label: + default: Date Modified + property_uri: http://purl.org/dc/terms/modified + range: http://www.w3.org/2001/XMLSchema#dateTime + sample_values: + - '2024-06-06 21:06:51 +0000' + view: + label: + de: 'Zuletzt geändert' + en: 'Last modified' + es: 'Última modificación' + fr: 'Dernière modification' + it: 'Ultima modifica' + pt-BR: 'Última modificação' + zh: '最新修改' + html_dl: true + date_uploaded: + available_on: + class: + - AdminSetResource + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + display_label: + default: Date Uploaded + property_uri: http://purl.org/dc/terms/dateSubmitted + range: http://www.w3.org/2001/XMLSchema#dateTime + sample_values: + - '2024-06-06 21:06:51 +0000' + depositor: + available_on: + class: + - AdminSetResource + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Depositor + index_documentation: searchable + indexing: + - depositor_tesim + property_uri: http://id.loc.gov/vocabulary/relators/dpt + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Julie Allinson + creator: + available_on: + class: + - AdminSetResource + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 1 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Creator + index_documentation: displayable, searchable + indexing: + - creator_sim + - creator_tesim + form: + required: true + primary: true + property_uri: http://purl.org/dc/elements/1.1/creator + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Julie Allinson + view: + render_as: "faceted" + html_dl: true + license: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: License + index_documentation: displayable, searchable + indexing: + - license_sim + - license_tesim + form: + primary: false + property_uri: http://purl.org/dc/terms/license + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - http://creativecommons.org/licenses/by/3.0/us/ + view: + render_as: "external_link" + html_dl: true + abstract: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Abstract + index_documentation: displayable, searchable + indexing: + - abstract_sim + - abstract_tesim + form: + primary: false + property_uri: http://purl.org/dc/terms/abstract + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - This is an abstract. + view: + html_dl: true + access_right: + available_on: + class: + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Access Right + index_documentation: displayable, searchable + indexing: + - access_right_sim + - access_right_tesim + form: + primary: false + property_uri: http://purl.org/dc/terms/accessRights + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Open Access + view: + html_dl: true + alternative_title: + available_on: + class: + - AdminSetResource + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Alternative Title + index_documentation: displayable, searchable + indexing: + - alternative_title_sim + - alternative_title_tesim + form: + primary: false + property_uri: http://purl.org/dc/terms/alternative + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Alternate Title Example + view: + label: + en: 'Alternative Title' + es: 'Título Alternativo' + html_dl: true + arkivo_checksum: + available_on: + class: + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Arkivo Checksum + form: + primary: false + property_uri: http://scholarsphere.psu.edu/ns#arkivoChecksum + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - c0855931b7f1aefedb91d31af76873c0 + based_near: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Location + index_documentation: displayable, searchable + indexing: + - based_near_sim + - based_near_tesim + form: + primary: false + property_uri: http://xmlns.com/foaf/0.1/based_near + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - San Diego, California, United States + view: + label: Based Near + html_dl: true + bibliographic_citation: + available_on: + class: + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Bibliographic Citation + index_documentation: displayable, searchable + indexing: + - bibliographic_citation_sim + - bibliographic_citation_tesim + form: + primary: false + property_uri: http://purl.org/dc/terms/bibliographicCitation + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Doe, J. (2024). Example Citation. Journal of Examples, 12(3), 45-67. + view: + html_dl: true + contributor: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Contributor + index_documentation: displayable, searchable + indexing: + - contributor_tesim + - contributor_sim + form: + primary: false + property_uri: http://purl.org/dc/elements/1.1/contributor + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Julie Allinson + view: + render_as: "faceted" + html_dl: true + date_created: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#dateTime + sources: + - 'null' + display_label: + default: Date Created + index_documentation: displayable, searchable + indexing: + - date_created_sim + - date_created_tesim + form: + primary: false + property_uri: http://purl.org/dc/terms/created + range: http://www.w3.org/2001/XMLSchema#dateTime + sample_values: + - '2024-06-06 21:06:51 +0000' + view: + render_as: "linked" + search_field: 'date_created_tesim' + html_dl: true + description: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Description + index_documentation: displayable, searchable + indexing: + - description_sim + - description_tesim + form: + primary: false + property_uri: http://purl.org/dc/elements/1.1/description + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - This is a description. + identifier: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Identifier + index_documentation: displayable, searchable + indexing: + - identifier_sim + - identifier_tesim + form: + primary: false + property_uri: http://purl.org/dc/terms/identifier + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - abc123 + view: + render_as: "linked" + search_field: 'identifier_tesim' + html_dl: true + import_url: + available_on: + class: + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Import URL + property_uri: http://scholarsphere.psu.edu/ns#importUrl + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - http://example.com/resource1 + keyword: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Keyword + index_documentation: displayable, searchable + indexing: + - keyword_sim + - keyword_tesim + form: + primary: false + property_uri: http://schema.org/keywords + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Metadata + - Repository + view: + render_as: "faceted" + html_dl: true + label: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Label + index_documentation: displayable, searchable + indexing: + - label_sim + - label_tesim + form: + primary: false + property_uri: info:fedora/fedora-system:def/model#downloadFilename + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - file_label.txt + language: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Language + index_documentation: displayable, searchable + indexing: + - language_sim + - language_tesim + form: + primary: false + property_uri: http://purl.org/dc/elements/1.1/language + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - English + - Spanish + view: + render_as: "faceted" + html_dl: true + publisher: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Publisher + index_documentation: displayable, searchable + indexing: + - publisher_sim + - publisher_tesim + form: + primary: false + property_uri: http://purl.org/dc/elements/1.1/publisher + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Scholastic + view: + render_as: "faceted" + html_dl: true + related_url: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Related URL + index_documentation: displayable, searchable + indexing: + - related_url_sim + - related_url_tesim + form: + primary: false + property_uri: http://www.w3.org/2000/01/rdf-schema#seeAlso + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - http://example.com/resource1 + view: + render_as: "external_link" + html_dl: true + relative_path: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Relative Path + property_uri: http://scholarsphere.psu.edu/ns#relativePath + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - "/path/to/resource" + resource_type: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Resource Type + index_documentation: displayable, searchable + indexing: + - resource_type_sim + - resource_type_tesim + form: + primary: false + property_uri: http://purl.org/dc/terms/type + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Article + - Conference Proceeding + view: + render_as: "faceted" + html_dl: true + rights_notes: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Rights Notes + index_documentation: displayable, searchable + indexing: + - rights_notes_sim + - rights_notes_tesim + form: + primary: false + property_uri: http://purl.org/dc/elements/1.1/rights + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Creative Commons license. + view: + html_dl: true + rights_statement: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Rights Statement + index_documentation: displayable, searchable + indexing: + - rights_statement_sim + - rights_statement_tesim + form: + primary: true + required: true + property_uri: http://www.europeana.eu/schemas/edm/rights + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - http://rightsstatements.org/vocab/InC/1.0/ + view: + html_dl: true + render_as: "rights_statement" + source: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Source + index_documentation: displayable, searchable + indexing: + - source_sim + - source_tesim + form: + primary: false + property_uri: http://purl.org/dc/terms/source + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Original Manuscript + - Digital Archive + view: + html_dl: true + subject: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Subject + index_documentation: displayable, searchable + indexing: + - subject_sim + - subject_tesim + form: + primary: false + property_uri: http://purl.org/dc/elements/1.1/subject + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Art + - Science + view: + render_as: "faceted" + html_dl: true + department: + available_on: + class: + - CollectionResource + - EtdResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Department + form: + primary: true + property_uri: http://hyrax-example.com/department + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Mathematics + - History + view: + html_dl: true + course: + available_on: + class: + - CollectionResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Course + form: + primary: false + property_uri: http://hyrax-example.com/course + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Computer Science 50 + view: + html_dl: true + format: + available_on: + class: + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Format + index_documentation: searchable + indexing: + - 'format_tesim' + form: + required: false + primary: false + multiple: true + property_uri: http://purl.org/dc/terms/format + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - PDF + # Image-specific metadata from image_resource.yaml + extent: + available_on: + class: + - ImageResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Extent + index_documentation: searchable + indexing: + - 'extent_tesim' + form: + required: false + primary: false + multiple: true + property_uri: http://purl.org/dc/terms/extent + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - "300 dpi" + - "1024x768 pixels" + # OER-specific metadata from oer_resource.yaml + accessibility_feature: + available_on: + class: + - OerResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Accessibility Feature + index_documentation: displayable, searchable + indexing: + - 'accessibility_feature_tesim' + - 'accessibility_feature_sim' + form: + primary: false + multiple: true + property_uri: http://schema.org/accessibilityFeature + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Subtitles + - Audio Description + - Transcripts + accessibility_hazard: + available_on: + class: + - OerResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Accessibility Hazard + index_documentation: displayable, searchable + indexing: + - 'accessibility_hazard_tesim' + - 'accessibility_hazard_sim' + form: + primary: false + multiple: true + property_uri: http://schema.org/accessibilityHazard + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Motion Simulation + accessibility_summary: + available_on: + class: + - OerResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Accessibility Summary + index_documentation: displayable, searchable + indexing: + - 'accessibility_summary_tesim' + - 'accessibility_summary_sim' + form: + primary: false + multiple: false + property_uri: http://schema.org/accessibilitySummary + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - This resource includes subtitles for all video content. + - The resource provides text descriptions for all images. + admin_note: + available_on: + class: + - OerResource + - EtdResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Admin Note + index_documentation: searchable + indexing: + - 'admin_note_tesim' + form: + primary: false + multiple: false + property_uri: http://schema.org/positiveNotes + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - This is an admin note. + - Another example of an admin note. + view: + html_dl: true + additional_information: + available_on: + class: + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Additional Information + index_documentation: searchable + indexing: + - 'additional_information_tesim' + form: + primary: false + multiple: true + property_uri: http://purl.org/dc/terms/accessRights + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - This is some additional information. + - More details and context. + alternate_version_id: + available_on: + class: + - OerResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Alternate Version ID + index_documentation: displayable, searchable + indexing: + - 'alternate_version_id_tesim' + - 'alternate_version_id_sim' + property_uri: http://purl.org/dc/terms/hasVersion + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - alt_version_1 + - alt_version_2 + audience: + available_on: + class: + - OerResource + cardinality: + minimum: 1 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Audience + index_documentation: displayable, searchable + indexing: + - 'audience_tesim' + - 'audience_sim' + form: + required: true + primary: true + property_uri: http://schema.org/EducationalAudience + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Student + - Instructor + view: + html_dl: true + render_as: "faceted" + date: + available_on: + class: + - OerResource + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Date + index_documentation: displayable, searchable + indexing: + - 'date_tesim' + - 'date_sim' + property_uri: https://hykucommons.org/terms/date + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - "2024-06-07" + - "2023-05-12" + discipline: + available_on: + class: + - OerResource + cardinality: + minimum: 1 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Discipline + index_documentation: searchable + indexing: + - 'discipline_tesim' + form: + required: true + primary: true + property_uri: https://hykucommons.org/terms/degree_discipline + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - "Languages - Spanish" + - "Natural Sciences - Physics" + view: + html_dl: true + render_as: "faceted" + education_level: + available_on: + class: + - OerResource + cardinality: + minimum: 1 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Education Level + index_documentation: displayable, searchable + indexing: + - 'education_level_tesim' + - 'education_level_sim' + form: + required: true + primary: true + property_uri: http://purl.org/dc/terms/educationLevel + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - "Community college / Lower division" + - "College / Upper division" + view: + html_dl: true + render_as: "faceted" + learning_resource_type: + available_on: + class: + - OerResource + cardinality: + minimum: 1 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Learning Resource Type + index_documentation: displayable, searchable + indexing: + - 'learning_resource_type_tesim' + - 'learning_resource_type_sim' + form: + required: true + primary: true + property_uri: http://schema.org/learningResourceType + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - "Activity/lab" + - "Assessment (test, quizzes, etc.)" + view: + html_dl: true + render_as: "faceted" + newer_version_id: + available_on: + class: + - OerResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Newer Version ID + index_documentation: displayable, searchable + indexing: + - 'newer_version_id_tesim' + - 'newer_version_id_sim' + property_uri: http://purl.org/dc/terms/isReplacedBy + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - new_version_1 + - new_version_2 + oer_size: + available_on: + class: + - OerResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: OER Size + index_documentation: searchable + indexing: + - 'oer_size_tesim' + form: + primary: false + multiple: true + property_uri: http://purl.org/dc/terms/extent + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - 15MB + - 200 pages + previous_version_id: + available_on: + class: + - OerResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Previous Version ID + index_documentation: displayable, searchable + indexing: + - 'previous_version_id_tesim' + - 'previous_version_id_sim' + property_uri: http://purl.org/dc/terms/replaces + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - prev_version_1 + - prev_version_2 + related_item_id: + available_on: + class: + - OerResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Related Item ID + index_documentation: displayable, searchable + indexing: + - 'related_item_id_tesim' + - 'related_item_id_sim' + property_uri: http://purl.org/dc/terms/relation + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - related_item_1 + - related_item_2 + rights_holder: + available_on: + class: + - OerResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Rights Holder + index_documentation: displayable, searchable + indexing: + - 'rights_holder_tesim' + - 'rights_holder_sim' + form: + primary: false + multiple: true + property_uri: http://purl.org/dc/terms/rightsHolder + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - John Doe + - Jane Smith + table_of_contents: + available_on: + class: + - OerResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Table of Contents + index_documentation: searchable + indexing: + - 'table_of_contents_tesim' + form: + primary: false + multiple: true + property_uri: http://purl.org/dc/terms/tableOfContents + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - "Chapter 1: Introduction" + - "Chapter 2: Literature Review" + - "Chapter 3: Methodology" + # ETD-specific metadata - etd_resource.yaml + advisor: + available_on: + class: + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Advisor + index_documentation: searchable + indexing: + - 'advisor_tesim' + form: + required: false + primary: false + multiple: true + property_uri: https://hykucommons.org/terms/advisor + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Dr. John Doe + - Dr. Jane Smith + committee_member: + available_on: + class: + - EtdResource + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Committee Member + index_documentation: searchable + indexing: + - 'committee_member_tesim' + form: + required: false + primary: false + multiple: true + property_uri: https://hykucommons.org/terms/committee_member + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Dr. John Doe + - Dr. Jane Smith + degree_name: + available_on: + class: + - EtdResource + cardinality: + minimum: 1 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Degree Name + index_documentation: searchable + indexing: + - 'degree_name_tesim' + form: + required: true + primary: true + multiple: true + property_uri: https://hykucommons.org/terms/degree_name + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Bachelor of Science + - Master of Arts + view: + html_dl: true + degree_level: + available_on: + class: + - EtdResource + cardinality: + minimum: 1 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Degree Level + index_documentation: searchable + indexing: + - 'degree_level_tesim' + form: + required: true + primary: true + multiple: true + property_uri: https://hykucommons.org/terms/degree_level + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Undergraduate + - Graduate + view: + html_dl: true + degree_discipline: + available_on: + class: + - EtdResource + cardinality: + minimum: 1 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Degree Discipline + index_documentation: searchable + indexing: + - 'degree_discipline_tesim' + form: + required: true + primary: true + multiple: true + property_uri: https://hykucommons.org/terms/degree_discipline + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - Computer Science + - Biology + view: + html_dl: true + degree_grantor: + available_on: + class: + - EtdResource + cardinality: + minimum: 1 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Degree Grantor + index_documentation: searchable + indexing: + - 'degree_grantor_tesim' + form: + required: true + primary: true + multiple: true + property_uri: https://hykucommons.org/terms/degree_grantor + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - University of Example + - Example State University + view: + html_dl: true + # Bulkrax metadata from bulkrax_metadata.yaml + bulkrax_identifier: + available_on: + class: + - Hyrax::FileSet + - CollectionResource + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Bulkrax Identifier + index_documentation: displayable, searchable + indexing: + - 'bulkrax_identifier_tesi' + - 'bulkrax_identifier_ssi' + form: + display: false + primary: false + required: false + multiple: false + property_uri: https://hykucommons.org/terms/bulkrax_identifier + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - example-bulkrax-identifier + # PDF.js metadata from with_pdf_viewer.yaml + show_pdf_viewer: + available_on: + class: + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#bool + sources: + - 'null' + display_label: + default: Show PDF Viewer + index_documentation: displayable, searchable + indexing: + - 'show_pdf_viewer_bsi' + form: + display: false + primary: false + required: false + multiple: false + property_uri: http://id.loc.gov/vocabulary/identifiers/show_pdf_viewer + range: http://www.w3.org/2001/XMLSchema#bool + sample_values: + - "0" + - "1" + show_pdf_download_button: + available_on: + class: + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#bool + sources: + - 'null' + display_label: + default: Show PDF Download Button + index_documentation: displayable, searchable + indexing: + - 'show_pdf_download_button_bsi' + form: + display: false + primary: false + required: false + multiple: false + property_uri: http://id.loc.gov/vocabulary/identifiers/show_pdf_download_button + range: http://www.w3.org/2001/XMLSchema#bool + sample_values: + - "0" + - "1" + # Video Embed metadata - with_video_embed.yaml + video_embed: + available_on: + class: + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Video Embed + index_documentation: searchable + indexing: + - 'video_embed_tesi' + form: + display: true + primary: false + required: false + multiple: false + property_uri: https://atla.com/terms/video_embed + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - "https://player.vimeo.com/video/467264493?h=b089de0eab" + - "https://www.youtube.com/embed/Znf73dsFdC8" + # IiifPrint metadata - child_works_from_pdf_splitting.yaml + is_child: + available_on: + class: + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#bool + sources: + - 'null' + display_label: + default: Is Child + index_documentation: displayable, searchable + indexing: + - 'is_child_bsi' + form: + display: false + required: false + primary: false + multiple: false + property_uri: http://id.loc.gov/vocabulary/identifiers/isChild + range: http://www.w3.org/2001/XMLSchema#bool + sample_values: + - true + - false + split_from_pdf_id: + available_on: + class: + - GenericWorkResource + - ImageResource + - OerResource + - EtdResource + cardinality: + minimum: 0 + maximum: 1 + multi_value: false + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Split from PDF ID + index_documentation: searchable + indexing: + - 'split_from_pdf_id_ssi' + form: + display: false + required: false + primary: false + multiple: false + property_uri: http://id.loc.gov/vocabulary/identifiers/splitFromPdfId + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - example-split-from-pdf-id + dimensions: + available_on: + class: + - ImageResource + context: + - special_context + cardinality: + minimum: 0 + multi_value: true + controlled_values: + format: http://www.w3.org/2001/XMLSchema#string + sources: + - 'null' + display_label: + default: Dimensions + index_documentation: displayable, searchable + indexing: + - dimensions_sim + - dimensions_tesim + form: + primary: false + property_uri: http://purl.org/dc/terms/format + range: http://www.w3.org/2001/XMLSchema#string + sample_values: + - 50" x 20" + - 5 m x 10 m x 8 m + view: + render_as: "faceted" + html_dl: true diff --git a/config/routes.rb b/config/routes.rb index 49dc6a798..bb7e81e45 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -159,4 +159,12 @@ post "/dashboard/collections/:id/delete_uploaded_thumbnail", to: "hyrax/dashboard/collections#delete_uploaded_thumbnail", as: :delete_uploaded_thumbnail + + if ENV.fetch('HYRAX_FLEXIBLE', false) + # Metadata profiles routes + resources :metadata_profiles, except: [:update, :show, :destroy] do + collection { post :import } + get 'export' + end + end end diff --git a/db/migrate/20240606205215_create_hyrax_flexible_schemas.rb b/db/migrate/20240606205215_create_hyrax_flexible_schemas.rb new file mode 100644 index 000000000..f74968dfb --- /dev/null +++ b/db/migrate/20240606205215_create_hyrax_flexible_schemas.rb @@ -0,0 +1,11 @@ +class CreateHyraxFlexibleSchemas < ActiveRecord::Migration[6.1] + def change + unless table_exists?(:hyrax_flexible_schemas) + create_table :hyrax_flexible_schemas do |t| + t.text :profile + + t.timestamps + end + end + end +end diff --git a/db/migrate/20240606205216_add_contexts_to_hyrax_flexible_schemas.hyrax.rb b/db/migrate/20240606205216_add_contexts_to_hyrax_flexible_schemas.hyrax.rb new file mode 100644 index 000000000..09efc63f3 --- /dev/null +++ b/db/migrate/20240606205216_add_contexts_to_hyrax_flexible_schemas.hyrax.rb @@ -0,0 +1,5 @@ +class AddContextsToHyraxFlexibleSchemas < ActiveRecord::Migration[6.1] + def change + add_column :hyrax_flexible_schemas, :contexts, :text + end +end diff --git a/db/schema.rb b/db/schema.rb index 961c8652a..4ae656c56 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -414,6 +414,13 @@ t.datetime "updated_at", null: false end + create_table "hyrax_flexible_schemas", force: :cascade do |t| + t.text "profile" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.text "contexts" + end + create_table "hyrax_groups", id: :serial, force: :cascade do |t| t.string "name" t.text "description" diff --git a/db/seeds.rb b/db/seeds.rb index 5d1829e6d..d4d1b3a0b 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -36,6 +36,11 @@ next if Site.instance.available_works.present? Site.instance.available_works = Hyrax.config.registered_curation_concern_types Site.instance.save + + if Hyrax.config.flexible? + puts "\n== Loading basic metadata profile" + Hyrax::RequiredDataSeeders::FlexibleProfileSeeder.generate_seeds(logger: Logger.new(STDOUT)) + end end if ENV['INITIAL_ADMIN_EMAIL'] && ENV['INITIAL_ADMIN_PASSWORD'] diff --git a/ops/demo-deploy.tmpl.yaml b/ops/demo-deploy.tmpl.yaml index 0b83bf316..1b335b0db 100644 --- a/ops/demo-deploy.tmpl.yaml +++ b/ops/demo-deploy.tmpl.yaml @@ -125,6 +125,8 @@ extraEnvVars: &envVars value: "false" - name: HYRAX_FITS_PATH value: /app/fits/fits.sh + - name: HYRAX_FLEXIBLE + value: "true" - name: HYRAX_VALKYRIE value: "true" - name: HYKU_ADMIN_HOST diff --git a/ops/staging-deploy.tmpl.yaml b/ops/staging-deploy.tmpl.yaml index f62dea2c1..41fdd5ffd 100644 --- a/ops/staging-deploy.tmpl.yaml +++ b/ops/staging-deploy.tmpl.yaml @@ -125,6 +125,8 @@ extraEnvVars: &envVars value: "false" - name: HYRAX_FITS_PATH value: /app/fits/fits.sh + - name: HYRAX_FLEXIBLE + value: "true" - name: HYRAX_VALKYRIE value: "true" - name: HYKU_ADMIN_HOST