Skip to content

Commit

Permalink
#2777 adds a modal intermediary warning users before creating a new r…
Browse files Browse the repository at this point in the history
…eview round.
  • Loading branch information
ajrbyers committed Jun 10, 2022
1 parent 10260ec commit 6c9e836
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 22 deletions.
36 changes: 36 additions & 0 deletions src/templates/admin/elements/review/new_round_modal.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<div class="reveal small" id="newround" data-reveal data-animation-in="slide-in-up"
data-animation-out="slide-out-down">
<div class="card">
<div class="card-divider">
<h4><i class="fa fa-plus-circle">&nbsp;</i>Create New Review Round</h4>
</div>
<div class="card-section">
<button class="close-button" data-close aria-label="Close reveal" type="button">
<span aria-hidden="true">&times;</span>
</button>
{% if article.current_review_round_object.reviewassignment_set.all %}
<p>Creating a new review round will automatically withdraw active assignments. Creating a new round will
have the following effect for the current round's assignments:</p>
<ul>
{% for assignment in article.current_review_round_object.reviewassignment_set.all %}
<li>Assignment #{{ assignment.pk }} by {{ assignment.reviewer.full_name }}
<ul>
<li>{% if assignment.status.code == 'wait' or assignment.status.code == 'accept' %}
Current Status: Active, this assignment will be closed.{% else %}Current Status:
{{ assignment.status.display }}, no action required.{% endif %}</li>
</ul>
</li>
{% endfor %}
</ul>
{% else %}
<p>There are no active assignments. Use the button below to create a new round.</p>
{% endif %}
<form method="POST" action="{% url 'review_in_review' article.pk %}">
{% csrf_token %}
<button name="new_review_round" type="submit" class="button">
Create New Review Round
</button>
</form>
</div>
</div>
</div>
30 changes: 14 additions & 16 deletions src/templates/admin/review/decision_helper.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,21 @@ <h2><span class="fa fa-gavel"></span> Make a Decision</h2>
Decisions</a>
{% endif %}
{% if not journal_settings.general.draft_decisions or editor %}
<a href="{% url 'review_decision' article.id 'accept' %}"
class="button success"><i
class="fa fa-check-circle action-icon">&nbsp;</i>Accept
Article</a> Accept Article</a>
<a href="{% url 'review_decision' article.id 'accept' %}"
class="button success"><i
class="fa fa-check-circle action-icon">&nbsp;</i>Accept
Article</a> Accept Article</a>

<form method="POST"
action="{% url 'review_in_review' article.pk %}">{% csrf_token %}
<button name="new_review_round" type="submit"
class="button warning"><i
class="fa fa-plus-circle action-icon">&nbsp;</i>New
Review Round
</button>
</form>
<a href="#" data-open="newround"
class="button warning"><i
class="fa fa-plus-circle action-icon">&nbsp;</i>New
Review Round
</a>

<a href="{% url 'review_decision' article.id 'decline' %}"
class="button alert"><i
class="fa fa-minus-circle action-icon">&nbsp;</i>Reject
Article</a>
<a href="{% url 'review_decision' article.id 'decline' %}"
class="button alert"><i
class="fa fa-minus-circle action-icon">&nbsp;</i>Reject
Article</a>
<a href="{% url 'review_request_revisions' article.pk %}"
class="button warning"><i
class="fa fa-inbox action-icon">&nbsp;</i>Request
Expand Down Expand Up @@ -132,6 +129,7 @@ <h4>{{ review.reviewer.full_name }} (Round {{ review.review_round.round_number }
{% for review in complete_reviews %}
{% include "elements/review/decision_form_modal.html" with review=review %}
{% endfor %}
{% include "admin/elements/review/new_round_modal.html" %}



Expand Down
10 changes: 4 additions & 6 deletions src/templates/admin/review/in_review.html
Original file line number Diff line number Diff line change
Expand Up @@ -226,19 +226,17 @@ <h2>Actions</h2>
</a>
</li>
<li>
<form method="POST">
{% csrf_token %}
<button name="new_review_round" type="submit" class="expanded">
<i class="fa fa-plus-circle action-icon">&nbsp;</i> New Review Round
</button>
</form>
<a href="#" data-open="newround" class="expanded">
<i class="fa fa-plus-circle action-icon">&nbsp;</i>New Review Round
</a>
</li>
</ul>
</div>
</div>
</div><!--/col-lg-12 -->
</div>
{% include "admin/elements/summary_modal.html" %}
{% include "admin/elements/review/new_round_modal.html" %}

{% endblock body %}

Expand Down

0 comments on commit 6c9e836

Please sign in to comment.