-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/fragment ordering #375
Conversation
Co-authored-by: Tom Couch <t.couch@ucl.ac.uk>
A few notes on the current state of the Work detail page:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just gone through the migration first, but I've noticed a few things that could do with looking at/fixing
for migration file Co-authored-by: Tom Couch <t.couch@ucl.ac.uk>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some fixes for these are included in the following PR.
src/rard/research/forms.py
Outdated
# class InlineFragmentForm(forms.ModelForm): | ||
# class Meta: | ||
# model = antiquarian | ||
# fields = ("book", "work") | ||
|
||
|
||
# FragmentInlineUpdateFormset = inlineformset_factory( | ||
# Book, | ||
# Work, | ||
# form=InlineFragmentForm, | ||
# fields=("book", "work"), | ||
# labels={"book": "Book", "work": "Work"}, | ||
# can_delete=False, | ||
# ) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this go?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that's the basis of the inline form for updating the links, so I can do since we'll be covering it in the other PR
{% if perms.research.view_fragment %} | ||
<a class='nav-link {% if "unlinked_fragment" in request.resolver_match.namespaces %}active font-weight-bold{% endif %}' | ||
href='{% url "unlinked_fragment:list" %}'> | ||
{% trans 'Unlinked Fragments' %} | ||
</a> | ||
{% endif %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good addition. Should really be in a separate pull request.
{% load crispy_forms_tags %} | ||
{% if can_edit %} | ||
|
||
{% comment %} selects contain the books and works of the antiquarian and will work by displaying the work first and then display the books in that work {% endcomment %} | ||
<div> | ||
<select> | ||
</select> | ||
|
||
</div> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is work in progress, best not to submit it in this PR.
@@ -756,6 +773,9 @@ def test_testimonium_queryset_methods(self): | |||
self.assertEqual(0, self.testimonium.definite_antiquarian_links().count()) | |||
self.assertEqual(1, self.testimonium.possible_antiquarian_links().count()) | |||
|
|||
@pytest.mark.skip( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably best to have this working so that we remember to investigate if work on changes to definite status break it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've fixed it in the new feature. I can work on fixing it for this PR but will need to rebuild the db and everything
@@ -316,6 +316,7 @@ def test_link_antiquarian_orders_sequentially(self): | |||
): | |||
self.assertEqual(count, link.order) | |||
|
|||
@pytest.mark.skip("the opposite of this would be true now") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testimonia are a special case where those belonging to unknown work should be ordered first. Antiquarian reindex method needs updating to fix this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah...I'll need to fix that in the new feature as unknown is at the end I believe
…x/fragment-ordering
Fix/fragment ordering tc2
No description provided.