From dd5634d4eb6b8e8f7db3f5749a8285a51972886b Mon Sep 17 00:00:00 2001 From: "J.-S. Caux" <J.S.Caux@uva.nl> Date: Wed, 14 Jul 2021 15:38:58 +0200 Subject: [PATCH] Only show active Journals --- .../journals/templates/journals/journal_list.html | 8 ++++---- scipost_django/scipost/templates/scipost/navbar.html | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scipost_django/journals/templates/journals/journal_list.html b/scipost_django/journals/templates/journals/journal_list.html index 11c4cce22..25fd4ae33 100644 --- a/scipost_django/journals/templates/journals/journal_list.html +++ b/scipost_django/journals/templates/journals/journal_list.html @@ -104,14 +104,14 @@ </thead> <tbody> {% for branch in branches %} - {% if branch.journals.all|length > 0 %} + {% if branch.journals.active.all|length > 0 %} <tr> <td class="align-middle"> <small>{{ branch.name }}</small> </td> <td> {% for acad_field in branch.academic_fields.all %} - {% if acad_field.journals.all|length > 0 %} + {% if acad_field.journals.active.all|length > 0 %} <a href={% url 'journals:journals' %}?field={{ acad_field.slug }} class="btn btn-primary btn-sm"><small>{{ acad_field.name }}</small></a> {% else %} <button type="button" class="btn btn-sm btn-outline-secondary m-1"><small><em>{{ acad_field.name }}</em></small></button> @@ -131,12 +131,12 @@ <table class="table table-borderless"> {% for branch in branches %} {% for acad_field in branch.academic_fields.all %} - {% if acad_field.journals.all|length > 0 %} + {% if acad_field.journals.active.all|length > 0 %} <tr> <td class="align-middle"><strong>{{ acad_field.name }}</strong></td> <td> <ul class="list-group m-2"> - {% for journal in acad_field.journals.all %} + {% for journal in acad_field.journals.active.all %} <li class="list-group-item m-1 px-3 py-2 {{ journal.doi_label }}"> <a href="{{ journal.get_absolute_url }}">{{ journal.name }}</a> </li> diff --git a/scipost_django/scipost/templates/scipost/navbar.html b/scipost_django/scipost/templates/scipost/navbar.html index d63242538..545cd96ff 100644 --- a/scipost_django/scipost/templates/scipost/navbar.html +++ b/scipost_django/scipost/templates/scipost/navbar.html @@ -53,7 +53,7 @@ </td> <td> {% for acad_field in branch.academic_fields.all %} - {% if acad_field.journals.all|length > 0 %} + {% if acad_field.journals.active.all|length > 0 %} <a href={% url 'journals:journals' %}?field={{ acad_field.slug }} class="btn btn-primary btn-sm"><small>{{ acad_field.name }}</small></a> {% endif %} {% endfor %} -- GitLab