Add favorite:boolean to controlled vocab #439
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #428
Add favorite:boolean variable to the ControlledVocabulary object along with view components to edit and display. Add sort to @repair_type which feeds the Repair Type form drop-downs, so that vocab terms marked as favorite will sort to top of select options.
This allows admin to choose repair type terms that should sort to top of options. The sort has only been applied to repair types but could be applied to other controlled vocab select menus.
I should note that in the issue, preservation staff requested a specific order for repair types. I think this is a compromise that allows them to control priority of the terms without the rigidity of hard-coding the order. The trade-off is a lack of precision.
We should check with Preservation staff to confirm if this solution is acceptable.