SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 4d645c9e authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Add details on refereeing invitations in portal reports needed tab

parent e3fdc57f
No related branches found
No related tags found
No related merge requests found
{% include 'scipost/personal_page/_hx_tablist.html' with selected='refereeing' %} {% include 'scipost/personal_page/_hx_tablist.html' with selected='refereeing' %}
{% include 'submissions/_refereeing_invitations_ongoing.html' with contributor=request.user.contributor %}
<div class="row">
<div class="col-12">
<div class="card bg-light">
<div class="card-body">
<h2 class="card-title">Refereeing Tasks</h2>
<ul class="mb-0">
<li><a href="{% url 'submissions:accept_or_decline_ref_invitations' %}">Accept/decline refereeing invitations</a> ({{ contributor.referee_invitations.open.count }})</li>
</ul>
</div>
</div>
</div>
</div>
{% if contributor.reports.in_draft.all %}
<div class="row">
<div class="col-12">
<h3 class="highlight">Unfinished reports:</h3>
<ul class="list-group list-group-flush">
{% for report in contributor.reports.in_draft.all %}
<li class="list-group-item">
<div class="card-body px-0">
{% include 'submissions/_submission_li.html' with submission=report.submission %}
<a class="btn btn-outline-primary my-2" href="{% url 'submissions:submit_report' report.submission.preprint.identifier_w_vn_nr %}">Finish report</a>
</div>
</li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<h3 class="highlight">Refereeing Invitations</h3> <h3 class="highlight">Refereeing Invitations</h3>
{% if contributor.referee_invitations.all %} {% if contributor.referee_invitations.all %}
<h3 class="mt-4">Pending Refereeing Invitations</h3> <details class="p-2">
{% if contributor.referee_invitations.in_process.all %} <summary>See all your refereeing invitations ({{ contributor.referee_invitations.all|length }})</summary>
<ul class="list-group list-group-flush"> <ul class="list-group list-group-flush ms-md-4">
{% for invitation in contributor.referee_invitations.in_process.all %} {% for invitation in contributor.referee_invitations.all %}
<li class="list-group-item py-2"> <li class="list-group-item py-2">
{% include 'submissions/_submission_li.html' with submission=invitation.submission %} {% include 'submissions/_submission_li.html' with submission=invitation.submission %}
<table> <table>
<tr> <tr>
<th style='min-width: 100px;'>Due:</th> <th style='min-width: 100px;'>Status:</th>
<td>{{ invitation.submission.reporting_deadline|date:'d F Y' }}{% if invitation.submission.reporting_deadline_has_passed %} <span class="label label-sm label-danger ms-2 px-3">overdue</span> {% endif %}<td>
</tr>
<tr>
<th>Status:</th>
<td>{{ invitation.get_status_display }}</td> <td>{{ invitation.get_status_display }}</td>
</tr> </tr>
{% if invitation.accepted is not None %} {% if invitation.accepted is not None %}
<tr> <tr>
<th>{{ invitation.accepted|yesno:'Accepted,Declined' }}:</th> <th>{{ invitation.accepted|yesno:'Accepted,Declined' }}:</th>
<td>{{ invitation.date_responded }}</td> <td>{{ invitation.date_responded }}</td>
</tr> </tr>
{% endif %} {% endif %}
<tr> {% if invitation.related_report %}
<td colspan="2"> <tr>
<a class="d-inline-block" href="{% url 'submissions:submit_report' identifier_w_vn_nr=invitation.submission.preprint.identifier_w_vn_nr %}">Submit your Report</a> <span class="text-blue">|</span> <th>Report:</th>
<a class="d-inline-block" href="{% url 'submissions:communication' identifier_w_vn_nr=invitation.submission.preprint.identifier_w_vn_nr comtype='RtoE' referee_id=request.user.contributor.id %}">Write to the Editor-in-charge</a> <td><a href="{{ invitation.related_report.get_absolute_url }}">{{ invitation.related_report.citation|default:'Link' }}</a></td>
</td> </tr>
</tr> {% endif %}
</table> </table>
</li> </li>
{% empty %}
<li>None found</li>
{% endfor %} {% endfor %}
</ul> </ul>
{% else %} </details>
<p><em>You do not have any pending refereeing task</em></p>
{% endif %}
<br>
<h3><button type="button" class="btn btn-link p-0" data-bs-toggle="toggle" data-bs-target="#all-invitations"><small>+ See all Refereeing Invitations ({{ contributor.referee_invitations.all|length }})</small></button></h3>
<ul class="list-group list-group-flush ms-md-4" id="all-invitations" style="display: none;">
{% for invitation in contributor.referee_invitations.all %}
<li class="list-group-item py-2">
{% include 'submissions/_submission_li.html' with submission=invitation.submission %}
<table>
<tr>
<th style='min-width: 100px;'>Status:</th>
<td>{{ invitation.get_status_display }}</td>
</tr>
{% if invitation.accepted is not None %}
<tr>
<th>{{ invitation.accepted|yesno:'Accepted,Declined' }}:</th>
<td>{{ invitation.date_responded }}</td>
</tr>
{% endif %}
{% if invitation.related_report %}
<tr>
<th>Report:</th>
<td><a href="{{ invitation.related_report.get_absolute_url }}">{{ invitation.related_report.citation|default:'Link' }}</a></td>
</tr>
{% endif %}
</table>
</li>
{% endfor %}
</ul>
{% else %} {% else %}
<p><em>You do not have any refereeing invitation</em></p> <p><em>No refereeing invitation found</em></p>
{% endif %} {% endif %}
</div> </div>
</div> </div>
{% if contributor.reports.non_draft.all %} {% if contributor.reports.non_draft.all %}
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
...@@ -113,9 +52,6 @@ ...@@ -113,9 +52,6 @@
<ul class="list-group list-group-flush"> <ul class="list-group list-group-flush">
{% for report in contributor.reports.non_draft.all %} {% for report in contributor.reports.non_draft.all %}
<li class="list-group-item"> <li class="list-group-item">
{% comment %}
Temporary: There is already a template for a "Report summary" in a parallel (unmerged) branch. Awaiting merge to use that template.
{% endcomment %}
<div class="card-body px-0 {% block cardblock_class_block %}{% endblock %}"> <div class="card-body px-0 {% block cardblock_class_block %}{% endblock %}">
<h3>Report on Submission <a href="{{ report.submission.get_absolute_url }}">{{ report.submission.title }}</a></h3> <h3>Report on Submission <a href="{{ report.submission.get_absolute_url }}">{{ report.submission.title }}</a></h3>
<table> <table>
......
...@@ -2,6 +2,14 @@ ...@@ -2,6 +2,14 @@
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% if name == 'reports_needed' %}
{% if request.user.contributor %}
{% include 'submissions/_refereeing_invitations_ongoing.html' with contributor=request.user.contributor %}
{% endif %}
{% endif %}
<div class="d-flex justify-content-between"> <div class="d-flex justify-content-between">
<button class="btn btn-outline-primary" data-bs-toggle="collapse" data-bs-target="#{{ name }}Search" aria-expanded="false" aria-controls="{{ name }}Search"> <button class="btn btn-outline-primary" data-bs-toggle="collapse" data-bs-target="#{{ name }}Search" aria-expanded="false" aria-controls="{{ name }}Search">
{% include 'bi/search.html' %}&emsp;Simple search / filter {% include 'bi/search.html' %}&emsp;Simple search / filter
......
{% if contributor.referee_invitations.awaiting_response %}
<div class="border border-2 border-danger m-2 mb-4">
<h3 class="highlight mt-0">Refereeing invitations awaiting your response</h3>
<ul>
<li><a href="{% url 'submissions:accept_or_decline_ref_invitations' %}">Accept/decline refereeing invitations</a> ({{ contributor.referee_invitations.awaiting_response|length }})</li>
</ul>
</div>
{% endif %}
{% if contributor.reports.in_draft.all %}
<div class="border border-2 border-danger p-0 m-2">
<h3 class="highlight mt-0">Your unfinished Reports</h3>
<ul class="list-group m-2">
{% for report in contributor.reports.in_draft.all %}
<li class="list-group-item">
<div class="card-body">
{% include 'submissions/_submission_li.html' with submission=report.submission %}
<a class="btn btn-outline-primary my-2" href="{% url 'submissions:submit_report' report.submission.preprint.identifier_w_vn_nr %}">Finish Report</a>
</div>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if contributor.referee_invitations.in_process.all %}
<div class="border border-2 border-warning m-2 mb-4">
<h3 class="highlight mt-0">Your pending refereeing invitations</h3>
<ul class="list-group m-2">
{% for invitation in contributor.referee_invitations.in_process.all %}
<li class="list-group-item p-2">
{% include 'submissions/_submission_li.html' with submission=invitation.submission %}
<table>
<tr>
<th style='min-width: 100px;'>Due:</th>
<td>{{ invitation.submission.reporting_deadline|date:'d F Y' }}{% if invitation.submission.reporting_deadline_has_passed %} <span class="label label-sm label-danger ms-2 px-3">overdue</span> {% endif %}<td>
</tr>
<tr>
<th>Status:</th>
<td>{{ invitation.get_status_display }}</td>
</tr>
{% if invitation.accepted is not None %}
<tr>
<th>{{ invitation.accepted|yesno:'Accepted,Declined' }}:</th>
<td>{{ invitation.date_responded }}</td>
</tr>
{% endif %}
<tr>
<td colspan="2">
<a class="d-inline-block" href="{% url 'submissions:submit_report' identifier_w_vn_nr=invitation.submission.preprint.identifier_w_vn_nr %}">Submit your Report</a> <span class="text-blue">|</span>
<a class="d-inline-block" href="{% url 'submissions:communication' identifier_w_vn_nr=invitation.submission.preprint.identifier_w_vn_nr comtype='RtoE' referee_id=contributor.id %}">Write to the Editor-in-charge</a>
</td>
</tr>
</table>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment