diff --git a/main/models.py b/main/models.py index 7029d278fe3c05aac436c24af138bf4f11181f5f..524093117dfc42aa626231ebf982d6c1cf30446f 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 a73c030a915f725ee2fe4d409dfac706c308cab4..b5291e32c86aedcc87fa97b61b5f20af89d674ab 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>