# HG changeset patch # User Goffi # Date 1587329337 -7200 # Node ID 3195484abd827916aa0a2eb16c371fe7293a5402 # Parent f8f9019425c36fec05454417111aacafec749088 updated identities/avatar use, following backend changes diff -r f8f9019425c3 -r 3195484abd82 sat_templates/templates/default/blog/discover.html --- a/sat_templates/templates/default/blog/discover.html Wed Jan 08 14:31:46 2020 +0100 +++ b/sat_templates/templates/default/blog/discover.html Sun Apr 19 22:48:57 2020 +0200 @@ -18,7 +18,7 @@
  • {{ avatar.avatar(entity, class="avatar--medium") }} - {{ identities[entity].nick|default(entity, true) }} + {{ identities[entity].nicknames[0]|default(entity, true) }}
  • {% endfor %} diff -r f8f9019425c3 -r 3195484abd82 sat_templates/templates/default/blog/item.html --- a/sat_templates/templates/default/blog/item.html Wed Jan 08 14:31:46 2020 +0100 +++ b/sat_templates/templates/default/blog/item.html Sun Apr 19 22:48:57 2020 +0200 @@ -42,7 +42,7 @@ {% if avatar is defined %} {{ avatar.avatar(item.author_jid, "avatar--float-left") }} {% endif %} - {{identities[item.author_jid].nick | default(item.author)}} + {{identities[item.author_jid].nicknames[0] | default(item.author)}} {% else %} {{item.author}} {% endif %} diff -r f8f9019425c3 -r 3195484abd82 sat_templates/templates/default/chat/message.html --- a/sat_templates/templates/default/chat/message.html Wed Jan 08 14:31:46 2020 +0100 +++ b/sat_templates/templates/default/chat/message.html Sun Apr 19 22:48:57 2020 +0200 @@ -2,7 +2,7 @@

    {%- if msg.type != C.MESS_TYPE_INFO %} - {%- set author = identities[msg.from_].nick | default(msg.from_) -%} + {%- set author = identities[msg.from_].nicknames[0] | default(msg.from_) -%} {{ avatar.avatar(msg.from_, "avatar--float-left") }} {{author}} diff -r f8f9019425c3 -r 3195484abd82 sat_templates/templates/default/components/avatar.html --- a/sat_templates/templates/default/components/avatar.html Wed Jan 08 14:31:46 2020 +0100 +++ b/sat_templates/templates/default/components/avatar.html Sun Apr 19 22:48:57 2020 +0200 @@ -1,9 +1,9 @@ {% macro avatar(jid, class) %} {%- if identities is defined -%} {%- if identities[jid].avatar_basename is defined %} - + {% else %} - {{identities[jid].nick|first|upper}} + {{identities[jid].nicknames[0]|first|upper}} {%- endif -%} {%- endif -%} {% endmacro %}