-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Require valid reference order for submission/publication (#2300)
Many existing projects have an invalid order of entries in their References section, due to issue #2137. "Invalid" means: (a) One or more references have `order=None`, typically because it was copied from a past published version. (b) Two references have the same `order` value, typically because a reference was deleted from the middle of the list and then a new one was added. (c) `order` is distinct but doesn't match `id` order, typically because *two* references were deleted from the middle of the list and then a new one was added. Whatever the reason for having an invalid order of references, it is *not feasible to fix the order automatically*, so we want to require the author/editor to review and fix it by hand before the project is published. The demo project "MIMIC-III Clinical Database" currently has `order=None` for its three references. With these changes, you should see: - If you open the preview page, there is an error message "Order of references may be incorrect". - If you open the Project Content page, there is a warning at the bottom of the page. - If you add or edit references, and click "Save Description" (without checking the checkbox), the references should be saved but the warning should still be present. - If you check the checkbox and then click "Save Description", the warning should go away. - Alternatively, if you *delete* all three of the original references and then refresh the page, the warning should go away.
- Loading branch information
Showing
8 changed files
with
164 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
physionet-django/project/templates/project/confirm_reference_order_form.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{% comment %} | ||
Past bugs in the project editing forms can result in references having | ||
'order' set to None, or the order of 'order' not matching the order | ||
displayed in the content/copyedit page. It is impractical to repair | ||
all existing projects automatically since that requires guessing the | ||
author's intent. | ||
|
||
Therefore, if a project's reference order is undefined or | ||
inconsistent, the message below should be displayed on the content | ||
page (when the project is author-editable) or copyedit page (when the | ||
project is copyeditable.) | ||
|
||
The "confirm_reference_order" checkbox will be handled by | ||
ReferenceFormSet (see project/forms.py). | ||
{% endcomment %} | ||
{% if not project.has_valid_reference_order %} | ||
<div class="alert alert-form alert-warning"> | ||
<div> | ||
The References list may be incorrect due to a server error. | ||
Please verify that the list shown above corresponds to the | ||
correct numbered citations in the project text. | ||
</div> | ||
<label> | ||
<input type="checkbox" name="confirm_reference_order" value="1"> | ||
Order of references is correct | ||
</label> | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,7 +98,7 @@ th, td { | |
color: white; | ||
} | ||
|
||
.navbar-check{ | ||
input[type=checkbox].navbar-check{ | ||
display: none; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters