]> git.parisson.com Git - mezzo.git/commitdiff
Fix event list, add product list circled style
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 10 Oct 2016 08:11:52 +0000 (10:11 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 10 Oct 2016 08:11:52 +0000 (10:11 +0200)
app/templates/agenda/includes/event_date.html
app/templates/shop/includes/product_list_circle_style.html

index ed5824c8958dce5d8e7d3cf2bd7c90ab500e90dd..9082317c7bfb68a61f81fabca4ff71a9ba854c35 100644 (file)
@@ -22,7 +22,7 @@
                 {{ event.start|date:"H\hi" }}
             {% endif %}
         {% else %}
-            {{ event.start|date:"j F" }}<br>
+            {{ event.start|date:"j F" }}<br>
             {% for period in event.periods.all %}
                 {% if period.date_to and period.date_to|date:"H:i" != "23:59" %}
                     {{ period.date_from|date:"H\hi" }} - {{ period.date_to|date:"H\hi" }}<br>
         {% with event.periods.all|same_time_in_periods as same_time_in_periods %}
         {% for period in event.periods.all %}
             {% if period.date_to and period.date_to|date:"H:i" != "23:59" %}
-                {{ period.date_from|date:"j F" }} {% trans "from" %} {{ period.date_from|date:"H\hi" }} {% trans "to" %} {{ period.date_to|date:"H\hi" }}<br>
+                {{ period.date_from|date:"j F" }} {% trans "from" %} {{ period.date_from|date:"H\hi" }} {% trans "to" %} {{ period.date_to|date:"H\hi" }}<br>
             {% else %}
                 {% if event.periods.all|length > 1 and not forloop.last %}
-                    {{ period.date_from|date:"j" }}{% if event.periods.all|length == 2 %} {% trans "and" %} {% else %}, {% endif %}
+                    {{ period.date_from|date:"j" }}{% if event.periods.all|length == 2 %} {% trans "and" %} {% else %}, {% endif %}
                 {% else %}
-                    {{ period.date_from|date:"j F" }}
+                    {{ period.date_from|date:"j F" }}
                     {% if event.periods.all|length > 1 and forloop.first %} {% trans "and" %}{% endif %}
                 {% endif %}
                 {% if same_time_in_periods and forloop.last %}
index d0e75d6f1ef0cda2a7d062ec13f734a3cb19223d..90877fdde3b36e6154f67da301307c338dbf9f37 100644 (file)
             <div class="row tac">
                 {% for product_inline in list.products.all %}
                   {% with product_inline.product as product %}
-                    <div class="col-lg-2 col-md-3 col-sm-4 col-xs-6">
-                        <div class="article-box article-box--person" >
-                            {% if product.images.all %}
-                                <div class="article-box__header">
-                                    <a href="{{ product.get_absolute_url }}" title="{{ product.title }}">
-                                        <figure class="article-box__image">
-                                            <img class="lazyload" src="{{ MEDIA_URL }}{% thumbnail product.images.all.0 427 500 top=0.5 %}" alt="product"/>
-                                        </figure>
-                                    </a>
-                                </div>
-                            {% endif %}
-                            <div class="article-box__content tal">
-                                <a href="{{ product.get_absolute_url }}" title="{{ product.title }}"><h3 class="article-box__title">{{ product.title }}</h3></a>
-                                {% if product.description %}
-                                    <div class="article-box__desc">{{ product.description|richtext_filters|safe|truncatechars_html:255 }}</div>
-                                {% elif product.content %}
-                                    <div class="article-box__desc">{{ product.content|richtext_filters|safe|truncatechars_html:255 }}</div>
+                    {% with product.links.all|get_type_link:"link" as links %}
+                        <div class="col-lg-2 col-md-3 col-sm-4 col-xs-6">
+                            <div class="article-box article-box--person" >
+                                {% if product.images.all %}
+                                    <div class="article-box__header">
+                                        <a href="{{ links.0 }}" target="_blank" title="{{ product.title }}">
+                                            <figure class="article-box__image">
+                                                <img class="lazyload" src="{{ MEDIA_URL }}{% thumbnail product.images.all.0 427 500 top=0.5 %}" alt="product"/>
+                                            </figure>
+                                        </a>
+                                    </div>
                                 {% endif %}
+                                <div class="article-box__content tal">
+                                    <a href="{{ links.0 }}" target="_blank" title="{{ product.title }}"><h3 class="article-box__title">{{ product.title }}</h3></a>
+                                    {% if product.description %}
+                                        <div class="article-box__desc">{{ product.description|richtext_filters|safe|truncatechars_html:255 }}</div>
+                                    {% elif product.content %}
+                                        <div class="article-box__desc">{{ product.content|richtext_filters|safe|truncatechars_html:255 }}</div>
+                                    {% endif %}
+                                </div>
                             </div>
                         </div>
-                    </div>
+                    {% endwith %}
                   {% endwith %}
                 {% endfor %}
             </div>