From af44658ba58e9c2168eae7f3b6c3ea75f201b663 Mon Sep 17 00:00:00 2001
From: George Katsikas <giorgakis.katsikas@gmail.com>
Date: Wed, 25 Oct 2023 15:33:37 +0200
Subject: [PATCH] hide template in author guidelines with no journal

fixes #93
---
 .../templates/submissions/_author_guidelines.html         | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/scipost_django/submissions/templates/submissions/_author_guidelines.html b/scipost_django/submissions/templates/submissions/_author_guidelines.html
index e66740993..cbdd7fce8 100644
--- a/scipost_django/submissions/templates/submissions/_author_guidelines.html
+++ b/scipost_django/submissions/templates/submissions/_author_guidelines.html
@@ -47,12 +47,18 @@
 	  {% endif %}
 	</li>
       {% empty %}
-	<li>No templates are available at this time &emsp;<em>(for Proceedings: you will find templates in the Proceedings' detail page)</em></li>
+      {% if journal %}
+      <li>No templates are available at this time &emsp;<em>(for Proceedings: you will find templates in the Proceedings' detail page)</em></li>
+      {% else %}
+      <li>To access available templates, please visit the author guidelines page in the "about" section for your prefered <a href="{% url 'scipost:index' %}?tab=journals">target journal</a>.</li>
+      {% endif %}
       {% endfor %}
       </ul>
 
+      {% if journal.required_article_elements %}
       <h3 class="mb-2">The article should contain the following elements:</h3>
       {% automarkup journal.required_article_elements language_forced='reStructuredText' %}
+      {% endif %}
 
       <hr>
       <h2 class="highlight" id="manusub">Manuscript submission</h2>
-- 
GitLab