UCL / frrant

2 stars 0 forks source link

Fix/fragment ordering #375

Closed acholyn closed 1 year ago

tcouch commented 1 year ago

A few notes on the current state of the Work detail page:

tcouch commented 1 year ago

Adding unknown works to all Antiquarians and unknown books to all works

  1. Add a new boolean field to Work and Book models. This will be false by default (so as not to disrupt any existing code), but will be set to True for unknown Works and Books. Should enforce only one Work per Antiquarian can have unknown=True, likewise for Books in Works.
  2. Edit the migration file to loop through every Antiquarian and add an unknown Work (name="Unknown Work", unknown=True), then loop through every Work and add an unknown book (name="Unknown Book", unknown=True). Then loop through every FragmentLink, TestimoniumLink, and AppositumLink and:
    • Where work is currently None, set it to the link's Antiquarian's unknown work
    • Where book is currently None, set it to the link's Work's unknown book
  3. Add a Antiquarian.unknown_work property to make it easier to retrieve it's unknown work. Do the same for Work.unknown_work
  4. When an Antiquarian is created, automatically create an unknown work
  5. When a Work is created, automatically create an unknown book
  6. Change default ordering so that unknown work/book is always at the end
  7. Users should not be able to move unknown works/books up/down
  8. On detail page do not show unknown work/book if there's no content to display