Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

ActiveRecord-based configuration for mapping fields to Vocabularies #1344

Merged
merged 10 commits into from
Jun 14, 2017

Conversation

escowles
Copy link
Member

@escowles escowles commented Jun 8, 2017

Adds two new ActiveRecord models for managing Ephemera:

  • EphemeraProject, which corresponds to a set of EphemeraBoxes/EphemeraFolders using the same controlled vocabularies.
  • EphemeraField, which links a field to a controlled vocabulary in the context of a project.

The new workflow for creating a new ephemera project is:

  1. Create a new EphemeraProject for the project
  2. (Optional) Create a new EphemeraField for each field that should linked to Vocabulary
  3. Create a EphemeraBox in the EphemeraProject
  4. Add EphemeraFolders (where the form fields will use the Vocabularies selected in step 2).

Fixes #1255

@escowles escowles changed the title WIP: ActiveRecord-based configuration for mapping fields to Vocabularies ActiveRecord-based configuration for mapping fields to Vocabularies Jun 9, 2017
@coveralls
Copy link

Coverage Status

Coverage increased (+0.004%) to 99.818% when pulling a3d051e on ephemera-project into 19ad198 on master.

@tpendragon
Copy link
Contributor

Spinning this up to take a look now

Copy link
Contributor

@tpendragon tpendragon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple simple deletes, but some other questions:

  1. We need a way to get to the "Ephemera Projects" screen.
  2. Should we index + facet "Ephemera Project"? Or maybe associate it with a collection?
  3. I don't see any changes to ability.rb or load_and_authorize_resource - are permissions not being checked?

@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete?

@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete?

@@ -0,0 +1,3 @@
// Place all the styles related to the EphemeraFields controller here.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete?

@@ -0,0 +1,3 @@
// Place all the styles related to the EphemeraProjects controller here.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete?

@escowles
Copy link
Member Author

escowles commented Jun 13, 2017

I've deleted the unused javascripts/stylesheets and added some navigation to the front page. I've also added basic access control enforcement, but will defer more auth work to #1302

Should we index + facet "Ephemera Project"? Or maybe associate it with a collection?

For indexing, the box does index the EphemeraProject name and id, and that displays on the show page. EphemeraFolders just index the id so it can be used to find the appropriate controlled vocab fields. We could also index the EphemeraProject name there too — maybe we should just index it the same way as Collections, so we could effectively use the EphemeraProject instead of Collections?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.004%) to 99.818% when pulling 99d40f1 on ephemera-project into 19ad198 on master.

@tpendragon
Copy link
Contributor

tpendragon commented Jun 13, 2017

maybe we should just index it the same way as Collections, so we could effectively use the EphemeraProject instead of Collections

👍 (Now 👎)

Edit: I changed my mind - probably not. Collections have meaning for DPUL, after all

@escowles
Copy link
Member Author

I was torn about this because I think the EphemeraProject is going to map to a Collection, but clearly serves a very different purpose. And I definitely don't want to have a bunch of redundant Collection behavior on EphemeraProject.

So I'll index it as its own thing and provide a link from the EphemeraFolder like is already there for EphemeraBox, to make it easier to navigate up to the project.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.004%) to 99.822% when pulling cbb7be5 on ephemera-project into ec36c7c on master.

@tpendragon tpendragon merged commit c3e942b into master Jun 14, 2017
@tpendragon tpendragon deleted the ephemera-project branch June 14, 2017 15:58
@escowles escowles added the LAE label Sep 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants