Skip to content

samvera-labs/dog_biscuits

Repository files navigation

DogBiscuits

Code: Build Status Coverage Status Maintainability Inline docs

Docs: Documentation Contribution Guidelines Apache 2.0 License

Models, vocabularies and behaviours for Hyrax applications 🐶 🍪

Product Owner

Julie Allinson geekscruff

Installation

For use within Hyrax 2 applications.

Add this line to your application's Gemfile:

gem 'dog_biscuits', :git => 'git://github.com/samvera-labs/dog_biscuits.git'

And then execute:

$ bundle install

Run the generator

$ rails generate dog_biscuits:install

The installer adds some new field templates in views/hyrax/records/edit_fields:

  • abstract - show as a paragraph
  • funder - use the crossref fundref autosuggest service
  • note - show as a paragraph
  • part_of - for JournalArticle use the crossref journals autosuggest service
  • publication_status - use a file_based authority (from config/authorities)
  • refereeed - show radio buttons for Yes and No
  • resource_type_general - use a file_based authority (from config/authorities)

Removing these will default back to standard text field display

Generate Works

Run the work generator

$ rails generate dog_biscuits:work WorkName

If the work is not supported, the generator will give you a list of supported models.

Add the --skipmodel flag leave the model and indexer unchanged (eg. when you have custom properties in the model and/or custom indexing).

Configure Works

Edit config/initializers/dog_biscuits.rb to configure the properties used by your work - see the comments in that file for details.

Dates

Date slider in search results

Add blacklight_range_limit by setting the following flag in config/initializers/dog_biscuits.rb:

config.date_range = true

Then run:

$ rails generate dog_biscuits:dates

Date picker in edit form

Control date fields with a date picker by setting the following flag in config/initializers/dog_biscuits.rb:

config.date_picker = true

Change which fields are controlled by the picker by changing config.date_properties in config/initializers/dog_biscuits.rb. The default is all date fields.

Then run:

$ rails generate dog_biscuits:dates

Documentation

Further documentation is available in the wiki.

About

Models, vocabularies and behaviours for Hyrax applications.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published