From: Guillaume Pellerin Date: Thu, 23 Feb 2017 15:48:31 +0000 (+0100) Subject: Merge branch 'dev' into feature/themes X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=c46b581c995bcc9766239b463eeeb3d42a810fdc;p=mezzo.git Merge branch 'dev' into feature/themes --- c46b581c995bcc9766239b463eeeb3d42a810fdc diff --cc app/themes/base/templates/agenda/event_base.html index a089ef53,00000000..3710af03 mode 100644,000000..100644 --- a/app/themes/base/templates/agenda/event_base.html +++ b/app/themes/base/templates/agenda/event_base.html @@@ -1,160 -1,0 +1,160 @@@ +{% extends "pages/page.html" %} +{% load i18n mezzanine_tags keyword_tags organization_tags pages_tags %} + +{% block main %} + + {% block hero %} + {% endblock %} + +
+
+ +
+ +
+ {% block page_title %} + {{ page.title }} + {% endblock %} +
+ +
+ +
+ +
+ +
+ {% block page_sidebar %} + {% endblock %} +
+ +
+ +
+ {% block page_content %} + {{ page.content }} + {% endblock %} + {% block page_link %} + {% with object.links.all as links %} + {% if links %} + {% include 'core/inc/link.html' %} + {% endif %} + {% endwith %} + {% endblock %} + {% block page_file %} + {% with object.files.all as files %} + {% if files %} + {% include 'core/inc/files.html' %} + {% endif %} + {% endwith %} + {% endblock %} + {% block page_audio %} + {% for related in object.playlists.all %} + {% with related.playlist as playlist %} + {% if playlist.type == 'audio' %} + {% include 'media/inc/playlist_audio_detail.html' %} + {% endif %} + {% endwith %} + {% endfor %} + {% endblock %} +
+ +
+ +
+ + {% block page_slider %} + {% with object.images.all|get_type:'page_slider' as slider_images %} + {% if slider_images %} + {% include 'core/inc/slider.html' %} + {% endif %} + {% endwith %} + {% endblock %} + + {% block page_video %} + {% for related in object.playlists.all %} + {% with related.playlist as playlist %} + {% if playlist.type == 'video' %} + {% include 'media/inc/playlist_video_slider.html' %} + {% endif %} + {% endwith %} + {% endfor %} + {% endblock %} + +
+ + {% block page_sub_content %} + {% with object.blocks.all as blocks %} + {% include "core/inc/block.html" %} + {% endwith %} + {% endblock %} + + {% block page_person_list %} + {% endblock %} + + {% block page_demo %} + {% endblock %} + + {% block page_blog %} + {% endblock %} + + {% block related_project %} + {% endblock %} + + {% block products %} + {% if page.product_lists.all|length > 0 %} + {% for page_product_list in page.product_lists.all %} + {% with page_product_list.list as list %} + {% with "shop/includes/product_list_"|add:list.style|add:"_style.html" as template %} + {% include template %} + {% endwith %} + {% endwith %} + {% endfor %} + {% endif %} + {% endblock %} + + {% block page_sub_content_2 %} + {% endblock %} + + {% block page_person_list_team %} + {% endblock %} + + {% block page_sub_content_3 %} + {% endblock %} + + {% block logo %} + {% with page.images.all|get_type:'logo' as images %} + {% if images %} +
+
+
+
+
+
    + {% include 'core/inc/logo.html' %} +
+
+
+
+
+
+ {% endif %} + {% endwith %} + {% 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 %} + {% include "core/inc/related_content.html" %} + {% endwith %} + {% endblock %} + +
+ + +{% endblock %} diff --cc app/themes/base/templates/agenda/event_detail.html index ed7cdba6,00000000..9208ba77 mode 100644,000000..100644 --- a/app/themes/base/templates/agenda/event_detail.html +++ b/app/themes/base/templates/agenda/event_detail.html @@@ -1,152 -1,0 +1,152 @@@ +{% extends "agenda/event_base.html" %} +{% load mezzanine_tags comment_tags keyword_tags rating_tags i18n future disqus_tags event_tags organization_tags pages_tags %} + +{% block meta_title %}{{ event.meta_title }}{% endblock %} + +{% block meta_keywords %}{% metablock %} +{% keywords_for event as tags %} +{% for tag in tags %} + {% if not forloop.first %}, {% endif %} + {{ tag }} +{% endfor %} +{% endmetablock %}{% endblock %} + +{% block meta_description %}{% metablock %} + {{ event.description }} +{% endmetablock %}{% endblock %} + +{% block page_class %} + event +{% endblock %} + +{% block page_title %} +

{% trans "Back to events" %}

+ {% include 'agenda/includes/event_linecard.html' %} +{% endblock %} + +{% block breadcrumb_menu %} + {{ block.super }} + + +{% endblock %} + +{% block page_content %} + {% block event_detail_content %} + {% if event.content %} + {% editable event.content %} + {{ event.content|richtext_filters|safe }} + {% endeditable %} + {% endif %} + {% endblock %} +{% endblock %} + +{% block page_link %} + {% if event.mentions or event.links.all|length > 0 %} +
+
+ {% if child %} + {% with child.links.all as links %} + {% if links %} +
+ {% include 'core/inc/link.html' %} +
+ {% endif %} + {% endwith %} + {% else %} + {% with event.links.all as links %} + {% if links %} +
+ {% include 'core/inc/link.html' %} +
+ {% endif %} + {% endwith %} + {% endif %} + {% if event.mentions %} +
+
+ {{ event.mentions }} +
+
+ {% endif %} +
+
+ {% endif %} +{% endblock %} + +{% block page_audio %} + {% with event as object %} + {{ block.super }} + {% endwith %} +{% endblock %} + +{% block page_slider %} + {% with event as object %} + {{ block.super }} + {% endwith %} +{% endblock %} + +{% block page_video %} + {% with event as object %} + {{ block.super }} + {% endwith %} +{% endblock %} + +{% block page_person_list %} + {% if event.persons.all %} +
+
+
+
+
+

+ {% if event.trainings.all %} + {% trans "Trainers" %}
+ {% else %} + {% trans "Persons" %}
+ {% endif %} +

+
+
+
+
+ +
+
+
+
+
+ {% for person in event.persons.all %} + {% with person.person as person %} +
+ {% include "network/inc/person/person_card_square.html" %} +
+ {% endwith %} + {% endfor %} +
+
+
+
+
+
+ {% endif %} +{% endblock %} + +{% block page_sub_content %} + {% with event.blocks.all as blocks %} + {% include "core/inc/block.html" %} + {% endwith %} +{% endblock %} + +{% block page_sidebar %} +
+ {% include "includes/share_buttons.html" %} +
+{% 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 %} diff --cc app/themes/base/templates/core/inc/related_content.html index 10956763,00000000..fd8f4502 mode 100644,000000..100644 --- a/app/themes/base/templates/core/inc/related_content.html +++ b/app/themes/base/templates/core/inc/related_content.html @@@ -1,40 -1,0 +1,63 @@@ +{% load i18n mezzanine_tags keyword_tags organization_tags pages_tags %} - {% if dynamic_content.first.content_object %} ++ ++{% if dynamic_content.event|length > 0 %} ++ ++
++
++
++

{% trans "Linked events" %}

++
++
++
++
++ {% for content in dynamic_content.event %} ++ {% with event=content.content_object %} ++ {% include 'agenda/includes/event_linecard.html' %} ++ {% endwith %} ++ {% endfor %} ++
++ ++
++
++ ++{% endif %} ++ ++{% if dynamic_content.other|length > 0 %} +
+
+
+
+

{% if object.related_title.title %}{{ object.related_title.title }}{% else %}{% trans "Also discover" %}{% endif %}

+
+
+
+
+
+ - {% for content in dynamic_content %} ++ {% for content in dynamic_content.other %} + {% if forloop.counter0 == 0 or forloop.counter|divisibleby:3 %} +
+
+ {% endif %} +
+ {% if content.content_type.model == "article" %} + {% include "magazine/article/includes/article_card.html" with object=content.content_object %} + {% elif content.content_type.model == "event" %} + {% include "agenda/event/includes/event_card.html" with object=content.content_object %} + {% elif content.content_type.model == "custompage" %} + {% include "pages/page/includes/page_card.html" with object=content.content_object %} + {% endif %} +
+ {% if forloop.last or forloop.counter|divisibleby:2 %} +
+
+ {% endif %} + {% endfor %} + +
+
+ +
+
+
+{% endif %} diff --cc app/themes/base/templates/pages/custompage.html index 6e324e11,00000000..cc0110fd mode 100644,000000..100644 --- a/app/themes/base/templates/pages/custompage.html +++ b/app/themes/base/templates/pages/custompage.html @@@ -1,96 -1,0 +1,102 @@@ +{% extends "pages/page.html" %} +{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} + + {% with page.custompage as object %} + {% block page_class %} + custompage + {% endblock %} + + {% block body_class %} + {% with page.get_ascendants|last as top_level_parent %} + {% if top_level_parent.get_content_model.weaving_css_class %} + pattern pattern-bg {{ top_level_parent.get_content_model.weaving_css_class }} + {% endif %} + {% endwith %} + {% endblock %} + + {% block page_title %} + {% editable page.custompage.title %} +

{{ page.custompage.title }}

+ {% endeditable %} + {% endblock %} + + {% block page_content %} + + {% with page.get_ascendants|last as top_level_parent %} + {% if linked_organization_content and research_slug == top_level_parent.slug %} + {% include 'pages/page/includes/linked_organization_content.html' %} + {% endif %} + {% endwith %} + + {% if page.custompage.sub_title %} + {% editable page.custompage.sub_title %} +
+ {{ page.custompage.sub_title }} +
+ {% endeditable %} + {% endif %} + + {% if page.custompage.content %} + {% editable page.custompage.content %} + {{ page.custompage.content|richtext_filters|safe }} + {% endeditable %} + {% endif %} + + {% if page.get_ascendants|length == 1 %} + {% children_pages page.id as childrens %} + {% if childrens %} +
+ {% for child in childrens %} + {% if child.in_menus.0 %} + {% with child as object %} + {% include "pages/page/includes/page_box.html" %} + {% endwith %} + {% endif %} + {% endfor %} +
+ {% endif %} + {% endif %} + + {% endblock %} + + {% block page_audio %} + {% with page.custompage as object %} + {{ block.super }} + {% endwith %} + {% endblock %} + + {% block page_slider %} + {% with page.custompage as object %} + {{ block.super }} + {% endwith %} + {% endblock %} + + {% block page_video %} + {% with page.custompage as object %} + {{ block.super }} + {% endwith %} + {% endblock %} + + {% block page_person_list %} + {% for page_custom_person_list_block_inline in page.custompage.page_custom_person_list_block_inlines.all %} + {% with page_custom_person_list_block_inline.person_list_block as person_list_block %} + {% with "network/inc/person/list_"|add:person_list_block.style|add:"_style.html" as template %} + {% include template %} + {% endwith %} + {% endwith %} + {% endfor %} + {% endblock %} + + {% block page_sub_content %} + {% with page.custompage.blocks.all as blocks %} + {% include "core/inc/block.html" %} + {% 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 %} diff --cc app/themes/base/templates/pages/mutations-creations.html index e39b3994,00000000..4d5f352e mode 100644,000000..100644 --- a/app/themes/base/templates/pages/mutations-creations.html +++ b/app/themes/base/templates/pages/mutations-creations.html @@@ -1,100 -1,0 +1,106 @@@ +{% extends "pages/page.html" %} +{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} + + {% with page.custompage as object %} + {% block page_class %} + custompage + {% endblock %} + + {% block body_class %} + {% with page.get_ascendants|last as top_level_parent %} + {% if top_level_parent.get_content_model.weaving_css_class %} + pattern pattern-bg {{ top_level_parent.get_content_model.weaving_css_class }} + {% endif %} + {% endwith %} + {% endblock %} + + {% block hero %} + {% include "home/inc/hero-small.html" %} + {% endblock %} + + {% block page_title %} + {% editable page.custompage.title %} +

{{ page.custompage.title }}

+ {% endeditable %} + {% endblock %} + + {% block page_content %} + + {% with page.get_ascendants|last as top_level_parent %} + {% if linked_organization_content and research_slug == top_level_parent.slug %} + {% include 'pages/page/includes/linked_organization_content.html' %} + {% endif %} + {% endwith %} + + {% if page.custompage.sub_title %} + {% editable page.custompage.sub_title %} +
+ {{ page.custompage.sub_title }} +
+ {% endeditable %} + {% endif %} + + {% if page.custompage.content %} + {% editable page.custompage.content %} + {{ page.custompage.content|richtext_filters|safe }} + {% endeditable %} + {% endif %} + + {% if page.get_ascendants|length == 1 %} + {% children_pages page.id as childrens %} + {% if childrens %} +
+ {% for child in childrens %} + {% if child.in_menus.0 %} + {% with child as object %} + {% include "pages/page/includes/page_box.html" %} + {% endwith %} + {% endif %} + {% endfor %} +
+ {% endif %} + {% endif %} + + {% endblock %} + + {% block page_audio %} + {% with page.custompage as object %} + {{ block.super }} + {% endwith %} + {% endblock %} + + {% block page_slider %} + {% with page.custompage as object %} + {{ block.super }} + {% endwith %} + {% endblock %} + + {% block page_video %} + {% with page.custompage as object %} + {{ block.super }} + {% endwith %} + {% endblock %} + + {% block page_person_list %} + {% for page_custom_person_list_block_inline in page.custompage.page_custom_person_list_block_inlines.all %} + {% with page_custom_person_list_block_inline.person_list_block as person_list_block %} + {% with "network/inc/person/list_"|add:person_list_block.style|add:"_style.html" as template %} + {% include template %} + {% endwith %} + {% endwith %} + {% endfor %} + {% endblock %} + + {% block page_sub_content %} + {% with page.custompage.blocks.all as blocks %} + {% include "core/inc/block.html" %} + {% 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 %} diff --cc app/themes/base/templates/pages/page.html index 67d080ad,00000000..3e3fd0b7 mode 100644,000000..100644 --- a/app/themes/base/templates/pages/page.html +++ b/app/themes/base/templates/pages/page.html @@@ -1,174 -1,0 +1,174 @@@ +{% extends "base.html" %} +{% load i18n mezzanine_tags keyword_tags organization_tags pages_tags %} + +{% block meta_title %}{{ page.meta_title }}{% endblock %} + +{% block meta_keywords %}{% metablock %} +{% keywords_for page as keywords %} +{% for keyword in keywords %} + {% if not forloop.first %}, {% endif %} + {{ keyword }} +{% endfor %} +{% endmetablock %}{% endblock %} + +{% block meta_description %}{% metablock %} +{{ page.description }} +{% endmetablock %}{% endblock %} + +{% block main %} + + {% block hero %} + {% endblock %} + +
+
+ +
+ +
+ {% block page_title %} + {{ page.title }} + {% endblock %} +
+ +
+ +
+ +
+ +
+ {% block page_sidebar %} + {% endblock %} +
+ +
+ +
+ {% block page_content %} + {{ page.content }} + {% endblock %} + {% block page_link %} + {% with object.links.all as links %} + {% if links %} + {% include 'core/inc/link.html' %} + {% endif %} + {% endwith %} + {% endblock %} + {% block page_file %} + {% with object.files.all as files %} + {% if files %} + {% include 'core/inc/files.html' %} + {% endif %} + {% endwith %} + {% endblock %} + {% block page_audio %} + {% for related in object.playlists.all %} + {% with related.playlist as playlist %} + {% if playlist.type == 'audio' %} + {% include 'media/inc/playlist_audio_detail.html' %} + {% endif %} + {% endwith %} + {% endfor %} + {% endblock %} +
+ +
+ +
+ + {% block page_slider %} + {% with object.images.all|get_type:'page_slider' as slider_images %} + {% if slider_images %} + {% include 'core/inc/slider.html' %} + {% endif %} + {% endwith %} + {% endblock %} + + {% block page_video %} + {% for related in object.playlists.all %} + {% with related.playlist as playlist %} + {% if playlist.type == 'video' %} + {% include 'media/inc/playlist_video_slider.html' %} + {% endif %} + {% endwith %} + {% endfor %} + {% endblock %} + +
+ + {% block page_person_list %} + {% endblock %} + + {% block page_demo %} + {% endblock %} + + {% block page_blog %} + {% endblock %} + + {% block page_sub_content %} + {% with object.blocks.all as blocks %} + {% include "core/inc/block.html" %} + {% endwith %} + {% endblock %} + + {% block related_project %} + {% endblock %} + + {% block products %} + {% if page.product_lists.all|length > 0 %} + {% for page_product_list in page.product_lists.all %} + {% with page_product_list.list as list %} + {% with "shop/includes/product_list_"|add:list.style|add:"_style.html" as template %} + {% include template %} + {% endwith %} + {% endwith %} + {% endfor %} + {% endif %} + {% endblock %} + + {% block page_sub_content_2 %} + {% endblock %} + + {% block page_person_list_team %} + {% endblock %} + + {% block page_sub_content_3 %} + {% endblock %} + + {% block logo %} + {% with page.images.all|get_type:'logo' as images %} + {% if images %} +
+
+
+
+
+
    + {% include 'core/inc/logo.html' %} +
+
+
+
+
+
+ {% endif %} + {% endwith %} + {% 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 %} + {% include "core/inc/related_content.html" %} + {% endwith %} + {% endblock %} + +
+ + +{% endblock %} diff --cc app/themes/base/templates/projects/project_detail.html index 72674f68,00000000..e426951c mode 100644,000000..100644 --- a/app/themes/base/templates/projects/project_detail.html +++ b/app/themes/base/templates/projects/project_detail.html @@@ -1,351 -1,0 +1,351 @@@ +{% extends "pages/page.html" %} +{% load mezzanine_tags keyword_tags i18n organization_tags pages_tags %} + +{% block meta_title %}{{ object.meta_title }}{% endblock %} + +{% block meta_keywords %}{% metablock %} +{% keywords_for object as keywords %} +{% for keyword in keywords %} + {% if not forloop.first %}, {% endif %} + {{ keyword }} +{% endfor %} +{% endmetablock %}{% endblock %} + +{% block page_class %} + object +{% endblock %} + +{% block body_class %} + pattern pattern-bg {{ department.pages.all.0.weaving_css_class }} +{% endblock %} + +{% block breadcrumb_menu %} + {{ block.super }} + +{% endblock %} + +{% block page_tags %} + + {% comment %} + {% if department %} +
+ {{ department.pages.all.0.title }} +
+ {% endif %} +
+ {% trans 'Project' %} +
+ {% endcomment %} + +{% endblock %} + +{% block page_title %} + + {% editable object.title %} +

{{ object.title }}

+ {% endeditable %} + + {% with page.get_ascendants|last as top_level_parent %} + {% if linked_organization_content and research_slug == top_level_parent.slug %} + {% include 'pages/page/includes/linked_organization_content.html' %} + {% endif %} + {% endwith %} + + {% if object.description %} + {% editable object.description %} +
+ {{ object.description }} +
+ {% endeditable %} + {% endif %} + +{% endblock %} + +{% block page_content %} + {% if object.content %} + {% editable object.content %} + {{ object.content|richtext_filters|safe }} + {% endeditable %} + {% endif %} +{% endblock %} + +{% block page_sidebar %} + +{% endblock %} + +{% block page_link %} + {% with object.links.all as links %} + {% if links %} + {% include 'core/inc/link.html' %} + {% endif %} + {% endwith %} +{% endblock %} + +{% block page_audio %} + {% with object as object %} + {{ block.super }} + {% endwith %} +{% endblock %} + +{% block page_slider %} + {% with object as object %} + {{ block.super }} + {% endwith %} +{% endblock %} + +{% block page_video %} + {% with object as object %} + {{ block.super }} + {% endwith %} +{% endblock %} + +{% block page_sub_content %} + + {% if object.type == 'external' %} +
+ +
+
+
+
+
+
+
+

{% trans "Project details" %}

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

{% trans "Participants" %}

+ +
+ + {% if object.lead_team or object.lead_organization %} +
+ {% if object.lead_team %} +
+ {% trans "Project lead team" %} +
+ + {% elif object.lead_organization %} +
+ {% trans "Project lead organization" %} +
+ + {% endif %} +
+ {% endif %} + +
+
+ {% trans "Partners" %} +
+
+ {% for organization in object.organizations.all %} + {% if organization.url %} + + {% endif %} + {{ organization }}
+ {% if organization.url %} +
+ {% endif %} + {% endfor %} +
+ +
+ {% trans "teams" %} ({{ host_organization }}) +
+
+ {% for team in object.teams.all %} + {% if team.pages.all %} + {{ team.short }}
+ {% endif %} + {% endfor %} +
+
+
+
+
+
+
+
+
+
+
+ {% endif %} + + {% with object.blocks.all as blocks %} + {% include "projects/inc/project_block.html" %} + {% endwith %} +{% endblock %} + +{% block page_demo %} +{% if object.demos.all %} +
+
+
+
+
+
+
    +

    {% trans "Demos" %}

    + {% for demo in object.demos.all %} +
  • {{ demo.title }}
  • + {% endfor %} +
+
+
+
+
+
+{% endif %} +{% endblock %} + +{% block page_blog %} +{% if object.blog_pages.all %} +
+
+
+
+
+
+
    +

    {% trans "Blog Pages" %}

    + {% for blog_page in object.blog_pages.all %} +
  • {{ blog_page.title }}
  • + {% endfor %} +
+
+
+
+
+
+{% endif %} +{% endblock %} + +{% block logo %} + {% if object.organizations.all|length > 0 %} +
+
+
+
+
+
    + {% if object.lead_organization %} + {% with object.lead_organization.images.all|get_type:'logo' as images %} + {% include 'core/inc/logo.html' %} + {% endwith %} + {% endif %} + {% for organization in object.organizations.all %} + {% with organization.images.all|get_type:'logo' as images %} + {% include 'core/inc/logo.html' %} + {% endwith %} + {% endfor %} +
+
+
+
+
+
+ {% endif %} +{% 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 %} diff --cc app/themes/base/templates/twitter/tweets.html index 45f65e05,00000000..851f67a0 mode 100644,000000..100644 --- a/app/themes/base/templates/twitter/tweets.html +++ b/app/themes/base/templates/twitter/tweets.html @@@ -1,28 -1,0 +1,36 @@@ + +{% load twitter_tags i18n %} + +{% tweets_default as tweets %} + +{% if tweets %} + +{% endif %}