Simplify the logic to fallback to the FQN when no display name is available

This commit is contained in:
Bat
2018-07-26 16:36:19 +02:00
parent 15477875da
commit 5980c7b299
7 changed files with 17 additions and 40 deletions
+1 -6
View File
@@ -11,12 +11,7 @@
<p>
{{ "{{ count }} authors in this blog: " | _n(singular="One author in this blog: ", count = n_authors) }}
{% for author in authors %}
{% if author.display_name %}
{% set name = author.display_name %}
{% else %}
{% set name = author.username %}
{% endif %}
<a class="author" href="/@/{{ author.fqn }}">{{ name }}</a>{% if not loop.last %},{% endif %}
<a class="author" href="/@/{{ author.fqn }}">{{ author.name }}</a>{% if not loop.last %},{% endif %}
{% endfor %}
</p>
<p>