From a428d26b84bb700bb4b7339ac341035c4409c7ef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Je=CC=81re=CC=81my=20Fabre?= Date: Mon, 10 Oct 2016 16:31:16 +0200 Subject: [PATCH] Events update (list and details) --- app/static/src/sass/global/_helpers.scss | 24 ++++++ app/static/src/sass/modules/_page.scss | 8 ++ app/templates/agenda/event_detail.html | 79 ++++++++++++++----- .../agenda/includes/event_linecard.html | 6 +- .../agenda/includes/event_metainfo.html | 46 ++++++----- .../agenda/includes/event_metainfo_line.html | 4 +- .../network/inc/person/list_square_style.html | 24 +----- .../inc/person/person_card_square.html | 25 ++++++ 8 files changed, 147 insertions(+), 69 deletions(-) create mode 100644 app/templates/network/inc/person/person_card_square.html diff --git a/app/static/src/sass/global/_helpers.scss b/app/static/src/sass/global/_helpers.scss index 5ef0e7ab..0f0a2064 100755 --- a/app/static/src/sass/global/_helpers.scss +++ b/app/static/src/sass/global/_helpers.scss @@ -37,6 +37,30 @@ .ml2 { @include margin-left(2); } +.mt3 { + @include margin-top(3); +} +.mb3 { + @include margin-bottom(3); +} +.mr3 { + @include margin-right(3); +} +.ml3 { + @include margin-left(3); +} +.mt4 { + @include margin-top(4); +} +.mb4 { + @include margin-bottom(4); +} +.mr4 { + @include margin-right(4); +} +.ml4 { + @include margin-left(4); +} .p1 { @include padding(1); } diff --git a/app/static/src/sass/modules/_page.scss b/app/static/src/sass/modules/_page.scss index 471673b3..afc8735c 100644 --- a/app/static/src/sass/modules/_page.scss +++ b/app/static/src/sass/modules/_page.scss @@ -37,6 +37,10 @@ $module: ".page"; @include margin(1 0); + &--small { + @include margin(.5 0); + } + } &__meta-date { @@ -62,6 +66,10 @@ $module: ".page"; @include typeface(serif); font-weight: weight(heavy); + &--small { + @include font-size(s); + } + } &__meta-text { diff --git a/app/templates/agenda/event_detail.html b/app/templates/agenda/event_detail.html index a8461541..2e2ed648 100644 --- a/app/templates/agenda/event_detail.html +++ b/app/templates/agenda/event_detail.html @@ -117,19 +117,23 @@ {% endblock %} {% block page_link %} -
- {% with event.links.all as links %} - {% if links %} + +
+
+ {% with event.links.all as links %} + {% if links %} +
+ {% include 'core/inc/link.html' %} +
+ {% endif %} + {% endwith %} + {% if event.mentions %}
- {% include 'core/inc/link.html' %} +
+ {{ event.mentions }} +
{% endif %} - {% endwith %} -
-
- Notes de productions
- Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quod, modi sunt culpa sequi. Consequatur voluptate sapiente minus repellat earum, rerum asperiores, architecto quibusdam, dolore, soluta placeat aliquid. Voluptatum, dignissimos, quisquam. -
@@ -151,7 +155,7 @@ {% endwith %} {% endblock %} -{% block page_videos %} +{% block page_video %} {% with event.videos.all as videos %} {% if videos %} {% include 'core/inc/slider_video.html' %} @@ -161,15 +165,50 @@ {% block page_person_list %} {% if event.persons.all %} - {% if event.trainings.all %} - {% trans "Trainers" %}
- {% else %} - {% trans "Persons" %}
- {% endif %} - {% for person in event.persons.all %} - {{ person.person.title }}
- {{ person.person.bio|safe }}
- {% endfor %} +
+
+
+ +
+ +
+ +

+ {% 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 %} diff --git a/app/templates/agenda/includes/event_linecard.html b/app/templates/agenda/includes/event_linecard.html index 44e85911..bebd2e3b 100644 --- a/app/templates/agenda/includes/event_linecard.html +++ b/app/templates/agenda/includes/event_linecard.html @@ -37,11 +37,9 @@ {{ event.departments.all.0.department.name }}
{% endif %} - {% keywords_for event as tags %} - {% if tags %} + {% if event.category %}
- {% keywords_for event as tags %} - {{tags.0}} + {{ event.category }}
{% endif %}
diff --git a/app/templates/agenda/includes/event_metainfo.html b/app/templates/agenda/includes/event_metainfo.html index f8f529e1..328abcd5 100644 --- a/app/templates/agenda/includes/event_metainfo.html +++ b/app/templates/agenda/includes/event_metainfo.html @@ -13,19 +13,33 @@ {{ event.location.room }} {% endif %} - + {% google_static_map event 900 300 20 %}
{% endif %} +{% with event.trainings.all.0 as training %} + {% if training %} +
{% trans "Language" %}
+

{{ training.language }}

+
{% trans "Public type" %}
+

{{ training.public_type }}

+
{% trans "Level" %}
+

{{ training.level }}

+ {% endif %} +{% endwith %} + {% if unit_booking %} {% if event.prices.all.0|floatformat != '0' and event.prices.all|length > 0 %} {% for price in event.prices.all %} {% if forloop.first %} -
{% trans "Prices" %}
-

+

{% trans "Prices" %}
+

+ {% endif %} + {% if price.unit %} + {{ price.unit }}: {% endif %} {{ price.value|floatformat:"-2" }} €{% if not forloop.last %}
{% endif %} {% if forloop.last %} @@ -38,22 +52,14 @@

{% else %} -

- {% trans "Free entry. Limited seats available" %} -

+ {% if event.prices.all.0|floatformat != '0' %} +

+ {{ price.unit }} +

+ {% else %} +

+ {% trans "Free entry. Limited seats available" %} +

+ {% endif %} {% endif %} {% endif %} - -{% with event.trainings.all.0 as training %} - {% if training %} -
{% trans "Language" %} -

{{ training.language }}

-
-
{% trans "Public type" %} -

{{ training.public_type }}

-
-
{% trans "Level" %} -

{{ training.level }}

-
- {% endif %} -{% endwith %} diff --git a/app/templates/agenda/includes/event_metainfo_line.html b/app/templates/agenda/includes/event_metainfo_line.html index ae27e3e5..2f25d8bc 100644 --- a/app/templates/agenda/includes/event_metainfo_line.html +++ b/app/templates/agenda/includes/event_metainfo_line.html @@ -6,7 +6,7 @@ -
+
{% if event.location %} @@ -18,7 +18,7 @@ {% if event.prices.all.0|floatformat != '0' and event.prices.all|length > 0 %}

- + {% trans "Reserve" %}

diff --git a/app/templates/network/inc/person/list_square_style.html b/app/templates/network/inc/person/list_square_style.html index d5134bfe..fef07cc6 100644 --- a/app/templates/network/inc/person/list_square_style.html +++ b/app/templates/network/inc/person/list_square_style.html @@ -32,29 +32,7 @@
{% with person_list_block_inline.person as person %} - {% with person.images.all|get_type:'card' as card_images %} - {% if card_images %} -
- -
- person -
-
-
- {% endif %} - {% endwith %} - -
- -

{{ person.first_name }} {{ person.last_name }}

- - {% if person.description %} -
{{ person.description|richtext_filters|safe|truncatechars_html:255 }}
- {% elif person.bio %} -
{{ person.bio|richtext_filters|safe|truncatechars_html:255 }}
- {% endif %} - -
+ {% include "network/inc/person/person_card_square.html" %} {% endwith %}
diff --git a/app/templates/network/inc/person/person_card_square.html b/app/templates/network/inc/person/person_card_square.html new file mode 100644 index 00000000..aa8b3d22 --- /dev/null +++ b/app/templates/network/inc/person/person_card_square.html @@ -0,0 +1,25 @@ +{% load organization_tags mezzanine_tags %} + +{% with person.images.all|get_type:'card' as card_images %} + {% if card_images %} +
+ +
+ person +
+
+
+ {% endif %} +{% endwith %} + +
+ +

{{ person.first_name }} {{ person.last_name }}

+ + {% if person.description %} +
{{ person.description|richtext_filters|safe|truncatechars_html:255 }}
+ {% elif person.bio %} +
{{ person.bio|richtext_filters|safe|truncatechars_html:255 }}
+ {% endif %} + +
-- 2.39.5