]> git.parisson.com Git - mezzo.git/commitdiff
Linked events and articles in person details
authorJérémy Fabre <Jeremy@iMacdeJeremy2.fritz.box>
Wed, 15 Feb 2017 10:24:32 +0000 (11:24 +0100)
committerJérémy Fabre <Jeremy@iMacdeJeremy2.fritz.box>
Wed, 15 Feb 2017 10:24:32 +0000 (11:24 +0100)
app/static/src/sass/modules/boxes/_event-line-box.scss
app/templates/network/person_detail.html

index 518104aa8dd6d4a8a7117038643db4302124f344..93925a5693bbacccdd0912750f0cd191ccadfe7f 100644 (file)
@@ -35,6 +35,10 @@ $module: ".event-line-box";
         @include margin-bottom(1);
     }
 
+    .lightSlider & {
+        margin-bottom: 0 !important;
+    }
+
     &:after {
 
         content: "";
index 8231600d344712a27f690123fb42c5e6ac6e79eb..2b96d12c7089c3c56f42be8f4c46eb53d71f61d7 100644 (file)
 
 {% endblock %}
 
+{% block page_related_content %}
+
+{% if related.event %}
+    <div class="pb2">
+        <div class="container">
+            <div class="row tac">
+                <div class="col-xs-16">
+                    <h2 class="section-title section-title--underline section-title--uppercase section-title--main">{% trans "Linked events" %}</h2>
+                </div>
+            </div>
+            <div class="row">
+                <div class="col-xxs-16">
+                    <div data-slider-related>
+
+                        {% for event in related.event %}
+                            <div>
+
+                                <div class="row">
+
+                                    <div class="col-md-12 col-md-push-2">
+                                        {% include 'agenda/includes/event_linecard.html' %}
+                                    </div>
+
+                                </div>
+
+                            </div>
+                        {% endfor %}
+
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+{% endif %}
+
+{% if related.other %}
+    <div class="pb2">
+        <div class="container">
+            <div class="row tac">
+                <div class="col-xs-16">
+                    <h2 class="section-title section-title--underline section-title--uppercase section-title--main">{% trans "Linked contents" %}</h2>
+                </div>
+            </div>
+            <div class="row">
+                <div class="col-xxs-16">
+                    <div data-slider-related>
+
+                        {% for concrete_object in related.other %}
+                            {% if forloop.counter0 == 0 or forloop.counter|divisibleby:3 %}
+                                <div class="container">
+                                    <div class="row">
+                            {% endif %}
+
+                            <div class="col-xs-6 col-xs-push-2">
+                                {% with app_label=concrete_object|app_label_short classname=concrete_object|classname|lower object=concrete_object  %}
+                                    {% with app_label|add:"/"|add:classname|add:"/includes/"|add:classname|add:"_card.html" as template %}
+                                        {% include template %}
+                                    {% endwith %}
+                                {% endwith %}
+                            </div>
+
+                            {% if forloop.last or forloop.counter|divisibleby:2 %}
+                                </div>
+                                </div>
+                            {% endif %}
+                        {% endfor %}
+
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+{% endif %}
+
+{% endblock %}
+
 {% block page_sidebar %}
     <div class="" data-sticky data-sticky-parent="row" data-sticky-offset="100" data-sticky-detach-at="971">
         {% include "includes/share_buttons.html" %}