Summary:
Have added introduction boxes to works and books. This involved changes to the templates, forms, models and views (and migration). Related to #376
Models
have added introduction - 1:1 relationship with TextObjectField instance
have added plain introduction - plain text version for search purposes
this should be the same across ant/work/book
when a new work/book is created, it should create an introduction (TOF) object associated with it
Views
new update introduction views based on update views- the work one follows the same pattern as the ant one in which it just uses the detail page with functions for handling an update. The book one is more complicated as books have no detail page so it redirects to the creation form but will act as an update. There is a filler placeholder (this is empty) that will create a text object associated with the work/book if it does not already exist
Forms
Have taken the existing antiquarian introduction form and created a base form which the ant/work/book introduction forms are based on
have added introduction fields to book and work (create) forms
Templates
have added the boxes - which just makes use of the preexisting text_object_preview.html partial, same situation for the rich text editors for adding/updating the introduction content
have added add/edit buttons depending on if the introduction exists (has not been created yet) and if it is less than a certain length (the content at base has some empty tags - this might be a good idea to update)
similarly to above, the boxes showing the introductions should not show if they are empty
with the new editing states, they also have tab descriptions
Tests
check that TextObjectField instances associated with the work/book introduction are created/deleted with the work/book (models)
check that the content is properly updated and that it is in the editing mode (views)
Summary: Have added introduction boxes to works and books. This involved changes to the templates, forms, models and views (and migration). Related to #376
Models
Views
Forms
Templates
text_object_preview.html
partial, same situation for the rich text editors for adding/updating the introduction contentTests
TextObjectField
instances associated with the work/book introduction are created/deleted with the work/book (models)