SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 1c7a6b37 authored by SwoopDoable's avatar SwoopDoable
Browse files

Reformat funding and grant fields

parent 89058bac
No related branches found
No related tags found
No related merge requests found
{% load bootstrap %} {% load bootstrap %}
<h2>Generic (not via grant) funders associated to this publication:</h2> <h2>Generic (not via grant) funders associated to this publication:</h2>
{% if publication.funders_generic.all|length > 0 %}
<ul> <ul>
{% for funder in publication.funders_generic.all %} {% for funder in publication.funders_generic.all %}
...@@ -11,11 +12,12 @@ ...@@ -11,11 +12,12 @@
hx-target="#funder-{{ funder.id }}" hx-target="#funder-{{ funder.id }}"
hx-swap="delete">{% include "bi/trash-fill.html" %}</a> hx-swap="delete">{% include "bi/trash-fill.html" %}</a>
</li> </li>
{% empty %}
<li>No generic funder found</li>
{% endfor %} {% endfor %}
</ul> </ul>
{% else %}
<p>No generic funder found</p>
{% endif %}
<div class="card p-3 mb-4"> <div class="card p-3 mb-4">
<h3>Associate a generic funder to this publication:</h3> <h3>Associate a generic funder to this publication:</h3>
......
...@@ -4,13 +4,24 @@ ...@@ -4,13 +4,24 @@
{% if publication.metadata.funding_statement %} {% if publication.metadata.funding_statement %}
<p>{{ publication.metadata.funding_statement }}</p> <p>{{ publication.metadata.funding_statement }}</p>
<div class="card p-3 mb-4">
<h3>Associate a grant to this publication:</h3>
<form hx-post="{% url 'journals:_hx_publication_metadata_add_grant_funding' publication.doi_label %}"
hx-target="#publication-grant-funding">
{% csrf_token %}
{{ form|bootstrap }}
<input class="btn btn-outline-secondary" type="submit" value="Add" />
</form>
</div>
{% else %} {% else %}
<p>No funding statement was found</p> <p>No funding statement was found</p>
{% endif %} {% endif %}
<h2>Grants associated to this publication:</h2> <h2>Grants associated to this publication:</h2>
{% if publication.grants.all|length > 0 %}
<ul> <ul>
{% for grant in publication.grants.all %} {% for grant in publication.grants.all %}
<li id="grant-{{ grant.id }}"> <li id="grant-{{ grant.id }}">
{{ grant }} {{ grant }}
...@@ -19,19 +30,8 @@ ...@@ -19,19 +30,8 @@
hx-target="#grant-{{ grant.id }}" hx-target="#grant-{{ grant.id }}"
hx-swap="delete">{% include "bi/trash-fill.html" %}</a> hx-swap="delete">{% include "bi/trash-fill.html" %}</a>
</li> </li>
{% empty %}
<li>no associated grants found</li>
{% endfor %} {% endfor %}
</ul> </ul>
{% else %}
<div class="card p-3 mb-4"> <p>No associated grants found.</p>
<h3>Associate a grant to this publication:</h3> {% endif %}
<form hx-post="{% url 'journals:_hx_publication_metadata_add_grant_funding' publication.doi_label %}"
hx-target="#publication-grant-funding">
{% csrf_token %}
{{ form|bootstrap }}
<input class="btn btn-outline-secondary" type="submit" value="Add" />
</form>
</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