]> git.parisson.com Git - mezzo.git/commitdiff
Add title and breadcrumb on event list
authorJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Thu, 29 Sep 2016 13:07:23 +0000 (15:07 +0200)
committerJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Thu, 29 Sep 2016 13:07:23 +0000 (15:07 +0200)
app/templates/agenda/event_list.html

index d3014bed8b3eb5278c27f5d1e1638191bdbedba3..f210cdc564b8ad5080079e15cd78a59bb764c11f 100644 (file)
-{% extends "base.html" %}
+{% extends "pages/page.html" %}
 {% load i18n future mezzanine_tags event_tags keyword_tags disqus_tags organization_tags %}
 
-{% block meta_title %}{% if page %}{{ page.richtextpage.meta_title }}{% else %}{% trans "Events" %}{% endif %}{% endblock %}
-
-{% block meta_keywords %}{% metablock %}
-{% keywords_for page as keywords %}
-{% for keyword in keywords %}
-    {% if not forloop.first %}, {% endif %}
-    {{ keyword }}
-{% endfor %}
-{% endmetablock %}{% endblock %}
-
-{% block meta_description %}{% metablock %}
-{{ page.description }}
-{% endmetablock %}{% endblock %}
-
-{% block title %}
-{% if page %}
-{{ page.title }}
-{% else %}
-{% trans "Program" %}
-{% endif %}
-{% endblock %}
-
-{% block breadcrumb_menu %}
-{{ block.super }}
-{% if tag or location or year or month or author %}
-<li>{% spaceless %}
-{% if tag %}
-    {% trans "Tag:" %} {{ tag }}
-{% else %}{% if location %}
-    {% trans "Location:" %} {{ location }}
-{% else %}{% if year or month %}
-    {% if month %}{{ month }}, {% endif %}{{ year }}
-{% else %}{% if author %}
-    {% trans "Author:" %} {{ author.get_full_name|default:author.username }}
-{% endif %}{% endif %}{% endif %}{% endif %}
-{% endspaceless %}
-</li>
-{% endif %}
-{% endblock %}
-
-{% block main %}
-
-{% comment %}
-{% if tag or location or year or month or author %}
-    {% block event_list_filterinfo %}
-    <p>
-    {% if tag %}
-        {% trans "Viewing events tagged" %} <a href="{% url "event_list_tag" tag.slug %}">{{ tag }}</a>
-    {% elif location %}
-        {% trans "Viewing events for the location" %} {{ location }}
-    {% elif year or month %}
-      {% if not day %}
-         {% trans "Viewing events from" %} {% if month %}{{ month }}, {% endif %}{{ year }}
-      {% else %}
-         {% trans "Viewing events from" %} {{ day_date }}
-      {% endif %}
-    {% elif author %}
-        {% trans "Viewing events by" %}
-        {{ author.get_full_name|default:author.username }}
-    {% endif %}
-    {% endblock %}
-    </p>
-{% else %}
-{% endcomment %}
-
-{% if page %}
-    {% block event_list_pagecontent %}
-    {{ page.richtextpage.content|richtext_filters|safe }}
-    {% endblock %}
+{% block meta_title %}
+    {% if page %}
+        {{ page.richtextpage.meta_title }}
     {% else %}
+        {% trans "Events" %}
+    {% endif %}
+{% endblock %}
 
-    <ul class="list-inline tag-cloud">
-        {% all_weeks as weeks %}
-        {% for w in weeks %}
-        <li>
-            <a href="{% url "event_list_week" year w %}" {% if week|add:0 == w %}class="is-active"{% endif %}>{% for d in w|week_range:year %}{{ d|date:"d M" }}{% if forloop.first %} - {% endif %}{% endfor %}</a>
-        </li>
-        {% if not forloop.last %} | {% endif %}
+{% block meta_keywords %}
+    {% metablock %}
+        {% keywords_for page as keywords %}
+        {% for keyword in keywords %}
+            {% if not forloop.first %}, {% endif %}
+            {{ keyword }}
         {% endfor %}
-    </ul>
+    {% endmetablock %}
+{% endblock %}
 
-    <hr/>
+{% block meta_description %}
+    {% metablock %}
+        {{ page.description }}
+    {% endmetablock %}
+{% endblock %}
 
-    {% block event_keywords %}
-    {% keywords_for mezzanine_agenda.event as tags %}
-    {% all_events as all_events %}
-    {% if tags %}
-    <ul class="list-inline tag-cloud">
-        <li>
-            <a href="/events/" {% if not tag %}class="is-active"{% endif %}>{% trans "All" %} ({{ all_events.count }})</a>
-        </li>
-        {% for t in tags %}
-        {% if forloop.first %} | {% endif %}
-        <li>
-            <a href="{% url "event_list_tag" t.slug %}" {% if tag == t %}class="is-active"{% endif %}
-                class="tag-weight-{{ tag.weight }}">{{ t }} ({{ t.item_count }})</a>
+{% block breadcrumb_menu %}
+    {{ block.super }}
+    <li class="breadcrumb__item">
+        <a href="{% url 'event_list' %}" class="breadcrumb__link">{% trans "Agenda" %}</a>
+    </li>
+    {% if tag or location or month or week or author %}
+        <li class="breadcrumb__item active">
+            {% if tag %}
+                {% trans "Tag:" %} {{ tag }}
+            {% elif location %}
+                {% trans "Location:" %} {{ location }}
+            {% elif month %}
+                {% if month %}{{ month }}, {% endif %}{{ year }}
+            {% elif week %}
+                {% for d in week|week_range:year %}
+                    {{ d|date:"d M" }}{% if forloop.first %} - {% endif %}
+                {% endfor %}
+                , {{ year }}
+            {% elif author %}
+                {% trans "Author:" %} {{ author.get_full_name|default:author.username }}
+            {% endif %}
         </li>
-        {% if not forloop.last %} | {% endif %}
-        {% endfor %}
-    </ul>
-    <br/>
     {% endif %}
-    {% endblock %}
-{% endif %}
-{# {% endif %}#}
-
-<div class="msry__container">
-    <div class="msry__sizer">
-{% for event in events.object_list %}
- {% include 'agenda/includes/event_card.html' %}
-{% endfor %}
-    </div>
-</div>
-
-{# <a href='{% icalendar_url %}' target="_blank" class="small  push-ical">{% trans "Subscribe to all events in" %} Google Calendar/Outlook/iCal</a>#}
-
-{% pagination_for events %}
-
-{% if settings.COMMENTS_DISQUS_SHORTNAME %}
-{% include "generic/includes/disqus_counts.html" %}
-{% endif %}
-
 {% endblock %}
 
-{% block right_panel %}
-{% include "agenda/includes/filter_panel.html" %}
+{% block page_title %}
+    <h1 class="dotted">
+        {% if page %}
+            {{ page.richtextpage.meta_title }}
+        {% else %}
+            {% trans "Agenda" %}
+        {% endif %}
+    </h1>
 {% endblock %}