-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copied all pieces of mobius work type so test in staging because for …
…some reason not working locally
- Loading branch information
1 parent
4f8214b
commit fa1361a
Showing
7 changed files
with
140 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,18 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource UncaWork` | ||
module Hyrax | ||
# Generated controller for UncaWork | ||
class UncaWorksController < ApplicationController | ||
# Adds Hyrax behaviors to the controller. | ||
include Hyrax::WorksControllerBehavior | ||
include Hyku::WorksControllerBehavior | ||
include Hyrax::BreadcrumbsForWorks | ||
self.curation_concern_type = ::UncaWork | ||
|
||
# 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,22 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource UncaWork` | ||
# | ||
# @see https://github.com/samvera/hyrax/wiki/Hyrax-Valkyrie-Usage-Guide#forms | ||
# @see https://github.com/samvera/valkyrie/wiki/ChangeSets-and-Dirty-Tracking | ||
class UncaWorkForm < Hyrax::Forms::PcdmObjectForm(UncaWork) | ||
include Hyrax::FormFields(:basic_metadata) | ||
include Hyrax::FormFields(:unca_work) | ||
include Hyrax::FormFields(:with_pdf_viewer) | ||
include Hyrax::FormFields(:with_video_embed) | ||
include VideoEmbedBehavior::Validation | ||
# 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,19 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource UncaWork` | ||
class UncaWorkIndexer < Hyrax::Indexers::PcdmObjectIndexer(UncaWork) | ||
include Hyrax::Indexer(:basic_metadata) | ||
include Hyrax::Indexer(:unca_work) | ||
include Hyrax::Indexer(:with_pdf_viewer) | ||
include Hyrax::Indexer(:with_video_embed) | ||
|
||
include HykuIndexing | ||
# 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,14 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource UncaWork` | ||
class UncaWork < Hyrax::Work | ||
include Hyrax::Schema(:basic_metadata) | ||
include Hyrax::Schema(:unca_work) | ||
include Hyrax::Schema(:with_pdf_viewer) | ||
include Hyrax::Schema(:with_video_embed) | ||
include Hyrax::ArResource | ||
include Hyrax::NestedWorks | ||
|
||
prepend OrderAlready.for(:creator) | ||
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: unca_work, document_counter: unca_work_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,64 @@ | ||
# 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. | ||
# Please note: If using Valkyrie's Fedora Metadata Adapter, predicates for attributes | ||
# must be placed here. | ||
# | ||
# 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 UncaWork` | ||
|
||
attributes: | ||
rights: | ||
type: string | ||
multiple: true | ||
index_keys: | ||
- "rights_tesim" | ||
form: | ||
required: false | ||
primary: false | ||
multiple: true | ||
predicate: http://purl.org/dc/terms/rightsHolder | ||
relation: | ||
type: string | ||
multiple: true | ||
index_keys: | ||
- "relation_tesim" | ||
form: | ||
required: false | ||
primary: false | ||
multiple: true | ||
predicate: http://purl.org/dc/terms/relation | ||
coverage: | ||
type: string | ||
multiple: true | ||
index_keys: | ||
- "coverage_tesim" | ||
form: | ||
required: false | ||
primary: false | ||
multiple: true | ||
predicate: http://purl.org/dc/terms/coverage | ||
file_format: | ||
type: string | ||
multiple: true | ||
index_keys: | ||
- "file_format_tesim" | ||
form: | ||
required: false | ||
primary: false | ||
multiple: true | ||
predicate: http://purl.org/dc/terms/FileFormat |