From f59176ab8825e98e93f5f08ec6b2ad291cadb0f4 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Wed, 3 Oct 2012 15:15:53 +0200 Subject: [PATCH] Don't generate empty next/prev links when there are no messages --- django/archives/mailarchives/templates/datelist.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/django/archives/mailarchives/templates/datelist.html b/django/archives/mailarchives/templates/datelist.html index cb7dca1..3c058a9 100644 --- a/django/archives/mailarchives/templates/datelist.html +++ b/django/archives/mailarchives/templates/datelist.html @@ -16,6 +16,7 @@ {%endif%} {%endfor%} +{%if messages%} {%with messages|first as firstmsg%} Prev {%endwith%} @@ -23,6 +24,7 @@ {%with messages|last as lastmsg%} Next {%endwith%} +{%endif%} {%if daysinmonth%} -- 2.39.5