Understanding Collections Files
Model
The base model is generated into the test app at /app/models/Collections
.
The generated model...
- includes app/models/concerns/hyrax/collection_behavior.rb
- which includes app/models/concerns/hyrax/core_metadata.rb
- includes app/models/concerns/hyrax/basic_metadata.rb
Local custom properties are added to the generated Collections model.
Additional collection specific properties are added to app/models/concerns/hyrax/collection_behavior.rb
Controllers & Views
There are 3 controllers:
controller | actions | views |
---|---|---|
app/controllers/hyrax/collections_controller.rb Ā Ā Ā includes app/controllers/concerns/hyrax/collections_controller_behavior.rb | show (landing) | app/views/hyrax/collections/show.html.erb |
app/controllers/hyrax/dashboard/collections_controller.rb Ā Ā Ā Ā extends app/controllers/hyrax/my/collections_controller.rb Ā Ā Ā Ā extends app/controllers/hyrax/my_controller.rb | new/create | app/views/hyrax/dashboard/collections/new.html.erb |
edit/update | app/views/hyrax/dashboard/collections/edit.html.erb | |
destroy | ||
show (admin) | app/views/hyrax/dashboard/collections/show.html.erb | |
files | ||
index (via my/collections_controller) | see index view for my/collections controller below | |
app/controllers/hyrax/my/collections_controller.rb | index | app/views/hyrax/my/collections/index.html.erb |
When do each of the _list_collections partials get called?
app/views/hyrax/collections/_list_collections.html.erb | I think this is intended to list all public collections, but there is not route right now. |
app/views/hyrax/my/collections/_list_collections.html.erb | Dashboard ā Collections ā My Collections |
app/views/hyrax/dashboard/collections/_list_collections.html.erb | Dashboard ā Collections ā All Collections |