diff --git a/submissions/templates/submissions/_single_public_report_without_comments.html b/submissions/templates/submissions/_single_public_report_without_comments.html index 0d6e9a92f882c23853bb145d58806aedac278d00..9ffe7650cbab4d4200e4fd55f03c5d70a86e7614 100644 --- a/submissions/templates/submissions/_single_public_report_without_comments.html +++ b/submissions/templates/submissions/_single_public_report_without_comments.html @@ -13,6 +13,9 @@ {% if report.pdf_report %} <a href="{% url 'submissions:report_detail_pdf' report.submission.arxiv_identifier_w_vn_nr report.report_nr %}" target="_blank">Download as PDF</a> {% endif %} + {% if perms.scipost.can_manage_reports %} + {% if report.pdf_report %}· {% endif %}<a href="{% url 'submissions:report_pdf_compile' report.id %}"{% if not report.pdf_report %}class="btn btn-warning btn-sm"{% endif %}>Update/Compile the Report pdf</a> + {% endif %} </div> {% if report.flagged %} @@ -48,6 +51,9 @@ {% if report.pdf_report %} <a href="{% url 'submissions:report_detail_pdf' report.submission.arxiv_identifier_w_vn_nr report.report_nr %}" target="_blank">Download as PDF</a> {% endif %} + {% if perms.scipost.can_manage_reports %} + {% if report.pdf_report %}· {% endif %}<a href="{% url 'submissions:report_pdf_compile' report.id %}"{% if not report.pdf_report %}class="btn btn-warning btn-sm"{% endif %}>Update/Compile the Report pdf</a> + {% endif %} </div> {% include 'submissions/_single_report_content.html' with report=report %} diff --git a/submissions/templates/submissions/_submission_summary.html b/submissions/templates/submissions/_submission_summary.html index bd73de899bd2310a56487055812f81aea616a864..613cc023ff67d310dc160c307b72ce562be694b6 100644 --- a/submissions/templates/submissions/_submission_summary.html +++ b/submissions/templates/submissions/_submission_summary.html @@ -1,7 +1,11 @@ {% extends 'submissions/_submission_summary_short.html' %} {% block submission_summary_footer %} - <a href="{% url 'submissions:refereeing_package_pdf' submission.arxiv_identifier_w_vn_nr %}" target="_blank">Download pdf package</a> + {% if submission.pdf_refereeing_pack %} + <p class="mt-3"> + <a href="{% url 'submissions:refereeing_package_pdf' submission.arxiv_identifier_w_vn_nr %}" target="_blank" class="btn btn-outline-primary">Download Refereeing Package</a> + </p> + {% endif %} <h3 class="mt-3">Abstract</h3> <p>{{submission.abstract}}</p> {% endblock %} diff --git a/submissions/templates/submissions/reports_pdf_compile.html b/submissions/templates/submissions/reports_pdf_compile.html index 9f75ef0eab2261c00bd0560f225e2c2e3347952e..cd32e70f195cbac3ae8ce0b289383c16a14a590b 100644 --- a/submissions/templates/submissions/reports_pdf_compile.html +++ b/submissions/templates/submissions/reports_pdf_compile.html @@ -24,6 +24,7 @@ <div class="row"> <div class="col-12"> <h3>Please process this code in your Tex Compiler:</h3> + <p>To compile, one needs the SciPost Refereeing Latex Package. Please <a href="mailto: info@scipost.org">contact SciPost</a> if you did not receive it.</p> <pre class="clickfocus" style="max-height: 200px;"><code>{% include 'submissions/_report_tex_template.html' with report=report %}</code></pre> </div> </div> diff --git a/submissions/templates/submissions/submission_detail.html b/submissions/templates/submissions/submission_detail.html index f255cf191d11632a6776dda1ba0baf10e76e4ffd..cb310f01540671c8ee0c22f4a2bee9f327163167 100644 --- a/submissions/templates/submissions/submission_detail.html +++ b/submissions/templates/submissions/submission_detail.html @@ -139,6 +139,14 @@ <li>Commenting on this Submission is closed.</li> {% endif %} </ul> + {% if perms.scipost.can_manage_reports %} + <h3>Admin Actions</h3> + <ul> + <li> + <a href="{% url 'submissions:treated_submission_pdf_compile' submission.arxiv_identifier_w_vn_nr %}">Update the Refereeing Package pdf</a> + </li> + <ul> + {% endif %} </div> </div> {% endif %} diff --git a/submissions/templates/submissions/treated_submission_pdf_compile.html b/submissions/templates/submissions/treated_submission_pdf_compile.html index aeb5e32c2e135f10e049463427a38f2c49fb525c..0eee256f8a92f1806f8d1378d0d87c241b942d0d 100644 --- a/submissions/templates/submissions/treated_submission_pdf_compile.html +++ b/submissions/templates/submissions/treated_submission_pdf_compile.html @@ -23,7 +23,8 @@ <div class="row"> <div class="col-12"> <h3>Please process this code in your Tex Compiler:</h3> - <p>Don't forget you may need to compile twice because of the Table of Content.</p> + <p>You may need to compile twice because of the Table of Content.</p> + <p>To compile, one needs the SciPost Refereeing Latex Package. Please <a href="mailto: info@scipost.org">contact SciPost</a> if you did not receive it.</p> <pre class="clickfocus" style="max-height: 200px;"><code>{% include 'submissions/_refereeing_pack_tex_template.html' with submission=submission %}</code></pre> </div> </div> diff --git a/submissions/views.py b/submissions/views.py index 0b34e45700f188bb1eff9a63e48b9cd5e4926195..8a449d19a9dfb59e059aad8142aa60077f63be7f 100644 --- a/submissions/views.py +++ b/submissions/views.py @@ -240,8 +240,7 @@ def submission_refereeing_package_pdf(request, arxiv_identifier_w_vn_nr): The merging takes places every time its downloaded to make sure all available report PDF's are included and the EdColAdmin doesn't have to compile the package every time again. """ - submission = get_object_or_404(Submission.objects.public(), - pdf_refereeing_pack__isnull=False, + submission = get_object_or_404(Submission.objects.public().exclude(pdf_refereeing_pack=''), arxiv_identifier_w_vn_nr=arxiv_identifier_w_vn_nr) response = HttpResponse(submission.pdf_refereeing_pack.read(), content_type='application/pdf') filename = '%s-refereeing-package.pdf' % submission.arxiv_identifier_w_vn_nr