diff --git a/comments/models.py b/comments/models.py index 648f740627db2e3ecee7f4e2eb71cefc7aaf3f1e..06225901ff8030dadb2293710432eae288b6d146 100644 --- a/comments/models.py +++ b/comments/models.py @@ -137,6 +137,13 @@ class Comment(TimeStampedModel): self.doi_label = 'SciPost.Comment.' + str(self.id) self.save() + @property + def doi_string(self): + if self.doi_label: + return '10.21468/' + self.doi_label + else: + return None + def get_absolute_url(self): return self.content_object.get_absolute_url().split('#')[0] + '#comment_id' + str(self.id) diff --git a/comments/templates/comments/_comment_identifier.html b/comments/templates/comments/_comment_identifier.html index 5e668b933aefc737db21a22149daf829a8594fce..9c6b3127739c49b13fd1ca126d527188285b0c76 100644 --- a/comments/templates/comments/_comment_identifier.html +++ b/comments/templates/comments/_comment_identifier.html @@ -6,8 +6,10 @@ <a href="{{comment.author.get_absolute_url}}">{{comment.author.user.first_name}} {{comment.author.user.last_name}}</a> on {{comment.date_submitted|date:'Y-m-d'}} + {% if comment.doi_string %} <small>doi: {{ comment.doi_string }}</small>{% endif %} </h3> + {% if comment|is_reply_to_comment %} (in reply to <a href="{{comment.get_absolute_url}}">{{comment.content_object.author.user.first_name}} {{comment.content_object.author.user.last_name}}</a> on {{comment.content_object.date_submitted|date:'Y-m-d'}}) {% elif comment|is_reply_to_report %} diff --git a/journals/templates/journals/generic_metadata_xml_deposit.html b/journals/templates/journals/generic_metadata_xml_deposit.html index a91ff6e388626708ae256bc71a493a3233476c3f..535368b03d02a733cc6aed424e4bf365ad846a98 100644 --- a/journals/templates/journals/generic_metadata_xml_deposit.html +++ b/journals/templates/journals/generic_metadata_xml_deposit.html @@ -26,7 +26,7 @@ <h3 class="mt-3">Response text:</h3> <p>{{ response_text|linebreaks }}</p> - <h3>Return to the <a href="{% url 'journals:manage_report_metadata' %}">report</a> or to the <a href="{% url 'journals:manage_comment_metadata' %}">commentt</a> metadata management page</h3> + <h3>Return to the <a href="{% url 'journals:manage_report_metadata' %}">report</a> or to the <a href="{% url 'journals:manage_comment_metadata' %}">comment</a> metadata management page</h3> </div> </div> diff --git a/submissions/models.py b/submissions/models.py index 3514ca2ee5c0c07e7286f25a88868e3f203014c9..597d71e0a908fc847f8e41bc4c7026b0dd2c8aad 100644 --- a/submissions/models.py +++ b/submissions/models.py @@ -422,6 +422,8 @@ class Report(SubmissionRelatedObjectMixin, models.Model): def doi_string(self): if self.doi_label: return '10.21468/' + self.doi_label + else: + return None @cached_property def title(self): diff --git a/submissions/templates/submissions/_report_tex_template.html b/submissions/templates/submissions/_report_tex_template.html index edb59afc172ed68722591107bcd2b97c5a737a01..466bd507f04e4b765986ca5ca7ecc93e5acba4dd 100644 --- a/submissions/templates/submissions/_report_tex_template.html +++ b/submissions/templates/submissions/_report_tex_template.html @@ -63,7 +63,6 @@ Report by {% if report.anonymous %}anonymous{% else %}{{report.author.user.first %%%%%%%%%% COPYRIGHT {\small Copyright {% if report.anonymous %}anonymous{% else %}{{report.author.user.first_name}} {{report.author.user.last_name}}{% endif %}. \newline - This work is licensed under the Creative Commons \newline \href{http://creativecommons.org/licenses/by/4.0/}{Attribution 4.0 International License}. \newline Published by the SciPost Foundation. diff --git a/submissions/templates/submissions/_single_public_report_without_comments.html b/submissions/templates/submissions/_single_public_report_without_comments.html index 289f2169d1d34bc4bd64517f86e2dea2d29ff11e..9c322add27afc2ce4dc3e155922d7bca5c2824e9 100644 --- a/submissions/templates/submissions/_single_public_report_without_comments.html +++ b/submissions/templates/submissions/_single_public_report_without_comments.html @@ -8,15 +8,18 @@ <div class="reportid"> <h3>{% if report.anonymous %}(chose public anonymity) {% endif %}<a href="{{report.author.get_absolute_url}}">{{ report.author.user.first_name }} {{ report.author.user.last_name }}</a> - on {{ report.date_submitted|date:'Y-n-j' }}</h3> + on {{ report.date_submitted|date:'Y-n-j' }} </h3> - {% 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> + <ul class="publicationClickables"> + {% if report.doi_string %}<li>doi: {{ report.doi_string }}</li>{% endif %} + {% if report.pdf_report %} + <li><a href="{% url 'submissions:report_detail_pdf' report.submission.arxiv_identifier_w_vn_nr report.report_nr %}" target="_blank">Download as PDF</a></li> {% endif %} {% if perms.scipost.can_manage_reports %} - {% if report.pdf_report %}· {% endif %}<a href="{% url 'submissions:report_pdf_compile' report.id %}">Update/Compile the Report pdf</a> - {% endif %} - </div> + <li><a href="{% url 'submissions:report_pdf_compile' report.id %}">Update/Compile the Report pdf</a></li> + {% endif %} + </ul> +</div> {% if report.flagged %} <h4 class="text-danger font-weight-bold">CAUTION: check if this referee has been flagged by the authors</h4>