Permalink
Browse files

implement previous et next week link provided by the generic view

  • Loading branch information...
1 parent ba51d18 commit 66ef6848610d539068e35e1f6ac9ba32dfb586df @Fantomas42 committed Apr 1, 2013
Showing with 17 additions and 1 deletion.
  1. +17 −1 zinnia/templates/zinnia/entry_archive_week.html
@@ -8,11 +8,27 @@
{% block body-class %}{{ block.super }} archive date week year-{{ week|date:"Y" }} month-{{ week|date:"m" }} week-{{ week|date:"W" }}{% endblock %}
{% block content-title %}
-<h1>{% blocktrans with year=week|date:"Y" week_number=week|date:"W"%}Archives week {{ week_number }} of {{ year }}{% endblocktrans %}</h1>
+<h1>{% blocktrans with year=week|date:"Y" week_number=week|date:"W" %}Archives week {{ week_number }} of {{ year }}{% endblocktrans %}</h1>
<h2>{{ week|date:"DATE_FORMAT" }} - {{ week_end_day|date:"DATE_FORMAT" }}</h2>
{% endblock %}
{% block content-related %}
+{% if previous_week %}
+<h3>{% trans "Previous week" %}</h3>
+<p>
+ <a href="{% url 'zinnia_entry_archive_week' previous_week|date:"Y" previous_week|date:"W" %}" rel="archives">
+ {% blocktrans with year=previous_week|date:"Y" week_number=previous_week|date:"W" %}Week {{ week_number }} of {{ year }}{% endblocktrans %}
+ </a>
+</p>
+{% endif %}
+{% if next_week %}
+<h3>{% trans "Next week" %}</h3>
+<p>
+ <a href="{% url 'zinnia_entry_archive_week' next_week|date:"Y" next_week|date:"W" %}" rel="archives">
+ {% blocktrans with year=next_week|date:"Y" week_number=next_week|date:"W" %}Week {{ week_number }} of {{ year }}{% endblocktrans %}
+ </a>
+</p>
+{% endif %}
<h3>{% trans "Archives" %}</h3>
<ul>
<li>

0 comments on commit 66ef684

Please sign in to comment.