-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ENG-6208] implemented unwithdraw specific preprint version (#10964)
## Purpose Allow to unwithdraw preprint versions in the admin app ## Ticket (https://openscience.atlassian.net/browse/ENG-6208)
- Loading branch information
Showing
4 changed files
with
78 additions
and
1 deletion.
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
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,41 @@ | ||
{% load node_extras %} | ||
|
||
{% if perms.osf.change_preprintrequest %} | ||
<tr> | ||
<td>Unwithdraw Version</td> | ||
<td> | ||
<div class="form-inline"> | ||
{% if preprint.machine_state == 'withdrawn' %} | ||
Version {{ preprint.version }} | ||
<button type="button" class="btn btn-danger" onclick="$('#confirmUnwithdraw').modal('show')"> | ||
Unwithdraw | ||
</button> | ||
<div class="modal" id="confirmUnwithdraw"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<form class="well" method="post" action="{% url 'admin:unwithdraw' guid=preprint.guid %}"> | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal">x</button> | ||
<h3>Are you sure you want to unwithdraw this version?</h3> | ||
</div> | ||
{% csrf_token %} | ||
<div class="modal-footer"> | ||
<button class="btn btn-danger" type="submit"> | ||
Unwithdraw | ||
</button> | ||
<button type="button" class="btn btn-default" data-dismiss="modal"> | ||
Cancel | ||
</button> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
{% else %} | ||
Not withdrawn version | ||
<button type="submit" class="btn btn-danger" disabled>Unwithdraw</button> | ||
{% endif %} | ||
</div> | ||
</td> | ||
</tr> | ||
{% endif %} |