Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

SESSION 2: Work Types Workshop [DO NOT MERGE] #2

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

ShanaLMoore
Copy link
Contributor

This branch/PR was created as a progressive walk-through/guide to supplement the Samvera Training Workshop: Work Types.

In the docker shell run command `bundle exec rails generate hyrax:work Thesis` to generate these files for your application.
A a prereq., We are setting up a config to use a local controlled
vocabulary. We will create and use the metadata property for it later.
EXERCISE: Change the description of the thesis type
This commit adds comments to explain the controller and its options.
PART 1 - Add three metadata properties as defined in the
comments/instructions.
This commit contains the answer for Defining Metadata in the model EXERCISE
See comments/instructions in thesis_form.rb for details
This commit adds contact_email, contact_phone, and department to the
thesis_form's terms. Additionally it adds department and contact_email
as required fields. Confirm changes by visiting the new/edit forms of
the thesis work type in the browser.
See the comments for instructions. Let's hook up the controlled
vocabulary for the 'department' property.
This commit includes correcting a previous mistake. The service file
should've gone under the app/services directory. It also includes the
code necessary to hook up the department controlled vocab property to
the questioning authority local sub authority. Lastly, try statements
are added to a partial otherwise an error will get thrown when trying
to create a new work.
See comments in thesis_presenter.rb for instructions
This commit contains the code required to make the new properties appear
on the Thesis work show page.
For example, if I selected 'hst' for the department value, it should be
displayed as HISTORY on the show page.
Make the contact properties display to admin users only.
A user should be able find works by searching for a contact number.
Add and display department metadata property to the Collection model.
A user should see which department the work belongs to in the search
results.
Uncomment line 86 of the Gemfile and run bundle install
@ShanaLMoore ShanaLMoore changed the title Work Types Workshop [DO NOT MERGE] SESSION 2: Work Types Workshop [DO NOT MERGE] Sep 5, 2023
@ShanaLMoore ShanaLMoore force-pushed the work-types branch 2 times, most recently from dac5671 to bdc46a5 Compare September 20, 2023 18:48
This commit adds helper methods to department so that the value will display the terms instead of the id, in the catalog search index and facets. For example, "history" instead of "hst". You could write a spec for these methods for reassurance, and know that this is not the only way to accomplish this. With customizations the dev will often have to come up with solutions of their own.

:gift: BONUS: Display QA term instead of id in search results and facets

This commit adds helper methods to department so that the value will display the terms instead of the id, in the catalog search index and facets. For example, "history" instead of "hst". You could write a spec for these methods for reassurance, and know that this is not the only way to accomplish this. With customizations the dev will often have to come up with solutions of their own.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant