From 53e7eee9c2790aa004a5dcc606c5500a92023f1b Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Mon, 14 Jan 2013 21:44:31 +0100 Subject: [PATCH] Include Prev/Next links and date list at top of lists as well --- .../archives/mailarchives/templates/datelist.html | 15 ++------------- .../templates/datelist_topandbottom.html | 13 +++++++++++++ 2 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 django/archives/mailarchives/templates/datelist_topandbottom.html diff --git a/django/archives/mailarchives/templates/datelist.html b/django/archives/mailarchives/templates/datelist.html index 2fdd9b9..d00b4f1 100644 --- a/django/archives/mailarchives/templates/datelist.html +++ b/django/archives/mailarchives/templates/datelist.html @@ -4,6 +4,7 @@ {%block contents%}

{{title}}

{%include "searchform.html"%} +{%include "datelist_topandbottom.html"%} {%for m in messages%} {%ifchanged m.date.date%} {%if not forloop.first%} @@ -17,17 +18,5 @@ {%endif%} {%endfor%} -{%if messages%} -{%with messages|first as firstmsg%} -Prev -{%endwith%} -| -{%with messages|last as lastmsg%} -Next -{%endwith%} -{%endif%} - -{%if daysinmonth%} - -{%endif%} +{%include "datelist_topandbottom.html"%} {%endblock%} diff --git a/django/archives/mailarchives/templates/datelist_topandbottom.html b/django/archives/mailarchives/templates/datelist_topandbottom.html new file mode 100644 index 0000000..5cfbba0 --- /dev/null +++ b/django/archives/mailarchives/templates/datelist_topandbottom.html @@ -0,0 +1,13 @@ +{%if messages%} +{%with messages|first as firstmsg%} +Prev +{%endwith%} +| +{%with messages|last as lastmsg%} +Next +{%endwith%} +{%endif%} + +{%if daysinmonth%} + +{%endif%} -- 2.39.5