SciPost Code Repository

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

Improve and debug

parent b56dc238
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@
{% for auth in publication.authors.all %}
<li>
<div class="row">
<div class="col-6">
<div class="col-5">
<h3>{{ auth }}</h3>
<ul>
{% for aff in auth.affiliations.all %}
......@@ -39,14 +39,18 @@
{% endfor %}
</ul>
</div>
<div class="col-6">
<h4>Add an affiliation:</h4>
<div class="col-5">
<h4>Add an affiliation (at moment of publication) to this Author:</h4>
<form action="{% url 'journals:author_affiliation_update' doi_label=publication.doi_label pk=auth.pk %}" method="post">
{% csrf_token %}
{{ add_affiliation_form|bootstrap }}
<input type="submit" name="submit" value="Add" class="btn btn-outline-secondary">
</form>
</div>
<div class="col-2">
<p>Can't find it in the selector? <a href="{% url 'partners:organization_create' %}" target=_"blank">Add a new organization to our database</a></p>
</div>
</div>
</li>
{% empty %}
......
......@@ -56,7 +56,7 @@
<given_name>{{ author_object.first_name }}</given_name>
<surname>{{ author_object.last_name }}</surname>
{% if author_object.affiliations %}
{% for aff in author_object.affiliations %}
{% for aff in author_object.affiliations.all %}
<affiliation>{{ aff.name }}</affiliation>
{% endfor %}
{% endif %}
......
......@@ -45,22 +45,28 @@
<div class="tab-pane pt-4" id="authors" role="tabpanel" aria-labelledby="authors-tab">
<h3>Associated Authors:</h3>
<h4>Registered Contributors:</h4>
<ul>
{% for author in org.get_contributor_authors %}
<li><a href="{{ author.get_absolute_url }}">{{ author }}</a></li>
{% empty %}
<li>No Contributors found</li>
{% endfor %}
</ul>
<h4>Unregistered:</h4>
<ul>
{% for author in org.get_unregistered_authors %}
<li>{{ author }}</li>
{% empty %}
<li>No unregistered author found</li>
{% endfor %}
</ul>
<div class="row">
<div class="col-6">
<h4>Registered Contributors:</h4>
<ul>
{% for author in org.get_contributor_authors %}
<li><a href="{{ author.get_absolute_url }}">{{ author }}</a></li>
{% empty %}
<li>No Contributors found</li>
{% endfor %}
</ul>
</div>
<div class="col-6">
<h4>Unregistered:</h4>
<ul>
{% for author in org.get_unregistered_authors %}
<li>{{ author }}</li>
{% empty %}
<li>No unregistered author found</li>
{% endfor %}
</ul>
</div>
</div>
</div>
<div class="tab-pane pt-4" id="partnership" role="tabpanel" aria-labelledby="partnership-tab">
......
......@@ -12,7 +12,6 @@
</div>
<hr/>
<div class="row">
<div class="col-12">
<table class="table table-hover mb-5">
......
......@@ -48,6 +48,7 @@ class OrganizationCreateView(PermissionsMixin, CreateView):
"""
permission_required = 'scipost.can_manage_organizations'
model = Organization
fields = '__all__'
template_name = 'partners/organization_create.html'
success_url = reverse_lazy('partners:organization_list')
......
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