SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 344aa83f authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Make organization pubfraction data visible to scipost admin only

parent 18aa189a
No related branches found
No related tags found
No related merge requests found
{% load bootstrap %}
{% load user_groups %}
{% load organizations_extras %}
<div class="card-body">
......@@ -13,7 +14,7 @@
</li>
{% endif %}
<li class="nav-item">
<a class="nav-link active" id="publications-{{ org.id }}-tab" data-toggle="tab" href="#publications-{{ org.id }}" role="tab" aria-controls="publications-{{ org.id }}" aria-selected="true">Publications & PubFractions</a>
<a class="nav-link active" id="publications-{{ org.id }}-tab" data-toggle="tab" href="#publications-{{ org.id }}" role="tab" aria-controls="publications-{{ org.id }}" aria-selected="true">Publications{% if is_scipost_admin %} & PubFractions{% endif %}</a>
</li>
<li class="nav-item">
<a class="nav-link" id="authors-{{ org.id }}-tab" data-toggle="tab" href="#authors-{{ org.id }}" role="tab" aria-controls="authors-{{ org.id }}" aria-selected="true">Associated Authors</a>
......@@ -41,9 +42,9 @@
{% endif %}
<div class="tab-pane show active pt-4" id="publications-{{ org.id }}" role="tabpanel" aria-labelledby="publications-{{ org.id }}-tab">
<h3>Publications associated to this Organization <span class="text-muted small">(with total PubFractions <i class="fa fa-info-circle" data-toggle="tooltip" data-html="true" title="" data-original-title="Fraction of a publication's funding/institutional support associated to a given Organization"></i>)</span>:</h3>
<h3>Publications associated to this Organization{% if is_scipost_admin %} <span class="text-muted small">(with total PubFractions <i class="fa fa-info-circle" data-toggle="tooltip" data-html="true" title="" data-original-title="Fraction of a publication's funding/institutional support associated to a given Organization"></i>)</span>{% endif %}:</h3>
{% for pubyear in pubyears %}
<h4>{{ pubyear }} <span class="text-muted small">(total pubfractions: {{ org|pubfractions_in_year:pubyear }})</span></h4>
<h4>{{ pubyear }}{% if is_scipost_admin %} <span class="text-muted small">(total pubfractions: {{ org|pubfractions_in_year:pubyear }})</span>{% endif %}</h4>
<ul>
{% for publication in org.get_publications %}
{% if publication.publication_date|date:'Y'|add:"0" == pubyear %}
......
......@@ -3,6 +3,7 @@
{% block pagetitle %}: Organizations{% endblock pagetitle %}
{% load staticfiles %}
{% load user_groups %}
{% load organizations_extras %}
{% block headsup %}
......@@ -52,7 +53,9 @@ $(document).ready(function($) {
<p>Click on a row to see more details about the Organization, including per-year breakdowns of:</p>
<ul>
<li>associated publications</li>
{% if is_scipost_admin %}
<li>associated support fractions</li>
{% endif %}
<li>associated authors</li>
<li>partnership history</li>
</ul>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment