From 21c58fa8d129e87b57f943a1d0cf5a89fc4cf7db Mon Sep 17 00:00:00 2001
From: Jorran de Wit <jorrandewit@outlook.com>
Date: Wed, 2 Aug 2017 12:19:10 +0200
Subject: [PATCH] Alter stuff

---
 news/models.py                       | 1 +
 scipost/templates/scipost/index.html | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/news/models.py b/news/models.py
index 0961cbe72..77637dad9 100644
--- a/news/models.py
+++ b/news/models.py
@@ -15,6 +15,7 @@ class NewsItem(models.Model):
 
     class Meta:
         db_table = 'scipost_newsitem'
+        ordering = ['-date']
 
     def __str__(self):
         return self.date.strftime('%Y-%m-%d') + ', ' + self.headline
diff --git a/scipost/templates/scipost/index.html b/scipost/templates/scipost/index.html
index ab9a92365..b2b5ec346 100644
--- a/scipost/templates/scipost/index.html
+++ b/scipost/templates/scipost/index.html
@@ -9,7 +9,11 @@
     <nav class="submenu">
         <span class="item">Our Journals:</span>
         {% for journal in journals %}
-            <a href="{{journal.get_absolute_url}}" class="item">{{journal}}</a>
+            {% if journal.active %}
+                <a href="{{journal.get_absolute_url}}" class="item">{{journal}}</a>
+            {% else %}
+                <a href="{% url 'journal:about' journal.name %}" class="item">{{journal}}</a>
+            {% endif %}
         {% endfor %}
     </nav>
 {% endblock %}
-- 
GitLab