diff --git a/scipost/templates/scipost/personal_page.html b/scipost/templates/scipost/personal_page.html index 0e9f37b82cf2420c147d8329978e11a0877838e9..06bdc5150ec4116d5cb27d5fceb301cf7108a026 100644 --- a/scipost/templates/scipost/personal_page.html +++ b/scipost/templates/scipost/personal_page.html @@ -392,17 +392,50 @@ </div> </div> - {% if unfinished_reports %} + {% if contributor.reports.in_draft.exists %} <div class="row"> <div class="col-12"> <h3>Unfinished reports:</h3> </div> <div class="col-12"> <ul class="list-group list-group-flush"> - {% for report in unfinished_reports %} + {% for report in contributor.reports.in_draft.all %} <li class="list-group-item"> <div class="w-100">{% include 'submissions/_submission_card_content.html' with submission=report.submission %}</div> - <div class="px-2"><a class="px-1" href="{% url 'submissions:submit_report' report.submission.arxiv_identifier_w_vn_nr %}">Finish report</a></div> + <div class="px-2 mb-2"><a class="px-1" href="{% url 'submissions:submit_report' report.submission.arxiv_identifier_w_vn_nr %}">Finish report</a></div> + </li> + {% endfor %} + </ul> + </div> + </div> + {% endif %} + + {% if contributor.reports.non_draft.exists %} + <div class="row"> + <div class="col-12"> + <h3>Finished reports:</h3> + </div> + <div class="col-12"> + <ul class="list-group list-group-flush"> + {% for report in contributor.reports.non_draft.all %} + <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-block {% block cardblock_class_block %}{% endblock %}"> + <h3>Report on Submission <a href="{{report.submission.get_absolute_url}}">{{report.submission.title}}</a></h3> + <table> + <tr> + <th style='min-width: 100px;'>Received:</th><td>{{ report.date_submitted|date:'Y-n-j' }}<td> + </tr> + <tr> + <th>Status:</th><td>{{report.get_status_display}}</td> + </tr> + <tr> + <th>Anonymous:</th><td>{{report.anonymous|yesno:'Yes,No'}}</td> + </tr> + </table> + </div> </li> {% endfor %} </ul> diff --git a/scipost/views.py b/scipost/views.py index 146b08f53e11cdf3b330c898eb4a6c7ed62a2094..d947c8d23f8649f5319cb3200b98982c2bfc4dfb 100644 --- a/scipost/views.py +++ b/scipost/views.py @@ -833,9 +833,8 @@ def personal_page(request): referee=contributor, accepted=None, cancelled=False).count() pending_ref_tasks = RefereeInvitation.objects.filter( referee=contributor, accepted=True, fulfilled=False) - unfinished_reports = Report.objects.in_draft().filter(author=contributor) refereeing_tab_total_count = nr_ref_inv_to_consider + len(pending_ref_tasks) - refereeing_tab_total_count += len(unfinished_reports) + refereeing_tab_total_count += Report.objects.in_draft().filter(author=contributor).count() # Verify if there exist objects authored by this contributor, # whose authorship hasn't been claimed yet @@ -895,7 +894,6 @@ def personal_page(request): 'nr_ref_inv_to_consider': nr_ref_inv_to_consider, 'pending_ref_tasks': pending_ref_tasks, 'refereeing_tab_total_count': refereeing_tab_total_count, - 'unfinished_reports': unfinished_reports, 'own_submissions': own_submissions, 'own_commentaries': own_commentaries, 'own_thesislinks': own_thesislinks,