Skip to content
Snippets Groups Projects
Commit d63eb849 authored by OndraRehounek's avatar OndraRehounek
Browse files

district: Author page link

parent 792647a5
No related branches found
No related tags found
2 merge requests!418Release,!414district and region modules
Pipeline #6124 passed
......@@ -211,7 +211,7 @@ class DistrictArticlePage(ArticleMixin, SubpageMixin, MetadataPageMixin, Page):
### FIELDS
author_page = models.ForeignKey(
"district.DistrictPersonPage", on_delete=models.SET_NULL, null=True
"district.DistrictPersonPage", on_delete=models.SET_NULL, null=True, blank=True
)
is_black = models.BooleanField("Má tmavé pozadí?", default=False)
tags = ClusterTaggableManager(through=DistrictArticleTag, blank=True)
......
......@@ -16,7 +16,11 @@
<div class="inline-flex divide-x flex-grow">
<span class="pr-2">{{ page.date|date:"SHORT_DATE_FORMAT" }}</span>
<span class="pl-2" itemprop="author" itemtype="http://schema.org/Person" itemscope="">
{% if page.author_page %}
<a href="{{ page.author_page.url }}" itemprop="name">{{ page.author }}</a>
{% else %}
<span itemprop="name">{{ page.author }}</span>
{% endif %}
</span>
</div>
<div class="my-4">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment