From: Jérémy Fabre Date: Wed, 21 Sep 2016 15:48:26 +0000 (+0200) Subject: Person block : display the description if the bio is not available X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=fd61c18ca1bd54b745649144227f007608271bd5;p=mezzo.git Person block : display the description if the bio is not available --- 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 %} - +