SciPost Code Repository

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

Add authors of child orgs to org detail page

parent 75d6eace
No related branches found
No related tags found
No related merge requests found
...@@ -104,16 +104,42 @@ $(document).ready(function($) { ...@@ -104,16 +104,42 @@ $(document).ready(function($) {
</div> </div>
<div class="tab-pane pt-4" id="authors-{{ org.id }}" role="tabpanel" aria-labelledby="authors-{{ org.id }}-tab"> <div class="tab-pane pt-4" id="authors-{{ org.id }}" role="tabpanel" aria-labelledby="authors-{{ org.id }}-tab">
<h3>Associated Authors:</h3> <div class="row">
{% for profile in org.get_author_profiles %} <div class="col-lg-6">
{% if profile.contributor %} <h3>Associated Authors:</h3>
<li><a href="{{ profile.contributor.get_absolute_url }}">{{ profile }}</a></li> {% for profile in org.get_author_profiles %}
{% else %} {% if profile.contributor %}
<li>{{ profile }}</li> <li><a href="{{ profile.contributor.get_absolute_url }}">{{ profile }}</a></li>
{% endif %} {% else %}
{% empty %} <li>{{ profile }}</li>
<li>No Profile found</li> {% endif %}
{% endfor %} {% empty %}
<li>No Profile found</li>
{% endfor %}
</div>
{% if org.children.all|length > 0 %}
<div class="col-lg-6">
<h3>Associated authors from sub-organizations:</h3>
<ul>
{% for child in org.children.all %}
<li>{{ child }}:
<ul>
{% for profile in child.get_author_profiles %}
{% if profile.contributor %}
<li><a href="{{ profile.contributor.get_absolute_url }}">{{ profile }}</a></li>
{% else %}
<li>{{ profile }}</li>
{% endif %}
{% empty %}
<li>No Profile found</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>
</div> </div>
......
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