]> git.parisson.com Git - mezzo.git/commitdiff
Add the booking button on the generic card
authorJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Wed, 5 Oct 2016 13:10:44 +0000 (15:10 +0200)
committerJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Wed, 5 Oct 2016 13:10:44 +0000 (15:10 +0200)
app/templates/core/inc/generic_card.html

index a9f6c2dc796443d5a86dc7ec49d7b2a1eef94378..366bd0ec8afa3885b59bd5e45ed29df5bc249889 100644 (file)
@@ -22,6 +22,7 @@
             </div>
         {% elif content.content_type.model == 'event' %}
         <div class="article-box__tags">
+
             {% if content.content_object.departments.first %}
                 {% with content.content_object.departments.first as department %}
                     <div class="tag tag--small dashed">
                 </div>
             {% endif %}
         </div>
+            {% if content.content_object.prices.all.0|floatformat != '0' and content.content_object.prices.all|length > 0 %}
+                {% for price in content.content_object.prices.all %}
+                    {% if forloop.first %}
+                        <div class="article-box__btn">
+                            <object><a href="{% url 'event_booking' content.content_object.slug %}" class="button button--small mr0">{% trans "Reserve" %}</a></object>
+                        </div>
+                    {% endif %}
+                {% endfor %}
+            {% endif %}
         {% endif %}
     </div>