From 5ebf79a992b2976a03fadee18acd6c79dcd57152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20Caux?= <git@jscaux.org> Date: Wed, 16 Feb 2022 12:25:14 +0100 Subject: [PATCH] Rework presentation of portal tabs --- .../scipost/portal/_hx_commentaries.html | 12 +++--- .../scipost/portal/_hx_comments.html | 12 +++--- .../scipost/portal/_hx_publications.html | 4 +- .../templates/scipost/portal/_hx_reports.html | 12 +++--- .../scipost/portal/_hx_submissions_base.html | 37 ++++++++++--------- .../templates/scipost/portal/_hx_theses.html | 12 +++--- 6 files changed, 46 insertions(+), 43 deletions(-) diff --git a/scipost_django/scipost/templates/scipost/portal/_hx_commentaries.html b/scipost_django/scipost/templates/scipost/portal/_hx_commentaries.html index 716bee0b7..353c9c260 100644 --- a/scipost_django/scipost/templates/scipost/portal/_hx_commentaries.html +++ b/scipost_django/scipost/templates/scipost/portal/_hx_commentaries.html @@ -10,6 +10,8 @@ </h2> </div> +<h2 class="highlight my-4">Commentaries{% if session_acad_field %} in {{ session_acad_field }}: {% if session_specialty %}{{ session_specialty }}{% else %}(all specialties){% endif %}{% else %} (all fields){% endif %}</h2> + <div class="d-flex justify-content-between"> <button class="btn btn-outline-primary" data-bs-toggle="collapse" data-bs-target="#commentariesSearch" aria-expanded="false" aria-controls="commentariesSearch"> {% include 'bi/search.html' %} Simple search / filter @@ -21,10 +23,10 @@ <div class="collapse" id="commentariesSearch"> <div class="card card-body"> <form - hx-post="{% url 'scipost:portal_hx_commentaries_page' %}?page=1" - hx-trigger="load, keyup delay:500ms, change" - hx-target="#commentaries-search-results" - hx-indicator="#indicator-commentaries-search" + hx-post="{% url 'scipost:portal_hx_commentaries_page' %}?page=1" + hx-trigger="load, keyup delay:500ms, change" + hx-target="#commentaries-search-results" + hx-indicator="#indicator-commentaries-search" > <div id="commentaries-search-form">{% crispy commentaries_search_form %}</div> </form> @@ -37,6 +39,4 @@ </div> </div> -<h2 class="highlight mb-0">Commentaries{% if session_acad_field %} in {{ session_acad_field }}: {% if session_specialty %}{{ session_specialty }}{% else %}(all specialties){% endif %}{% else %} (all fields){% endif %}</h2> - <ul id="commentaries-search-results" class="list-unstyled pool-list mt-2"></ul> diff --git a/scipost_django/scipost/templates/scipost/portal/_hx_comments.html b/scipost_django/scipost/templates/scipost/portal/_hx_comments.html index 87f2163c2..70fb62bb8 100644 --- a/scipost_django/scipost/templates/scipost/portal/_hx_comments.html +++ b/scipost_django/scipost/templates/scipost/portal/_hx_comments.html @@ -1,5 +1,7 @@ {% load crispy_forms_tags %} +<h2 class="highlight my-4">Comments on objects{% if session_acad_field %} in {{ session_acad_field }}: {% if session_specialty %}{{ session_specialty }}{% else %}(all specialties){% endif %}{% else %} (all fields){% endif %}</h2> + <div class="d-flex justify-content-between"> <button class="btn btn-outline-primary" data-bs-toggle="collapse" data-bs-target="#commentsSearch" aria-expanded="false" aria-controls="commentsSearch"> {% include 'bi/search.html' %} Simple search / filter @@ -11,10 +13,10 @@ <div class="collapse" id="commentsSearch"> <div class="card card-body"> <form - hx-post="{% url 'scipost:portal_hx_comments_page' %}?page=1" - hx-trigger="load, keyup delay:500ms, change" - hx-target="#comments-search-results" - hx-indicator="#indicator-comments-search" + hx-post="{% url 'scipost:portal_hx_comments_page' %}?page=1" + hx-trigger="load, keyup delay:500ms, change" + hx-target="#comments-search-results" + hx-indicator="#indicator-comments-search" > <div id="comments-search-form">{% crispy comments_search_form %}</div> </form> @@ -27,6 +29,4 @@ </div> </div> -<h2 class="highlight mb-0">Comments on objects{% if session_acad_field %} in {{ session_acad_field }}: {% if session_specialty %}{{ session_specialty }}{% else %}(all specialties){% endif %}{% else %} (all fields){% endif %}</h2> - <ul id="comments-search-results" class="list-unstyled pool-list mt-2"></ul> diff --git a/scipost_django/scipost/templates/scipost/portal/_hx_publications.html b/scipost_django/scipost/templates/scipost/portal/_hx_publications.html index 157fdd45a..4b378ca77 100644 --- a/scipost_django/scipost/templates/scipost/portal/_hx_publications.html +++ b/scipost_django/scipost/templates/scipost/portal/_hx_publications.html @@ -21,6 +21,9 @@ {% endif %} +<h2 class="highlight my-4">Publications{% if session_acad_field %} in {{ session_acad_field }}: {% if session_specialty %}{{ session_specialty }}{% else %}(all specialties){% endif %}{% else %} (all fields){% endif %}</h2> + + <div class="d-flex justify-content-between"> <button class="btn btn-outline-primary" data-bs-toggle="collapse" data-bs-target="#publicationsSearch" aria-expanded="false" aria-controls="publicationsSearch"> {% include 'bi/search.html' %} Simple search / filter @@ -48,7 +51,6 @@ </div> </div> -<h2 class="highlight mt-4 mb-0">Publications{% if session_acad_field %} in {{ session_acad_field }}: {% if session_specialty %}{{ session_specialty }}{% else %}(all specialties){% endif %}{% else %} (all fields){% endif %}</h2> <ul id="publications-search-results" class="list-unstyled pool-list mt-2"></ul> diff --git a/scipost_django/scipost/templates/scipost/portal/_hx_reports.html b/scipost_django/scipost/templates/scipost/portal/_hx_reports.html index c12a3f7fa..a018ac717 100644 --- a/scipost_django/scipost/templates/scipost/portal/_hx_reports.html +++ b/scipost_django/scipost/templates/scipost/portal/_hx_reports.html @@ -1,5 +1,7 @@ {% load crispy_forms_tags %} +<h2 class="highlight my-4">Reports on Submissions{% if session_acad_field %} in {{ session_acad_field }}: {% if session_specialty %}{{ session_specialty }}{% else %}(all specialties){% endif %}{% else %} (all fields){% endif %}</h2> + <div class="d-flex justify-content-between"> <button class="btn btn-outline-primary" data-bs-toggle="collapse" data-bs-target="#reportsSearch" aria-expanded="false" aria-controls="reportsSearch"> {% include 'bi/search.html' %} Simple search / filter @@ -11,10 +13,10 @@ <div class="collapse" id="reportsSearch"> <div class="card card-body"> <form - hx-post="{% url 'scipost:portal_hx_reports_page' %}?page=1" - hx-trigger="load, keyup delay:500ms, change" - hx-target="#reports-search-results" - hx-indicator="#indicator-reports-search" + hx-post="{% url 'scipost:portal_hx_reports_page' %}?page=1" + hx-trigger="load, keyup delay:500ms, change" + hx-target="#reports-search-results" + hx-indicator="#indicator-reports-search" > <div id="reports-search-form">{% crispy reports_search_form %}</div> </form> @@ -27,6 +29,4 @@ </div> </div> -<h2 class="highlight mb-0">Reports on Submissions{% if session_acad_field %} in {{ session_acad_field }}: {% if session_specialty %}{{ session_specialty }}{% else %}(all specialties){% endif %}{% else %} (all fields){% endif %}</h2> - <ul id="reports-search-results" class="list-unstyled pool-list mt-2"></ul> diff --git a/scipost_django/scipost/templates/scipost/portal/_hx_submissions_base.html b/scipost_django/scipost/templates/scipost/portal/_hx_submissions_base.html index 891d74173..5263b42f3 100644 --- a/scipost_django/scipost/templates/scipost/portal/_hx_submissions_base.html +++ b/scipost_django/scipost/templates/scipost/portal/_hx_submissions_base.html @@ -10,6 +10,25 @@ {% endif %} +<h2 class="highlight my-4">Submissions{% if session_acad_field %} in {{ session_acad_field }}: {% if session_specialty %}{{ session_specialty }}{% else %}(all specialties){% endif %}{% else %} (all fields){% endif %}</h2> + +{% if reports_needed %} + <div class="card m-2 border-2 text-center"> + <div class="card-header m-0 p-0"> + <h2 class="m-0 p-2 text-white bg-warning"> + {% include 'bi/alarm-fill.html' %} Reports are needed on these Submissions + </h2> + </div> + <div class="card-body"> + <h3><strong>Please consider contributing one</strong> (even if not explicitly invited to do so)!</h3> + <h3>Authors will be grateful, and our editorial processing will remain free of undue delays.</h3> + <p>To contribute a Report, please navigate to the Submission's page and click on the <strong>Contribute a Report</strong> link {% if not user.is_authenticated %}(login required){% endif %} + </div> + </div> + + <hr> +{% endif %} + <div class="d-flex justify-content-between"> <button class="btn btn-outline-primary" data-bs-toggle="collapse" data-bs-target="#{{ name }}Search" aria-expanded="false" aria-controls="{{ name }}Search"> {% include 'bi/search.html' %} Simple search / filter @@ -37,23 +56,5 @@ </div> </div> -<h2 class="highlight mt-4 mb-0">Submissions in {{ session_acad_field }}: {% if session_specialty %}{{ session_specialty }}{% else %}(all specialties){% endif %}</h2> - -{% if reports_needed %} - <div class="card m-2 border-2 text-center"> - <div class="card-header m-0 p-0"> - <h2 class="m-0 p-2 text-white bg-warning"> - {% include 'bi/alarm-fill.html' %} Reports are needed on these Submissions - </h2> - </div> - <div class="card-body"> - <h3><strong>Please consider contributing one</strong> (even if not explicitly invited to do so)!</h3> - <h3>Authors will be grateful, and our editorial processing will remain free of undue delays.</h3> - <p>To contribute a Report, please navigate to the Submission's page and click on the <strong>Contribute a Report</strong> link {% if not user.is_authenticated %}(login required){% endif %} - </div> - </div> - - <hr> -{% endif %} <ul id="{{ name }}-search-results" class="list-unstyled pool-list mt-2"></ul> diff --git a/scipost_django/scipost/templates/scipost/portal/_hx_theses.html b/scipost_django/scipost/templates/scipost/portal/_hx_theses.html index f3d2a3545..7078b5f0a 100644 --- a/scipost_django/scipost/templates/scipost/portal/_hx_theses.html +++ b/scipost_django/scipost/templates/scipost/portal/_hx_theses.html @@ -5,6 +5,8 @@ <h2><a href="{% url 'theses:request_thesislink' %}">Request a new Thesis Link</a></h2> </div> +<h2 class="highlight my-4">Thesis links{% if session_acad_field %} in {{ session_acad_field }}: {% if session_specialty %}{{ session_specialty }}{% else %}(all specialties){% endif %}{% else %} (all fields){% endif %}</h2> + <div class="d-flex justify-content-between"> <button class="btn btn-outline-primary" data-bs-toggle="collapse" data-bs-target="#thesesSearch" aria-expanded="false" aria-controls="thesesSearch"> {% include 'bi/search.html' %} Simple search / filter @@ -16,10 +18,10 @@ <div class="collapse" id="thesesSearch"> <div class="card card-body"> <form - hx-post="{% url 'scipost:portal_hx_theses_page' %}?page=1" - hx-trigger="load, keyup delay:500ms, change" - hx-target="#theses-search-results" - hx-indicator="#indicator-theses-search" + hx-post="{% url 'scipost:portal_hx_theses_page' %}?page=1" + hx-trigger="load, keyup delay:500ms, change" + hx-target="#theses-search-results" + hx-indicator="#indicator-theses-search" > <div id="theses-search-form">{% crispy theses_search_form %}</div> </form> @@ -32,6 +34,4 @@ </div> </div> -<h2 class="highlight mb-0">Thesis links{% if session_acad_field %} in {{ session_acad_field }}: {% if session_specialty %}{{ session_specialty }}{% else %}(all specialties){% endif %}{% else %} (all fields){% endif %}</h2> - <ul id="theses-search-results" class="list-unstyled pool-list mt-2"></ul> -- GitLab