]> git.parisson.com Git - mezzo.git/commitdiff
Exclude events from related content, move them to another container
authorJérémy Fabre <blackmagik88@gmail.com>
Wed, 22 Feb 2017 13:30:11 +0000 (14:30 +0100)
committerJérémy Fabre <blackmagik88@gmail.com>
Wed, 22 Feb 2017 13:30:11 +0000 (14:30 +0100)
app/templates/agenda/event_base.html
app/templates/agenda/event_detail.html
app/templates/core/inc/related_content.html
app/templates/pages/custompage.html
app/templates/pages/mutations-creations.html
app/templates/pages/page.html
app/templates/projects/project_detail.html

index a089ef5371895757fd5936e6b1d43eff5683a654..3710af036532efc990a68d4998dcd494618f2691 100644 (file)
     <div>
 
         {% block page_related_content %}
-            {% with dynamic_content=page.dynamic_content_pages.all object=page %}
+            {% with dynamic_content=page.dynamic_content_pages.all|filter_content object=page %}
                 {% include "core/inc/related_content.html" %}
             {% endwith %}
         {% endblock %}
index ed7cdba6f1e7fe44f0d4efb343824882ed9ac8fc..9208ba7725940a478ab2ab679255fefb463012c1 100644 (file)
 {% endblock %}
 
 {% block page_related_content %}
-    {% with dynamic_content=event.dynamic_content_event.all object=event %}
+    {% with dynamic_content=event.dynamic_content_event.all|filter_content object=event %}
         {% include "core/inc/related_content.html" %}
     {% endwith %}
 {% endblock %}
index 109567639b844e4e62a605b5a4df7889c07c9758..fd8f4502da2a8e4efdc1b1edfd92e9f7c095c9d5 100644 (file)
@@ -1,5 +1,28 @@
 {% load i18n mezzanine_tags keyword_tags organization_tags pages_tags %}
-{% if dynamic_content.first.content_object %}
+
+{% if dynamic_content.event|length > 0 %}
+
+<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-md-12 col-md-push-2">
+            {% for content in dynamic_content.event %}
+                {% with event=content.content_object %}
+                    {% include 'agenda/includes/event_linecard.html' %}
+                {% endwith %}
+            {% endfor %}
+        </div>
+
+    </div>
+</div>
+
+{% endif %}
+
+{% if dynamic_content.other|length > 0 %}
     <div class="pb2">
         <div class="container">
             <div class="row tac">
@@ -11,7 +34,7 @@
                 <div class="col-xxs-16">
                     <div data-slider-related>
 
-                        {% for content in dynamic_content %}
+                        {% for content in dynamic_content.other %}
                             {% if forloop.counter0 == 0 or forloop.counter|divisibleby:3 %}
                                 <div class="container">
                                     <div class="row">
index 8ded5a887f5dd5b89997f9807706e3440c7b7347..cc0110fd3ea66d2a977a8b96bd553c1a9789c8a8 100644 (file)
     {% endblock %}
 
     {% block page_related_content %}
-        {% with dynamic_content=page.dynamic_content_pages.all object=page %}
-        {# with dynamic_content=page.dynamic_content_pages.all|filter_content object=page #}
-            {# dynamic_content.event #}
-            {# dynamic_content.other #}
+        {% with dynamic_content=page.dynamic_content_pages.all|filter_content object=page %}
             {% include "core/inc/related_content.html" %}
         {% endwith %}
     {% endblock %}
index e39b3994040627f5ebd8d7eda250481a9e9188e8..4d5f352ee3c77e5ff704457f70b5b34e6ac3d3b8 100644 (file)
       {% endwith %}
     {% endblock %}
 
+    {% block page_related_content %}
+        {% with dynamic_content=page.dynamic_content_pages.all|filter_content object=page %}
+            {% include "core/inc/related_content.html" %}
+        {% endwith %}
+    {% endblock %}
+
 {% endwith %}
index 67d080ad29e7b8f607f2def7e003edb7295ed4a2..3e3fd0b74fc72ec510d9e0dc70065e5aea5e69fe 100644 (file)
     <div>
 
         {% block page_related_content %}
-            {% with dynamic_content=page.dynamic_content_pages.all object=page %}
+            {% with dynamic_content=page.dynamic_content_pages.all|filter_content object=page %}
                 {% include "core/inc/related_content.html" %}
             {% endwith %}
         {% endblock %}
index 72674f684126b1f6e183b9036f2c99a9218dbec7..e426951cfab7f20ac5f96bfe6eed2b261de7f799 100644 (file)
 {% endblock %}
 
 {% block page_related_content %}
-    {% with dynamic_content=object.dynamic_content_object.all object=object %}
+    {% with dynamic_content=object.dynamic_content_object.all|filter_content object=object %}
         {% include "core/inc/related_content.html" %}
     {% endwith %}
 {% endblock %}