]> git.parisson.com Git - mezzo.git/commitdiff
Event details first implementation
authorJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Wed, 28 Sep 2016 11:42:30 +0000 (13:42 +0200)
committerJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Wed, 28 Sep 2016 11:42:30 +0000 (13:42 +0200)
app/static/src/sass/modules/_page.scss
app/static/src/sass/modules/_share-links.scss
app/templates/agenda/event_detail.html
app/templates/agenda/includes/event_metainfo.html
app/templates/includes/share_buttons.html

index 9eb7eb1978b9f9b67643521e1a37e0bf4fb10115..1613e6bdf06a6f042bc9d85a7601f7de892823d7 100644 (file)
@@ -50,7 +50,7 @@ $module: ".page";
 
     &__meta-title {
 
-        @include font-size(l);
+        @include font-size(m);
         @include line-height(1);
         @include typeface(serif);
         font-weight: weight(heavy);
index 7b3140c857b6b0146afc540e018288339fc123d4..5df9ec5a23b8ab4100f06b6b33c50b781661039e 100644 (file)
@@ -9,7 +9,7 @@ $module: ".share-links";
     &__item {
 
         display: inline-block;
-        font-size: 1.5rem;
+        font-size: 1.25rem;
         @include margin-right(.5);
 
     }
index 7329338a5012476cef6a32918da1fd7f774aaf86..d14d57d54f5cbc176c2f69dd76ee23fd9567f3c6 100644 (file)
@@ -12,7 +12,7 @@
 {% endmetablock %}{% endblock %}
 
 {% block meta_description %}{% metablock %}
-{{ event.description }}
+    {{ event.description }}
 {% endmetablock %}{% endblock %}
 
 {% block page_class %}
@@ -70,7 +70,7 @@
             </a>
         </p>
         <a href="{{ event|google_nav_url }}" target="_blank" class="">
-         {% google_static_map event 900 300 15 %}
+             {% google_static_map event 900 300 15 %}
         </a/>
         {% endblock %}
         {% endif %}
 
         {% set_short_url_for event %}
         {% with event as object %}
+        {% with True as is_event %}
             {% include "includes/share_buttons.html" %}
-            <a href='{{ event|google_calendar_url }}' target="_blank" class="push__calendar__item">
-                <i class="icon icon__calendar"></i>
-                {% trans "Add to" %} Google Calendar
-            </a>
-            <a href='{% icalendar_url %}' class="push__calendar__item">
-                <i class="icon icon__windows"></i>
-                {% trans "Add to" %} Outlook/iCal
-            </a>
+        {% endwith %}
         {% endwith %}
     </div>
 
index 43e4489a69f187f8b1631839dcb3b3646fea4bc0..f38942a9f8e1791294c260597b8afcbd370586b9 100644 (file)
@@ -1,26 +1,46 @@
 {% load i18n mezzanine_tags event_tags  %}
-<div class="event__meta">
-    <div class="event__meta__inner">
-        {{ event.start }}
-        {% if event.end %}
-        {% if event.end|date == event.start|date and event.end.hour|subtract:event.start.hour > 3 %}{{ event.end|time:"TIME_FORMAT" }}{% endif %}
-        {% if unit_booking %}
-            &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
-            {% if event.prices.all.0|floatformat != '0' %}
-            {% for price in event.prices.all %}{{ price.value|floatformat:"-2" }} €{% if not forloop.last %} / {% endif %}{% endfor %}
-            <a href="{% url 'event_booking' event.slug %}" class="event__meta__btn">
+
+<div class="page__meta-date">
+    {% include 'agenda/includes/event_date.html' %}
+</div>
+
+<div class="page__meta-separator"></div>
+
+{% if event.location %}
+    <a href="{% url 'location-detail' event.location.slug %}">
+        <div class="page__meta-title">{{ event.location }}</div>
+        {% if event.location.room %}
+            <small><u>{{ event.location.room }}</u></small>
+        {% endif %}
+    </a>
+    <a href="{{ event|google_nav_url }}" target="_blank" class="">
+         {% google_static_map event 900 300 15 %}
+    </a/>
+
+    <div class="page__meta-separator"></div>
+{% endif %}
+
+{% if unit_booking %}
+
+    {% if event.prices.all.0|floatformat != '0' %}
+        {% for price in event.prices.all %}
+            {% if forloop.first %}
+                <div class="page__meta-title">Tarifs</div>
+                <p>
+            {% endif %}
+            {{ price.value|floatformat:"-2" }} €{% if not forloop.last %} <br /> {% endif %}
+            {% if forloop.last %}
+                </p>
+            {% endif %}
+        {% endfor %}
+        <p>
+            <a class="button button--block" href="{% url 'event_booking' event.slug %}" class="event__meta__btn">
                 {% trans "Reserve" %}
             </a>
-            {% else %}
-            {% trans "Free entry. Limited seats available" %}
-            {% endif %}
+        </p>
 
-        {% endif %}
-        {% endif %}
-        {% if event.location %}
-        {# <a href="{% url "event_list_location" event.location.slug %}" class="event__meta__location">{{ event.location }}</a>#}
-        <br />
-        <a href="{% url 'location-detail' event.location.slug %}">{{ event.location }}</a>
-        {% endif %}
-    </div>
-</div>
+    {% else %}
+        {% trans "Free entry. Limited seats available" %}
+    {% endif %}
+
+{% endif %}
index 6736ce619516ddaa429ca3ae81f97fd326a129b9..71056d3c183a441da72b0cbecab628530889601a 100644 (file)
@@ -1,4 +1,4 @@
-{% load i18n %}
+{% load i18n event_tags %}
 
 <ul class="share-links">
     <li class="share-links__item share-links__item--facebook">
     <li class="share-links__item share-links__item--print">
         <a href="javascript:window.print()" title="{% trans "Print this page" %}"><i class="fa fa-print"></i></a>
     </li>
+    {% if is_event %}
+        <li class="share-links__item">
+            <a href='{{ event|google_calendar_url }}' target="_blank" title="{% trans "Add to" %} Google Calendar">
+                <i class="fa fa-google"></i>
+            </a>
+        </li>
+        <li class="share-links__item">
+            <a href='{% icalendar_url %}' class="push__calendar__item" title="{% trans "Add to" %} Outlook/iCal">
+                <i class="fa fa-calendar"></i>
+            </a>
+        </li>
+    {% endif %}
 </ul>