Commit bfc5e397 authored by fred's avatar fred
Browse files

add categories on emissions archives page

parent 9bb1bd16
...@@ -483,6 +483,7 @@ class EmissionsArchives(TemplateView): ...@@ -483,6 +483,7 @@ class EmissionsArchives(TemplateView):
context = super(EmissionsArchives, self).get_context_data(**kwargs) context = super(EmissionsArchives, self).get_context_data(**kwargs)
context['sectionName'] = "Emissions" context['sectionName'] = "Emissions"
context['emissions'] = Emission.objects.prefetch_related('categories').filter(archived=True).order_by('title') context['emissions'] = Emission.objects.prefetch_related('categories').filter(archived=True).order_by('title')
context['categories'] = Category.objects.all()
return context return context
emissionsArchives = EmissionsArchives.as_view() emissionsArchives = EmissionsArchives.as_view()
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
{% if categories %} {% if categories %}
<nav id="gridNav" class="checkable"> <nav id="gridNav" class="checkable">
<ul class="by{{ categories.count }}"> <ul class="by{{ categories.count }}">
{% if class = "emissions" %} {% if class = "emissions" or class = "archives" %}
<li><button class="check icon-check-empty" data-about="#Main" data-toggle=".nocat">?</button></li> <li><button class="check icon-check-empty" data-about="#Main" data-toggle=".nocat">?</button></li>
{% endif %} {% endif %}
{% for category in categories %} {% for category in categories %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment