Code for Managing Collections


Table of Contents


Collection Model

I now that the basics of the modeling was coming from Hydra::Works::Collections.Ā  Is that still the case?

Yes, with other application behaviors injected in Hyrax:

Collection Controller

Is this coming from Hydra::Collections gem?

No, Hydra::Collections was merged into CurationConcerns, which became Hyrax. Controller code for collections lives:

Also note the My and Dashboard extensions:

Collection Management Views

Views are all here for user collections:Ā https://github.com/samvera/hyrax/tree/master/app/views/hyrax/collections

And here for admin sets:Ā https://github.com/samvera/hyrax/tree/master/app/views/hyrax/admin/admin_sets

See also the collection- and admin set-related presenters and search builders that control what entities you see when browsing to these views.

Where is the code for listing collections?

Collections index view is path /dashboard/my/collections and /dashboard/collections Ā 

Where is the code for new/edit collections?

Adding items to collections

Adding sub-collections

Are there checks in Hyrax that prevent a collection being nested in a collection?Ā  Hydra::Works::Collections has the infrastructure that should allow for this.

I don't believe so, no.

Adding works

Where all can a work get added to a collection?Ā  I am looking for the appropriate place to do multi-membership validation.

  • In the Work edit view and in the Your Works view (/dashboard/my/works and /dashboard/works)
  • In the relationships tab of add new work and in add new works by batch

Potential Pitfalls