SciPost Code Repository

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

Populate portal journals tab

parent 9dba147e
No related branches found
No related tags found
No related merge requests found
......@@ -5,9 +5,6 @@
{% load journals_extras %}
{% load scipost_extras %}
{% block headsup %}
<style>{% for journal in object_list %}{% if journal.style %}{{ journal.style }}{% endif %}{% endfor %}</style>
{% endblock headsup %}
{% block meta_description %}{{ block.super }} {% if acad_field %} in {{ acad_field.name }}{% endif %}{% endblock meta_description %}
{% block pagetitle %}: Journals{% if acad_field %} in {{ acad_field.name }}{% endif %}{% endblock pagetitle %}
......
......@@ -20,6 +20,8 @@
<title>SciPost{% block pagetitle %}{% endblock pagetitle %}</title>
<style>{% for journal in journals %}{% if journal.style %}{{ journal.style }}{% endif %}{% endfor %}</style>
{% block headsup %}
{% endblock headsup %}
</head>
......
{% load static %}
{% load automarkup %}
{% load journals_extras %}
{% load scipost_extras %}
{% if session_acad_field %}
<div class="row">
{% for journal in session_acad_field.journals %}
{% if journal.active or perms.scipost.can_view_pool %}
<div class="col-md-6 col-lg-4 mb-2" style="{{ journal.style }}">
<div class="card">
<div class="card-header {{ journal.doi_label }}">
<a href="{{ journal.get_absolute_url }}">{{ journal.name }}</a>
{% if journal.has_DOAJ_Seal %}
<a href="https://doaj.org" class="float-end"><img src="{% static 'scipost/images/DOAJ_Seal_logo_big.png' %}" alt="DOAJ Seal" width="20em"></a>
{% endif %}
</div>
<div class="card-body">
{{ journal.blurb|automarkup }}
</div>
{% if journal.series_set.all|length > 0 %}
<div class="card-footer">
Series hosted in this Journal:
<ul>
{% for series in journal.series_set.all %}
<li>
<a href="{{ series.get_absolute_url }}" target="_blank">{{ series }}</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>
</div>
{% endif %}
{% empty %}
<p>
There are no Journals yet in this branch of academia.
<strong>Help us to get started: nominate potential Fellows by <a href="mailto:admin@{{ request.get_host }}">emailing us</a> with your suggestions!</strong>
</p>
{% endfor %}
{% else %}
<h2 class="highlight">Full list of our Journals</h2>
<table class="table table-borderless">
{% for branch in branches %}
{% for acad_field in branch.academic_fields.all %}
{% 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.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>
{% endfor %}
</ul>
</td>
</tr>
{% endif %}
{% endfor %}
{% endfor %}
</table>
{% endif %}
......@@ -81,27 +81,30 @@
<div class="tab-pane fade" id="journals"
role="tabpanel" aria-labelledby="journals-tab">
Journals
<div hx-get="{% url 'scipost:portal_hx_journals' %}"
hx-trigger="click from:#journals-tab, session-acad-field-set[document.getElementById('journals').classList.contains('active')] from:body"
>
</div>
</div>
<div class="tab-pane fade show active" id="publications"
role="tabpanel" aria-labelledby="publications-tab">
<div hx-get="{% url 'scipost:portal_hx_publications' %}"
hx-trigger="load, click from:#publications-tab, session-acad-field-set[document.getElementById('publications').classList.contains('active')] from:body, session-specialty-set[document.getElementById('publications').classList.contains('active')] from:body"
>
>
</div>
</div>
</div>
<div class="tab-pane fade" id="submissions"
role="tabpanel" aria-labelledby="submissions-tab">
<div hx-get="{% url 'scipost:portal_hx_submissions' %}"
hx-trigger="click from:#submissions-tab, session-acad-field-set[document.getElementById('submissions').classList.contains('active')] from:body, session-specialty-set[document.getElementById('submissions').classList.contains('active')] from:body"
>
<div class="tab-pane fade" id="submissions"
role="tabpanel" aria-labelledby="submissions-tab">
<div hx-get="{% url 'scipost:portal_hx_submissions' %}"
hx-trigger="click from:#submissions-tab, session-acad-field-set[document.getElementById('submissions').classList.contains('active')] from:body, session-specialty-set[document.getElementById('submissions').classList.contains('active')] from:body"
>
</div>
</div>
</div>
<div class="tab-pane fade" id="reports-needed"
role="tabpanel" aria-labelledby="reports-needed-tab">
<div class="tab-pane fade" id="reports-needed"
role="tabpanel" aria-labelledby="reports-needed-tab">
Reports needed!
</div>
......
......@@ -88,6 +88,11 @@ urlpatterns = [
),
# HTMX-delivered fragments
path(
'portal/_hx_journals',
TemplateView.as_view(template_name='scipost/portal/_hx_journals.html'),
name='portal_hx_journals'
),
path(
'portal/_hx_publications',
views.portal_hx_publications,
......
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