Add restore button to test view page (#164)

This commit is contained in:
Alexandra authored and GitHub committed 2023-09-11 10:36:49 -04:00
1 parent c0bedf6fbc
commit 5d1ee29358
2 files changed
+13 -4

No files matched your search

+11 -3
View File
@@ -116,11 +116,19 @@
<a class="w-25 mr-2 anchorbutton btn-disabled">Stop</a>
{% endif %}
<!-- Delete Button: For Approvers or Test Authors -->
<!-- Delete/Restore Button: For Approvers or Test Authors -->
{% if profile.approver or profile.user.username == test.author %}
<a class="w-25 mr-2 anchorbutton btn-red" href="/test/{{test.id}}/DELETE">Delete</a>
{% if test.deleted %}
<a class="w-25 mr-2 anchorbutton btn-preset" href="/test/{{test.id}}/RESTORE">Restore</a>
{% else %}
<a class="w-25 mr-2 anchorbutton btn-red" href="/test/{{test.id}}/DELETE">Delete</a>
{% endif %}
{% else %}
<a class="w-25 mr-2 anchorbutton btn-disabled">Delete</a>
{% if test.deleted %}
<a class="w-25 mr-2 anchorbutton btn-disabled">Restore</a>
{% else %}
<a class="w-25 mr-2 anchorbutton btn-disabled">Delete</a>
{% endif %}
{% endif %}
<!-- Copy Button: Copy the current results statblock -->