diff --git a/journals/models.py b/journals/models.py index a7c846e42bba6ecf7c0a37b00cbbe046ece1eaae..3a859cb3fd501077c1b6163911d5aa3a76a77c2d 100644 --- a/journals/models.py +++ b/journals/models.py @@ -516,6 +516,8 @@ class Publication(models.Model): return self.in_journal or self.in_issue.in_volume.in_journal def get_paper_nr(self): + if self.in_journal: + return self.paper_nr return paper_nr_string(self.paper_nr) def citation_rate(self): diff --git a/journals/templates/journals/_base.html b/journals/templates/journals/_base.html index e34dfe309b1be6a58efb59172be166bd88fb298d..b1fc60fa1e6253c2881e2aec50d3eb9398080fd0 100644 --- a/journals/templates/journals/_base.html +++ b/journals/templates/journals/_base.html @@ -21,7 +21,7 @@ <div class="container mt-3"> <div class="row"> <div class="col journal"> - <h2 class="banner d-inline-block mr-2"><a href="{{ journal.get_absolute_url }}">{{journal}}</a></h2> + <h2 class="banner d-inline-block mr-2 mb-0"><a href="{{ journal.get_absolute_url }}">{{journal}}</a></h2> <ul class="links"> {% if journal.active or request.user.is_staff %} {% if journal.has_issues %} diff --git a/journals/templates/partials/journals/publication_ris.html b/journals/templates/partials/journals/publication_ris.html new file mode 100644 index 0000000000000000000000000000000000000000..64d1bf2cf6f3df71a0bfbf06c9f0a8eebc79f5ab --- /dev/null +++ b/journals/templates/partials/journals/publication_ris.html @@ -0,0 +1,28 @@ +{% spaceless %} + <pre> + <code> + <span>TY - JOUR</span><br> + <span>PB - SciPost Foundation</span><br> + <span>DO - {{ publication.doi_string }}</span><br> + <span>TI - {{ publication.title }}</span><br> + <span>PY - {{ publication.publication_date|date:'Y/m/d' }}</span><br> + <span>UR - https://scipost.org{{ publication.get_absolute_url }}</span><br> + <span>JF - {{ publication.get_journal.get_name_display }}</span><br> + <span>JA - {{ publication.get_journal.abbreviation_citation }}</span><br> + {% if publication.in_issue %} + <span>VL - {{ publication.in_issue.in_volume.number }}</span><br> + <span>IS - {{ publication.in_issue.number }}</span><br> + {% endif %} + <span>SP - {{ publication.get_paper_nr }}</span><br> + {% for author in publication.authors.all %} + {% if forloop.first %} + <span>A1 - {{ author.last_name }}, {{ author.first_name }}</span><br> + {% else %} + <span>AU - {{ author.last_name }}, {{ author.first_name }}</span><br> + {% endif %} + {% endfor %} + <span>AB - {{ publication.abstract }}</span><br> + <span>ER -</span> + </code> + </pre> +{% endspaceless %} diff --git a/journals/templates/partials/journals/publication_summary.html b/journals/templates/partials/journals/publication_summary.html index 2042920f8142d3eb59fab3a87a31db0142ad2289..ff6b434747ef4d4944b263e1dc90df7a49af6d24 100644 --- a/journals/templates/partials/journals/publication_summary.html +++ b/journals/templates/partials/journals/publication_summary.html @@ -17,6 +17,7 @@ <a href="{{publication.get_absolute_url}}/pdf" target="_blank">pdf</a> </li> <li><a href="javascript:;" data-toggle="modal" data-target="#bibtextmodal">BiBTeX</a></li> + <li><a href="javascript:;" data-toggle="modal" data-target="#rismodal">RIS</a></li> <li><a href="{% url 'submissions:submission' publication.accepted_submission.arxiv_identifier_w_vn_nr %}">Submissions/Reports</a></li> <li> <!-- Start Crossmark Snippet v2.0 --> @@ -40,6 +41,22 @@ </div> +<div class="modal" id="rismodal" tabindex="-1" role="dialog" aria-hidden="true" aria-labelledby="rismodal"> + <div class="modal-dialog modal-lg" role="document"> + <div class="modal-content"> + <div class="modal-body"> + <div class="pb-4"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"> + <span aria-hidden="true">×</span> + </button> + </div> + <div>{% include 'partials/journals/publication_ris.html' with publication=publication %}</div> + </div> + </div> + </div> +</div> + + <div class="modal" id="bibtextmodal" tabindex="-1" role="dialog" aria-hidden="true" aria-labelledby="bibtextmodal"> <div class="modal-dialog modal-lg" role="document"> <div class="modal-content">