diff --git a/news/models.py b/news/models.py index 0961cbe72c6a1c31e6a449044d3e5cef6191fe18..77637dad968fcaa031addf2307f5fb9efadab477 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 ab9a923654f60e1c6b70382bdfe6b8f89d642ed3..b2b5ec34696bba36e22e7b996e81a29e9b69ef10 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 %}