From 9f63309ed957a5d3a413f54d4ba5148ca8c6cf20 Mon Sep 17 00:00:00 2001 From: Quido Zientek <quido@codero.cz> Date: Wed, 31 Aug 2022 10:14:05 +0200 Subject: [PATCH] =?UTF-8?q?[FIX]=20Person=20=20=20=20=20=20=20=20-=20admin?= =?UTF-8?q?:=20Lid=C3=A9=20->=20zm=C4=9Bnit=20na=20Dal=C5=A1=C3=AD=20lid?= =?UTF-8?q?=C3=A9=20=20=20=20=20=20=20=20-=20Text=20se=20nerpopisuje=20=20?= =?UTF-8?q?=20=20=20=20=20=20-=20"Aktu=C3=A1ln=C4=9B=20na=20twitteru"=20na?= =?UTF-8?q?dpis=20se=20zobrazuje=20i=20kdy=C5=BE=20nejsou=20tweety=20=20?= =?UTF-8?q?=20=20=20=20=20=20-=20handlovat=20none=20na=20telefonu,=20email?= =?UTF-8?q?u=20na=20detail=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/models.py | 2 +- main/templates/main/main_person_page.html | 38 +++++++++++++---------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/main/models.py b/main/models.py index 7029d278f..524093117 100644 --- a/main/models.py +++ b/main/models.py @@ -573,7 +573,7 @@ class MainPersonPage(ExtendedMetadataPageMixin, SubpageMixin, MetadataPageMixin, people = StreamField( [("people_group", blocks.PeopleGroupBlock(label="Seznam osob"))], - verbose_name="Lidé", + verbose_name="Další lidé", blank=True, ) diff --git a/main/templates/main/main_person_page.html b/main/templates/main/main_person_page.html index a73c030a9..b5291e32c 100644 --- a/main/templates/main/main_person_page.html +++ b/main/templates/main/main_person_page.html @@ -15,25 +15,31 @@ {{ page.perex }} </p> <p class="mb-5"> - {{ paga.text|richtext }} + {{ page.text|richtext }} </p> </article> </div> <div class="grid-right-side mb-8 xl:mb-0"> - <div class="bg-grey-100 flex flex-col justify-center mb-1 px-7 py-4 xl:py-9"> - <div class="flex mb-2"> - <i class="ico--envelope mr-2"></i> - <a href="mailto:{{ page.email }}" class="text-turquoise-500 underline"> - {{ page.email }} - </a> - </div> - <div class="flex"> - <i class="ico--phone mr-2"></i> - <a href="tel:{{ page.phone }}"> - {{ page.phone }} - </a> + {% if page.email or page.phone %} + <div class="bg-grey-100 flex flex-col justify-center mb-1 px-7 py-4 xl:py-9"> + {% if page.email %} + <div class="flex mb-2"> + <i class="ico--envelope mr-2"></i> + <a href="mailto:{{ page.email }}" class="text-turquoise-500 underline"> + {{ page.email }} + </a> + </div> + {% endif %} + {% if page.phone %} + <div class="flex"> + <i class="ico--phone mr-2"></i> + <a href="tel:{{ page.phone }}"> + {{ page.phone }} + </a> + </div> + {% endif %} </div> - </div> + {% endif %} {% if page.social_links %} <div class="bg-grey-100 flex flex-col justify-center px-7 py-4 xl:py-9"> {% for social_block in page.social_links %} @@ -57,7 +63,7 @@ </h2> <div class="__js-root twitter-carousel-root"> <ui-twitter-carousel> - {% for tweet in page.tweet_list %} + {% for tweet in tweet_list %} <div class="w-full flex max-w-xs"> <div class="mb-5 p-4 flex flex-col items-center text-center border border-grey-100 sm:mb-0"> <div class="flex flex-row sm:flex-col items-center"> @@ -76,7 +82,7 @@ </div> </div> {% endfor %} - </ui-twitter-carousel> + <ui-twitter-carousel> </div> </div> </section> -- GitLab