]> git.parisson.com Git - mezzo.git/commitdiff
Team : list main and partner projects
authorEmilie <zawadzki@ircam.fr>
Fri, 2 Sep 2016 10:54:31 +0000 (12:54 +0200)
committerEmilie <zawadzki@ircam.fr>
Fri, 2 Sep 2016 10:54:31 +0000 (12:54 +0200)
app/templates/pages/page.html
app/templates/pages/teampage.html
app/templates/projects/project_list.html

index 8408899722ec36ab48de3c30a59226ee03cf1d93..3ff43f79dd11ad3e5929fc72ff7ca79162dcdeb8 100644 (file)
@@ -69,6 +69,7 @@
         {% endblock %}
         {% block page_related_content %}
         {% endblock %}
-
+        {% block related_project %}
+        {% endblock %}
     </div>
 {% endblock %}
index f8b1b984852c95bab26ee1e78b07156bcab44cf9..4a73d11f0bd3b6687956cdf863ca490ed24ef006 100644 (file)
     {% include "core/inc/block.html" %}
   {% endwith %}
 {% endblock %}
+
+{% block related_project %}
+    {% if page.teampage.team.leader_projects.all or page.teampage.team.patner_projects.all %}
+    <hr>
+    {% endif %}
+  {% if page.teampage.team.leader_projects.all %}
+    <h4>{% trans 'Main projects' %}</h4>
+    {% with page.teampage.team.leader_projects.all as projects %}
+        {% include 'projects/project_list.html' %}
+    {% endwith %}
+  {% endif %}
+  {% if page.teampage.team.patner_projects.all %}
+    <h4>{% trans 'Partner projects' %}</h4>
+    {% with page.teampage.team.patner_projects.all as projects %}
+        {% include 'projects/project_list.html' %}
+    {% endwith %}
+  {% endif %}
+
+{% endblock %}
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c6b89ff42dc39f0cae2c5d61639ff6d8ef2a092a 100644 (file)
@@ -0,0 +1,4 @@
+{% for project in projects %}
+  <h5><a href="{{ project.get_absolute_url }}" title="">{{ project.title }}</a></h5>
+  <p>{{ project.description|slice:":500" }}</p>
+{% endfor %}