Attempt to rework the review screen to be more useful
Fix indenting and whitespace because it was the only way to track down the errors..
This commit is contained in:
parent
ec665d7bd6
commit
b7aa0a4687
1 changed files with 169 additions and 162 deletions
|
@ -8,178 +8,185 @@
|
|||
|
||||
{% if is_manager %}
|
||||
<div class="float-right">
|
||||
<form class="result-form form-inline form-horizontal" method="POST" action="">
|
||||
{% csrf_token %}
|
||||
<div class="btn-group">
|
||||
{% if proposal.result.status == "accepted" %}
|
||||
<a class="btn dropdown-toggle btn-success" data-toggle="dropdown" href="#">Accepted <span class="caret"></span></a>
|
||||
<div class="dropdown-menu pull-right">
|
||||
<input type="submit" name="result_submit" value="reject" class="btn btn-block btn-xs btn-danger" />
|
||||
<input type="submit" name="result_submit" value="standby" class="btn btn-block btn-info btn-xs" />
|
||||
<input type="submit" name="result_submit" value="undecide" class="btn btn-block btn-primary btn-xs" />
|
||||
</div>
|
||||
<input type="submit" name="publish_changes" value="Publish Changes" class="btn btn-block btn-success" />
|
||||
{% else %}
|
||||
{% if proposal.result.status == "rejected" %}
|
||||
<a class="btn btn-block dropdown-toggle btn-danger" data-toggle="dropdown" href="#">Rejected <span class="caret"></span></a>
|
||||
<div class="dropdown-menu pull-right">
|
||||
<input type="submit" name="result_submit" value="accept" class="btn btn-block btn-xs btn-success" />
|
||||
<input type="submit" name="result_submit" value="standby" class="btn btn-block btn-info btn-xs" />
|
||||
<input type="submit" name="result_submit" value="undecide" class="btn btn-block btn-default btn-xs" />
|
||||
</div>
|
||||
{% else %}
|
||||
{% if proposal.result.status == "standby" %}
|
||||
<a class="btn btn-block btn-info dropdown-toggle" data-toggle="dropdown" href="#">Standby <span class="caret"></span></a>
|
||||
<div class="dropdown-menu pull-right">
|
||||
<input type="submit" name="result_submit" value="accept" class="btn btn-block btn-xs btn-success" />
|
||||
<input type="submit" name="result_submit" value="reject" class="btn btn-block btn-xs btn-danger" />
|
||||
<input type="submit" name="result_submit" value="undecide" class="btn btn-block btn-primary btn-xs" />
|
||||
</div>
|
||||
{% else %}
|
||||
<a class="btn btn-block btn-primary dropdown-toggle" data-toggle="dropdown" href="#">Undecided <span class="caret"></span></a>
|
||||
<div class="dropdown-menu pull-right">
|
||||
<input type="submit" name="result_submit" value="accept" class="btn btn-block btn-xs btn-success" />
|
||||
<input type="submit" name="result_submit" value="reject" class="btn btn-block btn-xs btn-danger" />
|
||||
<input type="submit" name="result_submit" value="standby" class="btn btn-block btn-info btn-xs" />
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
<form class="result-form form-inline form-horizontal" method="POST" action="">
|
||||
{% csrf_token %}
|
||||
<div class="btn-group">
|
||||
{% if proposal.result.status == "accepted" %}
|
||||
<a class="btn dropdown-toggle btn-success" data-toggle="dropdown" href="#">Accepted <span class="caret"></span></a>
|
||||
<div class="dropdown-menu pull-right">
|
||||
<input type="submit" name="result_submit" value="reject" class="btn btn-block btn-xs btn-danger" />
|
||||
<input type="submit" name="result_submit" value="standby" class="btn btn-block btn-info btn-xs" />
|
||||
<input type="submit" name="result_submit" value="undecide" class="btn btn-block btn-primary btn-xs" />
|
||||
</div>
|
||||
<input type="submit" name="publish_changes" value="Publish Changes" class="btn btn-block btn-success" />
|
||||
{% else %}
|
||||
{% if proposal.result.status == "rejected" %}
|
||||
<a class="btn btn-block dropdown-toggle btn-danger" data-toggle="dropdown" href="#">Rejected <span class="caret"></span></a>
|
||||
<div class="dropdown-menu pull-right">
|
||||
<input type="submit" name="result_submit" value="accept" class="btn btn-block btn-xs btn-success" />
|
||||
<input type="submit" name="result_submit" value="standby" class="btn btn-block btn-info btn-xs" />
|
||||
<input type="submit" name="result_submit" value="undecide" class="btn btn-block btn-default btn-xs" />
|
||||
</div>
|
||||
{% else %}
|
||||
{% if proposal.result.status == "standby" %}
|
||||
<a class="btn btn-block btn-info dropdown-toggle" data-toggle="dropdown" href="#">Standby <span class="caret"></span></a>
|
||||
<div class="dropdown-menu pull-right">
|
||||
<input type="submit" name="result_submit" value="accept" class="btn btn-block btn-xs btn-success" />
|
||||
<input type="submit" name="result_submit" value="reject" class="btn btn-block btn-xs btn-danger" />
|
||||
<input type="submit" name="result_submit" value="undecide" class="btn btn-block btn-primary btn-xs" />
|
||||
</div>
|
||||
{% else %}
|
||||
<a class="btn btn-block btn-primary dropdown-toggle" data-toggle="dropdown" href="#">Undecided <span class="caret"></span></a>
|
||||
<div class="dropdown-menu pull-right">
|
||||
<input type="submit" name="result_submit" value="accept" class="btn btn-block btn-xs btn-success" />
|
||||
<input type="submit" name="result_submit" value="reject" class="btn btn-block btn-xs btn-danger" />
|
||||
<input type="submit" name="result_submit" value="standby" class="btn btn-block btn-info btn-xs" />
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h2 class="mb-5">#{{ proposal.number }}: {{ proposal.title }} ({{ proposal.speaker }})</h2>
|
||||
|
||||
<div class="tabbable">
|
||||
<ul class="nav nav-pills">
|
||||
<li class="nav-item"><a class="nav-link active" href="#proposal-detail" data-toggle="tab">{% trans "Proposal Details" %}</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#proposal-reviews" data-toggle="tab">{% trans "Reviews" %} <span class="badge">{{ reviews|length }}</span></a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#proposal-feedback" data-toggle="tab">{% trans "Speaker Feedback" %} <span class="badge">{{ proposal.messages.all|length }}</span></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="proposal-detail">
|
||||
{% include "symposion/proposals/_proposal_fields.html" %}
|
||||
</div>
|
||||
<div class="tab-pane" id="proposal-reviews">
|
||||
<div class="row my-4">
|
||||
<div class="col-12">
|
||||
<h2>{% trans "Current Results" %}</h2>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<th>+2 votes</th>
|
||||
<th>+1 votes</th>
|
||||
<th>-1 votes</th>
|
||||
<th>-2 votes</th>
|
||||
<th>{% trans "Total Responses" %}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ proposal.plus_two }}</td>
|
||||
<td>{{ proposal.plus_one }}</td>
|
||||
<td>{{ proposal.minus_one }}</td>
|
||||
<td>{{ proposal.minus_two }}</td>
|
||||
<td>{{ proposal.total_votes }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<hr />
|
||||
|
||||
{% if review_form %}
|
||||
<form method="POST" action="#proposal-reviews" class="review-form form-horizontal">
|
||||
<legend>{% trans "Submit Review" %}</legend>
|
||||
<p>Enter your vote and any comment to go along with it. You can revise your vote or comment multiple times with an existing vote (your previously recorded score will be replaced during calculations). <b>Your vote and comments are not public and will only be viewable by other reviewers.</b></p>
|
||||
{% csrf_token %}
|
||||
{{ review_form|bootstrap }}
|
||||
<div class="form-action">
|
||||
<input type="submit" class="btn btn-primary" name="vote_submit" value="Submit Review" />
|
||||
<input type="submit" class="btn btn-primary" name="vote_submit_and_random" value="Submit Review and jump to random proposal" />
|
||||
</div>
|
||||
</form>
|
||||
{% else %}
|
||||
<p>You do not have permission to vote on this proposal.</p>
|
||||
{% endif %}
|
||||
|
||||
{% if reviews %}
|
||||
<h5>Review Comments</h5>
|
||||
{% for review in reviews %}
|
||||
<div class="review-box">
|
||||
<div class="vote pull-left">
|
||||
<span>{{ review.vote }}</span>
|
||||
</div>
|
||||
{% if is_manager %}
|
||||
<div class="pull-right">
|
||||
<form class="form-inline form-horizontal" action="{% url "review_delete" review.id %}" method="POST">
|
||||
{% csrf_token %}
|
||||
<button class="btn btn-xs btn-danger" type="submit">Delete</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="review-content">
|
||||
|
||||
<b>
|
||||
{% if review.user.speaker_profile %}
|
||||
{{ review.user.speaker_profile.name }}
|
||||
{% else %}
|
||||
{{ review.user.username }}
|
||||
{% endif %}
|
||||
</b>
|
||||
{{ review.submitted_at|timesince }} ago <br />
|
||||
{{ review.comment_html|safe }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="proposal-feedback">
|
||||
<div class="row my-4">
|
||||
<div class="col-12">
|
||||
{% if review_messages %}
|
||||
<h2>{% trans "Conversation with the submitter" %}</h2>
|
||||
{% for message in review_messages %}
|
||||
<div class="comment-box">
|
||||
<div class="commment-content">
|
||||
<b>{{ message.user.username }}</b>
|
||||
{{ message.submitted_at|timesince }} ago <br />
|
||||
{{ message.message|safe }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<hr />
|
||||
{% endif %}
|
||||
|
||||
<form class="form-horizontal" action="" method="POST"accept-charset="utf-8">
|
||||
<h3>{% trans "Send a message" %}</h3>
|
||||
<p>
|
||||
{% blocktrans %}
|
||||
If you'd like to communicate with the submitter, use the following form and he or she will be
|
||||
notified and given the opportunity to respond.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% csrf_token %}
|
||||
{{ message_form|bootstrap }}
|
||||
<div class="form-actions">
|
||||
<input type="submit" class="btn btn-primary" name="message_submit" value="Send Message" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="nav nav-pills">
|
||||
<li class="nav-item"><a class="nav-link active" href="#proposal-detail" data-toggle="tab">{% trans "Proposal Details" %}</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#proposal-feedback" data-toggle="tab">{% trans "Speaker Feedback" %} <span class="badge">{{ proposal.messages.all|length }}</span></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="proposal-detail">
|
||||
{% include "symposion/proposals/_proposal_fields.html" %}
|
||||
</div>
|
||||
<div class="tab-pane" id="proposal-feedback">
|
||||
<div class="row my-4">
|
||||
<div class="col-12">
|
||||
{% if review_messages %}
|
||||
<h2>{% trans "Conversation with the submitter" %}</h2>
|
||||
{% for message in review_messages %}
|
||||
<div class="comment-box">
|
||||
<div class="commment-content">
|
||||
<b>{{ message.user.username }}</b>
|
||||
{{ message.submitted_at|timesince }} ago <br />
|
||||
{{ message.message|safe }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<hr />
|
||||
{% endif %}
|
||||
|
||||
<form class="form-horizontal" action="" method="POST"accept-charset="utf-8">
|
||||
<h3>{% trans "Send a message" %}</h3>
|
||||
<p>
|
||||
{% blocktrans %}
|
||||
If you'd like to communicate with the submitter, use the following form and they will be
|
||||
notified and given the opportunity to respond.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% csrf_token %}
|
||||
{{ message_form|bootstrap }}
|
||||
<div class="form-actions">
|
||||
<input type="submit" class="btn btn-primary" name="message_submit" value="Send Message" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card" id="proposal-reviews">
|
||||
<div class="row my-4">
|
||||
<div class="col-12">
|
||||
<button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#currentResults" aria-expanded="false" aria-controls="currentResults">
|
||||
{% trans "Current Results" %}
|
||||
</button>
|
||||
<div class="collapse" id="currentResults">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<th>+2 votes</th>
|
||||
<th>+1 votes</th>
|
||||
<th>-1 votes</th>
|
||||
<th>-2 votes</th>
|
||||
<th>{% trans "Total Responses" %}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ proposal.plus_two }}</td>
|
||||
<td>{{ proposal.plus_one }}</td>
|
||||
<td>{{ proposal.minus_one }}</td>
|
||||
<td>{{ proposal.minus_two }}</td>
|
||||
<td>{{ proposal.total_votes }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
{% if review_form %}
|
||||
<form method="POST" action="#proposal-reviews" class="review-form form-horizontal">
|
||||
<legend>{% trans "Submit Review" %}</legend>
|
||||
<p>Enter your vote and any comment to go along with it. You can revise your vote or comment multiple times with an existing vote (your previously recorded score will be replaced during calculations). <b>Your vote and comments are not public and will only be viewable by other reviewers.</b></p>
|
||||
{% csrf_token %}
|
||||
{{ review_form|bootstrap }}
|
||||
<div class="form-action">
|
||||
<input type="submit" class="btn btn-primary" name="vote_submit" value="Submit Review" />
|
||||
<input type="submit" class="btn btn-primary" name="vote_submit_and_random" value="Submit Review and jump to random proposal" />
|
||||
</div>
|
||||
</form>
|
||||
{% else %}
|
||||
<p>You do not have permission to vote on this proposal.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row my-4">
|
||||
<div class="col-12">
|
||||
|
||||
{% if reviews %}
|
||||
<button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#reviewDetails" aria-expanded="false" aria-controls="reviewDetails">
|
||||
Review Comments
|
||||
</button>
|
||||
<div class="collapse" id="reviewDetails">
|
||||
{% for review in reviews %}
|
||||
<div class="review-box">
|
||||
<div class="vote pull-left">
|
||||
<span>{{ review.vote }}</span>
|
||||
</div>
|
||||
{% if is_manager %}
|
||||
<div class="pull-right">
|
||||
<form class="form-inline form-horizontal" action="{% url "review_delete" review.id %}" method="POST">
|
||||
{% csrf_token %}
|
||||
<button class="btn btn-xs btn-danger" type="submit">Delete</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="review-content">
|
||||
|
||||
<b>
|
||||
{% if review.user.speaker_profile %}
|
||||
{{ review.user.speaker_profile.name }}
|
||||
{% else %}
|
||||
{{ review.user.username }}
|
||||
{% endif %}
|
||||
</b>
|
||||
{{ review.submitted_at|timesince }} ago <br />
|
||||
{{ review.comment_html|safe }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a href="{% url "user_random" proposal.section.slug %}">
|
||||
{% trans "Jump to a random unreviewed proposal" %}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="{% url "user_random" proposal.section.slug %}">
|
||||
{% trans "Jump to a random unreviewed proposal" %}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue