New view with button to duplicate the fragment. The duplication also duplicates the OriginalText and the Concordance instances associated, as well as Topics, References, Translations and ApparatusCriticusItems.
The code loops through all the fields of the OriginalText and copies their values and goes through these associated models and does the same thing, then assigns the new OriginalText instance in place of the original one. Finally, the Fragment is copied and the new OriginalText attached, and then Topics are copied.
On the frontend, the Duplicate button is clicked, a request is sent to the view with the pk of the original item. Upon completion, the user is redirected to the new unlinked fragment.
The commentary and links/apposita are not copied over, intentionally.
This has been implemented for Fragments andAnonymousFragments, unlinkedFragments` are created in both cases (tbc)
closes #393
New view with button to duplicate the fragment. The duplication also duplicates the
OriginalText
and theConcordance
instances associated, as well asTopics
,References
,Translations
andApparatusCriticusItems
.The code loops through all the fields of the
OriginalText
and copies their values and goes through these associated models and does the same thing, then assigns the newOriginalText
instance in place of the original one. Finally, theFragment
is copied and the newOriginalText
attached, and thenTopics
are copied.On the frontend, the
Duplicate
button is clicked, a request is sent to the view with the pk of the original item. Upon completion, the user is redirected to the new unlinked fragment.The commentary and links/apposita are not copied over, intentionally.
This has been implemented for
Fragments and
AnonymousFragments, unlinked
Fragments` are created in both cases (tbc)