summaryrefslogtreecommitdiff
path: root/objectapp/templates/objectapp/tags/archives_gbobjects_tree.html
diff options
context:
space:
mode:
Diffstat (limited to 'objectapp/templates/objectapp/tags/archives_gbobjects_tree.html')
-rw-r--r--objectapp/templates/objectapp/tags/archives_gbobjects_tree.html43
1 files changed, 43 insertions, 0 deletions
diff --git a/objectapp/templates/objectapp/tags/archives_gbobjects_tree.html b/objectapp/templates/objectapp/tags/archives_gbobjects_tree.html
new file mode 100644
index 0000000..c3405fb
--- /dev/null
+++ b/objectapp/templates/objectapp/tags/archives_gbobjects_tree.html
@@ -0,0 +1,43 @@
+{% load i18n %}
+
+{% regroup archives by year as year_list %}
+<ul>
+ {% for year in year_list %}
+ <li>
+ <a title="{% trans "Archives" %} {{ year.grouper }}" rel="archives"
+ href="{% url objectapp_gbobject_archive_year year.grouper %}">{{ year.grouper }}</a>
+ {% regroup year.list by month as month_list %}
+ <ul>
+ {% for month in month_list %}
+ <li>
+ {% with month.list.0 as month_date %}
+ <a title="{% trans "Archives" %} {{ month_date|date:"YEAR_MONTH_FORMAT" }}" rel="archives"
+ href="{% url objectapp_gbobject_archive_month month_date|date:"Y" month_date|date:"m" %}">
+ {{ month_date|date:"F" }}
+ </a>
+ {% endwith %}
+ {% regroup month.list by day as day_list %}
+ <ul>
+ {% for day in day_list %}
+ <li>
+ {% with day.list.0 as day_date %}
+ <a title="{% trans "Archives" %} {{ day_date|date:"DATE_FORMAT" }}" rel="archives"
+ href="{% url objectapp_gbobject_archive_day day_date|date:"Y" day_date|date:"m" day_date|date:"d" %}">
+ {{ day_date|date:"MONTH_DAY_FORMAT" }}
+ </a>
+ {% endwith %}
+ </li>
+ {% endfor %}
+ </ul>
+ </li>
+ {% endfor %}
+ </ul>
+ </li>
+ {% empty %}
+ <li>
+ {% trans "No archives yet." %}
+ </li>
+ {% endfor %}
+</ul>
+
+