diff sat_templates/templates/bulma/blog/item.html @ 268:ce2fd7a3911d

bulma (blog/item): use nickname when available instead of jid
author Goffi <goffi@goffi.org>
date Fri, 14 Aug 2020 08:30:11 +0200
parents ae365c036a58
children e982a05d43b1
line wrap: on
line diff
--- a/sat_templates/templates/bulma/blog/item.html	Fri Aug 14 08:28:31 2020 +0200
+++ b/sat_templates/templates/bulma/blog/item.html	Fri Aug 14 08:30:11 2020 +0200
@@ -38,7 +38,12 @@
             <div class="content">
                 <p class="subtitle is-6 has-text-grey">
                     {% set published = item.published|date_fmt(fmt=dates_format) %}
-                    <strong>{{item.author}}</strong> <small>{{published}}</small>
+                    {% if Identities is defined %}
+                        <strong>{{identities[item.author_jid].nicknames[0] if identities[item.author_jid].nicknames else item.author}}</strong>
+                    {% else %}
+                        <strong>{{item.author}}</strong>
+                    {% endif %}
+                    <small>{{published}}</small>
                     {% if item.tags %}
                         <small class="labels">
                             {% if tags_http_uri is defined %}