...
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:
- https://github.com/samvera/hyrax/blob/master/app/models/concerns/hyrax/collection_behavior.rb
- https://github.com/samvera/hydra-works/blob/master/lib/hydra/works/models/concerns/collection_behavior.rb
- https://github.com/samvera/hydra-pcdm/blob/master/lib/hydra/pcdm/models/concerns/collection_behavior.rb
- https://github.com/samvera/hydra-pcdm/blob/master/lib/hydra/pcdm/models/concerns/pcdm_behavior.rb
Collection Controller
Is this coming from Hydra::Collections gem?
No, Hydra::Collections was merged into CurationConcerns, which became Hyrax. Controller code for collections lives:
- https://github.com/samvera/hyrax/blob/master/app/controllers/hyrax/collections_controller.rb
- https://github.com/samvera/hyrax/blob/master/app/controllers/hyrax/admin/admin_sets_controller.rb
- https://github.com/samvera/hyrax/blob/master/app/controllers/concerns/hyrax/collections_controller_behavior.rb
- https://github.com/samvera/hyrax/blob/master/app/controllers/concerns/hyrax/collections/accepts_batches.rb
- https://github.com/samvera/hyrax/blob/master/app/controllers/concerns/hyrax/breadcrumbs_for_collections.rb
Also note the My and Dashboard extensions:
- https://github.com/samvera/hyrax/blob/master/app/controllers/hyrax/my/collections_controller.rb
- https://github.com/samvera/hyrax/blob/master/app/controllers/hyrax/dashboard/collections_controller.rb
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?
...
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).