-
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.
Merge pull request #271 from scientist-softserv/add-unca-work-type
- Loading branch information
Showing
9 changed files
with
422 additions
and
1,583 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
# 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(:unca_work) | ||
# 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 UncaWork` | ||
class UncaWorkIndexer < Hyrax::Indexers::PcdmObjectIndexer(UncaWork) | ||
include Hyrax::Indexer(:unca_work) | ||
|
||
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,7 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource UncaWork` | ||
class UncaWork < Hyrax::Work | ||
include Hyrax::Schema(:unca_work) | ||
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
# OVERRIDE Hyku to delegate Mobius properties | ||
|
||
Hyku::WorkShowPresenter.delegate :rights, :relation, :coverage, :file_format, to: :solr_document | ||
# OVERRIDE Hyku to delegate Unca property :date_published | ||
Hyku::WorkShowPresenter.delegate :rights, :relation, :coverage, :file_format, :date_published, to: :solr_document |
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
Oops, something went wrong.