From: Jérémy Fabre Date: Wed, 28 Sep 2016 08:38:00 +0000 (+0200) Subject: Add the pattern, the breadcrumb topic and try the sidebar on project details X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=112e35b783d574c6179e7ffb15a22c57d7cb3185;p=mezzo.git Add the pattern, the breadcrumb topic and try the sidebar on project details --- diff --git a/app/templates/projects/project_detail.html b/app/templates/projects/project_detail.html index c2df929f..6fbc69d1 100644 --- a/app/templates/projects/project_detail.html +++ b/app/templates/projects/project_detail.html @@ -1,5 +1,5 @@ {% extends "pages/page.html" %} -{% load mezzanine_tags keyword_tags i18n organization_tags %} +{% load mezzanine_tags keyword_tags i18n organization_tags pages_tags %} {% block meta_title %}{{ project.meta_title }}{% endblock %} @@ -15,6 +15,10 @@ project {% endblock %} +{% block body_class %} + pattern pattern-bg {{ department.pages.all.0.weaving_css_class }} +{% endblock %} + {% block breadcrumb_menu %} {{ block.super }} @@ -22,8 +26,10 @@ {% if department %} {% endif %} - {% if project.topic %} - + {% if project.topic and project.topic.parent %} + + {% elif project.topic %} + {% endif %} @@ -54,6 +60,14 @@ {% endblock %} +{% block page_sidebar %} + {% if project.topic and project.topic.parent %} + {% page_menu "pages/menus/current_tree_secondary.html" project.topic.parent.pages.all.0 %} + {% elif project.topic %} + {% page_menu "pages/menus/current_tree_secondary.html" project.topic.pages.all.0 %} + {% endif %} +{% endblock %} + {% block page_link %} {% with project.links.all as links %} {% if links %} @@ -87,140 +101,136 @@ {% endblock %} {% block page_sub_content %} - {% with project.blocks.all as blocks %} - {% include "core/inc/block.html" %} - {% endwith %} -{% endblock %} - - -{% block page_related_content %} {% if project.type == 'external project' %} -
-
-
-
-
-
-
-

{% trans "Project details" %}

- -
- {% if project.program %} +
+
+
+
+
+
+
+
+
+

{% trans "Project details" %}

+ +
+ {% if project.program %} +
+
+ {% trans "Program" %} +
+
+ {{ project.program }} +
+
+ {% endif %} + + {% if project.program_type %} +
+
+ {% trans "Program type" %} +
+
+ {{ project.program_type }} +
+
+ {% endif %} +
- {% trans "Program" %} + {% trans "Beginning" %}
- {{ project.program }} + {{ project.date_from }}
- {% endif %} - {% if project.program_type %}
- {% trans "Program type" %} + {% trans "End" %}
- {{ project.program_type }} + {{ project.date_to }}
- {% endif %} - -
-
- {% trans "Beginning" %} -
-
- {{ project.date_from }} -
-
- -
-
- {% trans "End" %} -
-
- {{ project.date_to }} -
-
- -
-
- {% trans "Status" %} -
-
- {{ project.project_status }} -
-
- {% if project.website %}
- {% trans "Website" %} + {% trans "Status" %}
- {{ project.website }} + {{ project.project_status }}
- {% endif %} - + {% if project.website %} +
+
+ {% trans "Website" %} +
+ +
+ {% endif %} + + +
-
-
-
-

{% trans "Participants" %}

- -
+
+
+

{% trans "Participants" %}

+ +
+ + {% if project.lead_team %} +
+ {% if project.lead_team %} +
+ {% trans "Project lead team" %} +
+
+ {{ project.lead_team }} +
+ {% elif project.lead_organization %} +
+ {% trans "Project lead organization" %} +
+
+ {{ project.lead_organization }} +
+ {% endif %} +
+ {% endif %} - {% if project.lead_team %}
- {% if project.lead_team %}
- {% trans "Project lead team" %} + {% trans "Partners" %}
- {{ project.lead_team }} + {% for team in project.teams.all %} + {{ team }}
+ {% endfor %} + {% for organization in project.organizations.all %} + {% if organization.url %} + + {% endif %} + {{ organization }}
+ {% if organization.url %} +
+ {% endif %} + {% endfor %}
- {% elif project.lead_organization %} -
- {% trans "Project lead organization" %} -
-
- {{ project.lead_organization }} -
- {% endif %}
- {% endif %} -
-
- {% trans "Partners" %} -
-
- {% for team in project.teams.all %} - {{ team }}
- {% endfor %} - {% for organization in project.organizations.all %} - {% if organization.url %} - - {% endif %} - {{ organization }}
- {% if organization.url %} -
- {% endif %} - {% endfor %} -
-
@@ -231,8 +241,12 @@
{% endif %} + {% with project.blocks.all as blocks %} + {% include "core/inc/block.html" %} + {% endwith %} {% endblock %} + {% block logo %} {% if project.organizations.all|length > 0 %}