]> git.parisson.com Git - mezzo.git/commitdiff
use only categories in post headers
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 2 May 2016 12:57:00 +0000 (14:57 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 2 May 2016 12:57:00 +0000 (14:57 +0200)
app/templates/blog/blog_post_list.html

index eacc5027b7fcc25a6ba0e23c87c7a80dabbb186f..cd2184e67658ac31f0e4fa8835b076f0fac35823 100644 (file)
 
 {% block main %}
 
-{% if tag or category or year or month or author %}
-    {% block blog_post_list_filterinfo %}
-    <p>
-    {% if tag %}
-        {% trans "Viewing posts tagged" %} {{ tag }}
-    {% else %}{% if category %}
-        {% trans "Viewing posts for the category" %} <a href="{% url "blog_post_list_category" category.slug %}">{{ category }}</a>
-    {% else %}{% if year or month %}
-        {% trans "Viewing posts from" %} {% if month %}{{ month }}, {% endif %}
-        {{ year }}
-    {% else %}{% if author %}
-        {% trans "Viewing posts by" %}
-        {{ author.get_full_name|default:author.username }}
-    {% endif %}{% endif %}{% endif %}{% endif %}
-    {% endblock %}
-    </p>
-{% else %}
     {% if page %}
     {% if page.get_content_model.content %}
         {% editable page.get_content_model.content %}
         {% blog_categories as categories %}
         {% if categories %}
         <ul class="list-inline tag-cloud">
-        {% for category in categories %}
+        {% for cat in categories %}
          <li>
-          <a href="{% url "blog_post_list_category" category.slug %}">{{ category }}</a> ({{ category.post_count }})
+          <a href="{% url "blog_post_list_category" cat.slug %}" {% if category == cat %}class="is-active"{% endif %}>{{ cat }}</a> ({{ cat.post_count }})
          </li>
         {% endfor %}
         </ul>
         <br/>
         {% endif %}
     {% endif %}
-{% endif %}
 
 <div class="msry__container">
   <div class="msry__sizer"></div>