From fd61c18ca1bd54b745649144227f007608271bd5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Je=CC=81re=CC=81my=20Fabre?= Date: Wed, 21 Sep 2016 17:48:26 +0200 Subject: [PATCH] Person block : display the description if the bio is not available --- .../sass/modules/boxes/_person-list-box.scss | 8 ++++++++ .../network/inc/person/list_circle_style.html | 7 +++++-- .../network/inc/person/list_square_style.html | 20 +++++++++++-------- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/app/static/src/sass/modules/boxes/_person-list-box.scss b/app/static/src/sass/modules/boxes/_person-list-box.scss index bb8f602c..c3d184a5 100644 --- a/app/static/src/sass/modules/boxes/_person-list-box.scss +++ b/app/static/src/sass/modules/boxes/_person-list-box.scss @@ -26,4 +26,12 @@ $module: ".person-list-box"; } + &__desc { + @include font-size(s); + @include line-height(.75); + @include typeface(serif); + @include margin(1 0 .25 0); + font-weight: weight(light); + } + } diff --git a/app/templates/network/inc/person/list_circle_style.html b/app/templates/network/inc/person/list_circle_style.html index 5a4e7ee7..ee65dd92 100644 --- a/app/templates/network/inc/person/list_circle_style.html +++ b/app/templates/network/inc/person/list_circle_style.html @@ -54,9 +54,12 @@

{{ person }}

- {% if person.description %} -

{{ person.description|slice:":255" }}

+ {% if person.bio %} +
{{ person.bio|richtext_filters|safe|truncatechars_html:255 }}
+ {% elif person.description %} +
{{ person.description|richtext_filters|safe|truncatechars_html:255 }}
{% endif %} + {% trans "resume" %} {% for link in person.links.all %} {% if link %} diff --git a/app/templates/network/inc/person/list_square_style.html b/app/templates/network/inc/person/list_square_style.html index 8b191687..5dc8cf0c 100644 --- a/app/templates/network/inc/person/list_square_style.html +++ b/app/templates/network/inc/person/list_square_style.html @@ -29,31 +29,35 @@
- +
{% with person_list_block_inline.person as person %} {% with person.images.all|get_type:'card' as card_images %} {% if card_images %}
-
- person -
+
+
+ person +
+
{% endif %} {% endwith %}
-

{{ person }}

+

{{ person }}

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