-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit will run the follow commands: ```sh rails g hyrax:work_resource AssetResource rails g hyrax:work_resource PhysicalInstantiationResource rails g hyrax:work_resource DigitalInstantiationResource rails g hyrax:work_resource EssenceTrackResource rails g hyrax:work_resource ContributionResource ``` This will generate new Valkyrie works for each of the existing work types. Note: Because of dual booting I had to prepend `DEPENDENCIES_NEXT=1`
- Loading branch information
Showing
46 changed files
with
595 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource AssetResource` | ||
module Hyrax | ||
# Generated controller for AssetResource | ||
class AssetResourcesController < ApplicationController | ||
# Adds Hyrax behaviors to the controller. | ||
include Hyrax::WorksControllerBehavior | ||
include Hyrax::BreadcrumbsForWorks | ||
self.curation_concern_type = ::AssetResource | ||
|
||
# Use a Valkyrie aware form service to generate Valkyrie::ChangeSet style | ||
# forms. | ||
self.work_form_service = Hyrax::FormFactory.new | ||
end | ||
end |
17 changes: 17 additions & 0 deletions
17
app/controllers/hyrax/contribution_resources_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource ContributionResource` | ||
module Hyrax | ||
# Generated controller for ContributionResource | ||
class ContributionResourcesController < ApplicationController | ||
# Adds Hyrax behaviors to the controller. | ||
include Hyrax::WorksControllerBehavior | ||
include Hyrax::BreadcrumbsForWorks | ||
self.curation_concern_type = ::ContributionResource | ||
|
||
# Use a Valkyrie aware form service to generate Valkyrie::ChangeSet style | ||
# forms. | ||
self.work_form_service = Hyrax::FormFactory.new | ||
end | ||
end |
17 changes: 17 additions & 0 deletions
17
app/controllers/hyrax/digital_instantiation_resources_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource DigitalInstantiationResource` | ||
module Hyrax | ||
# Generated controller for DigitalInstantiationResource | ||
class DigitalInstantiationResourcesController < ApplicationController | ||
# Adds Hyrax behaviors to the controller. | ||
include Hyrax::WorksControllerBehavior | ||
include Hyrax::BreadcrumbsForWorks | ||
self.curation_concern_type = ::DigitalInstantiationResource | ||
|
||
# Use a Valkyrie aware form service to generate Valkyrie::ChangeSet style | ||
# forms. | ||
self.work_form_service = Hyrax::FormFactory.new | ||
end | ||
end |
17 changes: 17 additions & 0 deletions
17
app/controllers/hyrax/essence_track_resources_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource EssenceTrackResource` | ||
module Hyrax | ||
# Generated controller for EssenceTrackResource | ||
class EssenceTrackResourcesController < ApplicationController | ||
# Adds Hyrax behaviors to the controller. | ||
include Hyrax::WorksControllerBehavior | ||
include Hyrax::BreadcrumbsForWorks | ||
self.curation_concern_type = ::EssenceTrackResource | ||
|
||
# Use a Valkyrie aware form service to generate Valkyrie::ChangeSet style | ||
# forms. | ||
self.work_form_service = Hyrax::FormFactory.new | ||
end | ||
end |
17 changes: 17 additions & 0 deletions
17
app/controllers/hyrax/physical_instantiation_resources_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource PhysicalInstantiationResource` | ||
module Hyrax | ||
# Generated controller for PhysicalInstantiationResource | ||
class PhysicalInstantiationResourcesController < ApplicationController | ||
# Adds Hyrax behaviors to the controller. | ||
include Hyrax::WorksControllerBehavior | ||
include Hyrax::BreadcrumbsForWorks | ||
self.curation_concern_type = ::PhysicalInstantiationResource | ||
|
||
# Use a Valkyrie aware form service to generate Valkyrie::ChangeSet style | ||
# forms. | ||
self.work_form_service = Hyrax::FormFactory.new | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource AssetResource` | ||
# | ||
# @see https://github.com/samvera/hyrax/wiki/Hyrax-Valkyrie-Usage-Guide#forms | ||
# @see https://github.com/samvera/valkyrie/wiki/ChangeSets-and-Dirty-Tracking | ||
class AssetResourceForm < Hyrax::Forms::ResourceForm(AssetResource) | ||
include Hyrax::FormFields(:basic_metadata) | ||
include Hyrax::FormFields(:asset_resource) | ||
|
||
# Define custom form fields using the Valkyrie::ChangeSet interface | ||
# | ||
# property :my_custom_form_field | ||
|
||
# if you want a field in the form, but it doesn't have a directly corresponding | ||
# model attribute, make it virtual | ||
# | ||
# property :user_input_not_destined_for_the_model, virtual: true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource ContributionResource` | ||
# | ||
# @see https://github.com/samvera/hyrax/wiki/Hyrax-Valkyrie-Usage-Guide#forms | ||
# @see https://github.com/samvera/valkyrie/wiki/ChangeSets-and-Dirty-Tracking | ||
class ContributionResourceForm < Hyrax::Forms::ResourceForm(ContributionResource) | ||
include Hyrax::FormFields(:basic_metadata) | ||
include Hyrax::FormFields(:contribution_resource) | ||
|
||
# Define custom form fields using the Valkyrie::ChangeSet interface | ||
# | ||
# property :my_custom_form_field | ||
|
||
# if you want a field in the form, but it doesn't have a directly corresponding | ||
# model attribute, make it virtual | ||
# | ||
# property :user_input_not_destined_for_the_model, virtual: true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource DigitalInstantiationResource` | ||
# | ||
# @see https://github.com/samvera/hyrax/wiki/Hyrax-Valkyrie-Usage-Guide#forms | ||
# @see https://github.com/samvera/valkyrie/wiki/ChangeSets-and-Dirty-Tracking | ||
class DigitalInstantiationResourceForm < Hyrax::Forms::ResourceForm(DigitalInstantiationResource) | ||
include Hyrax::FormFields(:basic_metadata) | ||
include Hyrax::FormFields(:digital_instantiation_resource) | ||
|
||
# Define custom form fields using the Valkyrie::ChangeSet interface | ||
# | ||
# property :my_custom_form_field | ||
|
||
# if you want a field in the form, but it doesn't have a directly corresponding | ||
# model attribute, make it virtual | ||
# | ||
# property :user_input_not_destined_for_the_model, virtual: true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource EssenceTrackResource` | ||
# | ||
# @see https://github.com/samvera/hyrax/wiki/Hyrax-Valkyrie-Usage-Guide#forms | ||
# @see https://github.com/samvera/valkyrie/wiki/ChangeSets-and-Dirty-Tracking | ||
class EssenceTrackResourceForm < Hyrax::Forms::ResourceForm(EssenceTrackResource) | ||
include Hyrax::FormFields(:basic_metadata) | ||
include Hyrax::FormFields(:essence_track_resource) | ||
|
||
# Define custom form fields using the Valkyrie::ChangeSet interface | ||
# | ||
# property :my_custom_form_field | ||
|
||
# if you want a field in the form, but it doesn't have a directly corresponding | ||
# model attribute, make it virtual | ||
# | ||
# property :user_input_not_destined_for_the_model, virtual: true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource PhysicalInstantiationResource` | ||
# | ||
# @see https://github.com/samvera/hyrax/wiki/Hyrax-Valkyrie-Usage-Guide#forms | ||
# @see https://github.com/samvera/valkyrie/wiki/ChangeSets-and-Dirty-Tracking | ||
class PhysicalInstantiationResourceForm < Hyrax::Forms::ResourceForm(PhysicalInstantiationResource) | ||
include Hyrax::FormFields(:basic_metadata) | ||
include Hyrax::FormFields(:physical_instantiation_resource) | ||
|
||
# Define custom form fields using the Valkyrie::ChangeSet interface | ||
# | ||
# property :my_custom_form_field | ||
|
||
# if you want a field in the form, but it doesn't have a directly corresponding | ||
# model attribute, make it virtual | ||
# | ||
# property :user_input_not_destined_for_the_model, virtual: true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource AssetResource` | ||
class AssetResourceIndexer < Hyrax::ValkyrieWorkIndexer | ||
include Hyrax::Indexer(:basic_metadata) | ||
include Hyrax::Indexer(:asset_resource) | ||
|
||
# Uncomment this block if you want to add custom indexing behavior: | ||
# def to_solr | ||
# super.tap do |index_document| | ||
# index_document[:my_field_tesim] = resource.my_field.map(&:to_s) | ||
# index_document[:other_field_ssim] = resource.other_field | ||
# end | ||
# end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource ContributionResource` | ||
class ContributionResourceIndexer < Hyrax::ValkyrieWorkIndexer | ||
include Hyrax::Indexer(:basic_metadata) | ||
include Hyrax::Indexer(:contribution_resource) | ||
|
||
# Uncomment this block if you want to add custom indexing behavior: | ||
# def to_solr | ||
# super.tap do |index_document| | ||
# index_document[:my_field_tesim] = resource.my_field.map(&:to_s) | ||
# index_document[:other_field_ssim] = resource.other_field | ||
# end | ||
# end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource DigitalInstantiationResource` | ||
class DigitalInstantiationResourceIndexer < Hyrax::ValkyrieWorkIndexer | ||
include Hyrax::Indexer(:basic_metadata) | ||
include Hyrax::Indexer(:digital_instantiation_resource) | ||
|
||
# Uncomment this block if you want to add custom indexing behavior: | ||
# def to_solr | ||
# super.tap do |index_document| | ||
# index_document[:my_field_tesim] = resource.my_field.map(&:to_s) | ||
# index_document[:other_field_ssim] = resource.other_field | ||
# end | ||
# end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource EssenceTrackResource` | ||
class EssenceTrackResourceIndexer < Hyrax::ValkyrieWorkIndexer | ||
include Hyrax::Indexer(:basic_metadata) | ||
include Hyrax::Indexer(:essence_track_resource) | ||
|
||
# Uncomment this block if you want to add custom indexing behavior: | ||
# def to_solr | ||
# super.tap do |index_document| | ||
# index_document[:my_field_tesim] = resource.my_field.map(&:to_s) | ||
# index_document[:other_field_ssim] = resource.other_field | ||
# end | ||
# end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource PhysicalInstantiationResource` | ||
class PhysicalInstantiationResourceIndexer < Hyrax::ValkyrieWorkIndexer | ||
include Hyrax::Indexer(:basic_metadata) | ||
include Hyrax::Indexer(:physical_instantiation_resource) | ||
|
||
# Uncomment this block if you want to add custom indexing behavior: | ||
# def to_solr | ||
# super.tap do |index_document| | ||
# index_document[:my_field_tesim] = resource.my_field.map(&:to_s) | ||
# index_document[:other_field_ssim] = resource.other_field | ||
# end | ||
# end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource AssetResource` | ||
class AssetResource < Hyrax::Work | ||
include Hyrax::Schema(:basic_metadata) | ||
include Hyrax::Schema(:asset_resource) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource ContributionResource` | ||
class ContributionResource < Hyrax::Work | ||
include Hyrax::Schema(:basic_metadata) | ||
include Hyrax::Schema(:contribution_resource) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource DigitalInstantiationResource` | ||
class DigitalInstantiationResource < Hyrax::Work | ||
include Hyrax::Schema(:basic_metadata) | ||
include Hyrax::Schema(:digital_instantiation_resource) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource EssenceTrackResource` | ||
class EssenceTrackResource < Hyrax::Work | ||
include Hyrax::Schema(:basic_metadata) | ||
include Hyrax::Schema(:essence_track_resource) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource PhysicalInstantiationResource` | ||
class PhysicalInstantiationResource < Hyrax::Work | ||
include Hyrax::Schema(:basic_metadata) | ||
include Hyrax::Schema(:physical_instantiation_resource) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%# This is a search result view %> | ||
<%= render 'catalog/document', document: asset_resource, document_counter: asset_resource_counter %> |
2 changes: 2 additions & 0 deletions
2
app/views/hyrax/contribution_resources/_contribution_resource.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%# This is a search result view %> | ||
<%= render 'catalog/document', document: contribution_resource, document_counter: contribution_resource_counter %> |
2 changes: 2 additions & 0 deletions
2
app/views/hyrax/digital_instantiation_resources/_digital_instantiation_resource.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%# This is a search result view %> | ||
<%= render 'catalog/document', document: digital_instantiation_resource, document_counter: digital_instantiation_resource_counter %> |
2 changes: 2 additions & 0 deletions
2
app/views/hyrax/essence_track_resources/_essence_track_resource.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%# This is a search result view %> | ||
<%= render 'catalog/document', document: essence_track_resource, document_counter: essence_track_resource_counter %> |
2 changes: 2 additions & 0 deletions
2
app/views/hyrax/physical_instantiation_resources/_physical_instantiation_resource.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%# This is a search result view %> | ||
<%= render 'catalog/document', document: physical_instantiation_resource, document_counter: physical_instantiation_resource_counter %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Simple yaml config-driven schema which is used to define model attributes, | ||
# index key names, and form properties. | ||
# | ||
# Attributes must have a type but all other configuration options are optional. | ||
# | ||
# attributes: | ||
# attribute_name: | ||
# type: string | ||
# multiple: false | ||
# index_keys: | ||
# - "attribute_name_sim" | ||
# form: | ||
# required: true | ||
# primary: true | ||
# multiple: false | ||
# | ||
# @see config/metadata/basic_metadata.yaml for an example configuration | ||
# | ||
# Generated via | ||
# `rails generate hyrax:work_resource AssetResource` | ||
|
||
attributes: {} |
Oops, something went wrong.