From 9895c91d64e74ac22e7fe6a082f5bd3aaf13c94f Mon Sep 17 00:00:00 2001
From: George Katsikas <giorgakis.katsikas@gmail.com>
Date: Fri, 6 Dec 2024 17:17:09 +0100
Subject: [PATCH] add new ref. indication button in pool

---
 .../pool/_submission_refereeing.html           | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/scipost_django/submissions/templates/submissions/pool/_submission_refereeing.html b/scipost_django/submissions/templates/submissions/pool/_submission_refereeing.html
index f8aa914e2..05f8947b1 100644
--- a/scipost_django/submissions/templates/submissions/pool/_submission_refereeing.html
+++ b/scipost_django/submissions/templates/submissions/pool/_submission_refereeing.html
@@ -20,13 +20,21 @@
     </div>
   {% endif %}
 
-  {% if submission.referee_indications.all %}
-    <div class="col-12">
-      <h4>Refereeing indications</h4>
+  <div class="col-12">
+    <h4 class="d-flex justify-content-between">
+      <span>Refereeing indications</span>
+      <a class="btn btn-primary btn-sm" href="{% url "submissions:referee_indications" identifier_w_vn_nr=submission.preprint.identifier_w_vn_nr %}">
+        <span class="me-2">{% include "bi/plus-square-fill.html" %}</span>
+        <span>Add indication</span>
+      </a>
+    </h4>
+    {% if submission.referee_indications.exists %}
       <div hx-get="{% url "submissions:_hx_referee_indication_table" identifier_w_vn_nr=submission.preprint.identifier_w_vn_nr %}"
            hx-trigger="load once, referee-indications-updated from:body delay:1s"></div>
-    </div>
-  {% endif %}
+    {% else %}
+      <p>No referee indications yet.</p>
+    {% endif %}
+  </div>
 
   <div class="col-12 col-md-6 d-flex flex-column gap-2">
     <div>{% include "submissions/pool/_submission_recommendation_card.html" %}</div>
-- 
GitLab