diff --git a/journals/templates/journals/publication_detail.html b/journals/templates/journals/publication_detail.html index 18192bad57160fcc94d6c5124733994b7dbd30c3..324d8282d89d97490d4e54a269e3e272e6a3381e 100644 --- a/journals/templates/journals/publication_detail.html +++ b/journals/templates/journals/publication_detail.html @@ -11,161 +11,173 @@ {% block body_class %}{{ block.super }} publication{% endblock %} {% block breadcrumb_items %} - {{block.super}} - <a href="{{ journal.get_absolute_url }}" class="breadcrumb-item">{{ journal }}</a> - {% if publication.in_issue %} - <a href="{{ publication.in_issue.get_absolute_url }}" class="breadcrumb-item">{{ publication.in_issue.short_str }}</a> - {% endif %} - <span class="breadcrumb-item active">{{publication.title}}</span> +{{block.super}} +<a href="{{ journal.get_absolute_url }}" class="breadcrumb-item">{{ journal }}</a> +{% if publication.in_issue %} +<a href="{{ publication.in_issue.get_absolute_url }}" class="breadcrumb-item">{{ publication.in_issue.short_str }}</a> +{% endif %} +<span class="breadcrumb-item active">{{publication.title}}</span> {% endblock %} {% block headsup %} - <meta name="citation_title" content="{{ publication.title }}"/> - {% for author in publication.authors.all %} - {% if author.contributor %} - <meta name="citation_author" content="{{ author.contributor.user.last_name }}, {{ author.contributor.user.first_name }}"/> - {% elif author.unregistered_author %} - <meta name="citation_author" content="{{ author.unregistered_author.last_name }}, {{ author.unregistered_author.first_name }}"/> - {% endif %} - {% endfor %} - <meta name="citation_doi" content="{{ publication.doi_string }}"/> - <meta name="citation_publication_date" content="{{ publication.publication_date|date:'Y/m/d' }}"/> - <meta name="citation_journal_title" content="{{ journal }}"/> - <meta name="citation_issn" content="{{ journal.issn }}"/> - {% if publication.in_issue %} - <meta name="citation_volume" content="{{ publication.in_issue.in_volume.number }}"/> - <meta name="citation_issue" content="{{ publication.in_issue.number }}"/> - {% endif %} - <meta name="citation_firstpage" content="{{ publication.paper_nr|paper_nr_string_filter }}"/> - <meta name="citation_pdf_url" content="https://scipost.org/{{ publication.doi_string }}/pdf"/> - <meta name="dc.identifier" content="doi:{{ publication.doi_string }}"/> - - <script> - $(document).ready(function(){ - $("#citationslist").hide(); - - $("#citationslistbutton").click(function(){ - $("#citationslist").toggle(); - }); - }); - </script> +<meta name="citation_title" content="{{ publication.title }}"/> +{% for author in publication.authors.all %} +{% if author.contributor %} +<meta name="citation_author" content="{{ author.contributor.user.last_name }}, {{ author.contributor.user.first_name }}"/> +{% elif author.unregistered_author %} +<meta name="citation_author" content="{{ author.unregistered_author.last_name }}, {{ author.unregistered_author.first_name }}"/> +{% endif %} +{% endfor %} +<meta name="citation_doi" content="{{ publication.doi_string }}"/> +<meta name="citation_publication_date" content="{{ publication.publication_date|date:'Y/m/d' }}"/> +<meta name="citation_journal_title" content="{{ journal }}"/> +<meta name="citation_issn" content="{{ journal.issn }}"/> +{% if publication.in_issue %} +<meta name="citation_volume" content="{{ publication.in_issue.in_volume.number }}"/> +<meta name="citation_issue" content="{{ publication.in_issue.number }}"/> +{% endif %} +<meta name="citation_firstpage" content="{{ publication.paper_nr|paper_nr_string_filter }}"/> +<meta name="citation_pdf_url" content="https://scipost.org/{{ publication.doi_string }}/pdf"/> +<meta name="dc.identifier" content="doi:{{ publication.doi_string }}"/> + +<script> + $(document).ready(function(){ + $("#citationslist").hide(); + + $("#citationslistbutton").click(function(){ + $("#citationslist").toggle(); + }); + }); +</script> {% endblock headsup %} {% block content %} - {% if not publication.is_published and perms.can_publish_accepted_submission %} - <div class="card bg-warning text-white"> - <div class="card-body"> - <p class="card-text text-center"> - This Publication is not published yet. - Current status: {{ publication.get_status_display }} - </p> - </div> - </div> - {% endif %} - - {% is_edcol_admin request.user as is_edcol_admin %} - - {% include 'partials/journals/publication_summary.html' with publication=publication %} - - {% if publication.commentary and publication.commentary.comments.vetted.exists %} - <h3>Post-publication commentaries</h3> - <p> - This Publication ({{ publication.commentary.comments.vetted.count }}) has been commented on, see <a href="{{ publication.commentary.get_absolute_url }}">this Publication's Commentary page</a> for details. - </p> - {% endif %} - - {% if publication.citedby|length >= 1 %} - - <div class="row"> - <div class="col-6 col-md-2"> - <h3 class="mb-2">Cited by {{ publication.citedby|length }}</h3> - <a href="javascript:;" data-toggle="toggle" data-target="#citationslist">Toggle view</a> - </div> - <div class="col-6 col-md-2"> - <img src="{% static 'scipost/images/citedby.gif' %}" alt="Crossref Cited-by" width="64" /> - </div> - </div> - <div class="row" id="citationslist" style="display: none;"> - <div class="col-12"> - {% include 'journals/_publication_citations.html' with publication=publication %} - </div> - </div> - {% endif %} - <hr/> - <div class="row"> - <div class="col-12"> - <h4>Author{{ publication.authors.all|length|pluralize }} and Organization{{ affiliations_list|length|pluralize }} links</h4> - <ul class="list-inline"> - {% for author in publication.authors.all %} - <li class="list-inline-item"> - {% for aff in affiliations_list %} - {% if aff in author.affiliations.all %} - <sup>{{ forloop.counter }} </sup> - {% endif %}{% endfor %} - {% if author.is_registered %} - <a href="{{ author.contributor.get_absolute_url }}">{{ author.contributor.user.first_name }} {{ author.contributor.user.last_name }}</a> - {% else %} - {{ author.unregistered_author.first_name }} {{ author.unregistered_author.last_name }} - {% endif %} - </li> - {% if not forloop.last %}, {% endif %} - {% endfor %} - </ul> - - <ul class="list list-unstyled"> - {% for aff in affiliations_list %} - <li><sup>{{ forloop.counter }}</sup> <a href="{{ aff.get_absolute_url }}">{{ aff.name_full }}</a></li> - {% endfor %} - </ul> - - {% if publication.get_all_funders %} - <h4>Funder{{ publication.get_all_funders|length|pluralize }} for the research work leading to this publication</h4> - <ul> - {% for funder in publication.get_all_funders %} - <li><a href="{{ funder.get_absolute_url }}">{{ funder }}</a></li> - {% endfor %} - </ul> - {% endif %} - - {% if is_scipost_admin or is_edcol_admin %} - {% if publication.institutions.all %} - <h4>Institution{{ publication.institutions.all|pluralize }} related to this Publication (<span class="text-danger">Admin-only view, to be removed</span>)</h4> - <ul> - {% for institution in publication.institutions.all %} - <li><a href="{{ institution.get_absolute_url }}">{{ institution }}</a></li> - {% endfor %} - </ul> - {% endif %} - {% endif %} - </div> - </div> - - {% if request.user and request.user.contributor in publication.registered_authors.all %} - <h3>Author actions</h3> - <ul> - <li><a href="{% url 'commentaries:comment_on_publication' publication.doi_label %}">Place a comment on this publication</a></li> - </ul> - {% endif %} - - {% if publication.status == 'draft' and perms.scipost.can_draft_publication %} - <hr class="divider"> - <div class="row"> - <div class="col-12"> - {% include 'partials/journals/publication_preparation.html' with publication=publication %} - </div> - </div> - {% endif %} - - {% if is_edcol_admin %} - <hr class="divider"> - <div class="row"> - <div class="col-12"> - <h3>Editorial Administration tools</h3> - {% include 'partials/journals/admin/publication_actions.html' with publication=publication %} - </div> - </div> - {% endif %} +{% if not publication.is_published and perms.can_publish_accepted_submission %} +<div class="card bg-warning text-white"> + <div class="card-body"> + <p class="card-text text-center"> + This Publication is not published yet. + Current status: {{ publication.get_status_display }} + </p> + </div> +</div> +{% endif %} + +{% is_edcol_admin request.user as is_edcol_admin %} + +{% include 'partials/journals/publication_summary.html' with publication=publication %} + +{% if publication.commentary and publication.commentary.comments.vetted.exists %} +<h3>Post-publication commentaries</h3> +<p> + This Publication ({{ publication.commentary.comments.vetted.count }}) has been commented on, see <a href="{{ publication.commentary.get_absolute_url }}">this Publication's Commentary page</a> for details. +</p> +{% endif %} + +{% if publication.citedby|length >= 1 %} + +<div class="row"> + <div class="col-6 col-md-2"> + <h3 class="mb-2">Cited by {{ publication.citedby|length }}</h3> + <a href="javascript:;" data-toggle="toggle" data-target="#citationslist">Toggle view</a> + </div> + <div class="col-6 col-md-2"> + <img src="{% static 'scipost/images/citedby.gif' %}" alt="Crossref Cited-by" width="64" /> + </div> +</div> +<div class="row" id="citationslist" style="display: none;"> + <div class="col-12"> + {% include 'journals/_publication_citations.html' with publication=publication %} + </div> +</div> +{% endif %} +<hr/> + +<div class="card"> + <div class="card-header"> + Author{{ publication.authors.all|length|pluralize }}/Affiliation{{ affiliations_list|length|pluralize }}: mappings to Contributors and <a href="{% url 'organizations:organizations' %}" target="_blank">Organizations</a> + </div> + <div class="card-body"> + <ul class="list-inline m-1"> + {% for author in publication.authors.all %} + <li class="list-inline-item mr-1"> + {% for aff in affiliations_list %} + {% if aff in author.affiliations.all %} + <sup>{{ forloop.counter }} </sup> + {% endif %}{% endfor %} + {% if author.is_registered %} + <a href="{{ author.contributor.get_absolute_url }}">{{ author.contributor.user.first_name }} {{ author.contributor.user.last_name }}</a>{% else %}{{ author.unregistered_author.first_name }} {{ author.unregistered_author.last_name }}{% endif %}{% if not forloop.last %}, {% endif %} + </li> + {% endfor %} + </ul> + + <ul class="list list-unstyled m-2"> + {% for aff in affiliations_list %} + <li><sup>{{ forloop.counter }}</sup> <a href="{{ aff.get_absolute_url }}">{{ aff.name_full }}</a></li> + {% endfor %} + </ul> + </div> +</div> + +{% if publication.get_all_funders %} +<div class="card"> + <div class="card-header"> + Funder{{ publication.get_all_funders|length|pluralize }} for the research work leading to this publication + </div> + <div class="card-content"> + <ul class="m-2"> + {% for funder in publication.get_all_funders %} + <li><a href="{{ funder.get_absolute_url }}">{{ funder }}</a></li> + {% endfor %} + </ul> + </div> +</div> +{% endif %} + +{% if is_scipost_admin or is_edcol_admin %} +{% if publication.institutions.all %} +<div class="card"> + <div class="card-header"> + Institution{{ publication.institutions.all|pluralize }} related to this Publication (<span class="text-danger">Admin-only view, to be removed</span>) + </div> + <div class="card-content"> + <ul class="m-2"> + {% for institution in publication.institutions.all %} + <li><a href="{{ institution.get_absolute_url }}">{{ institution }}</a></li> + {% endfor %} + </ul> + </div> +</div> +{% endif %} +{% endif %} + + +{% if request.user and request.user.contributor in publication.registered_authors.all %} +<h3>Author actions</h3> +<ul> + <li><a href="{% url 'commentaries:comment_on_publication' publication.doi_label %}">Place a comment on this publication</a></li> +</ul> +{% endif %} + +{% if publication.status == 'draft' and perms.scipost.can_draft_publication %} +<hr class="divider"> +<div class="row"> + <div class="col-12"> + {% include 'partials/journals/publication_preparation.html' with publication=publication %} + </div> +</div> +{% endif %} + +{% if is_edcol_admin %} +<hr class="divider"> +<div class="row"> + <div class="col-12"> + <h3>Editorial Administration tools</h3> + {% include 'partials/journals/admin/publication_actions.html' with publication=publication %} + </div> +</div> +{% endif %} {% endblock content %}