# HG changeset patch # User Goffi <goffi@goffi.org> # Date 1589839487 -7200 # Node ID aa37750c2617cedeefacd7f00febae365cd91088 # Parent 0e69b5843c2fd6ffae56d06373a884837aeefd8d theme (default): various fixes: - added missing </tr> in event/admin.html - fixed used of identities - uses `class` from kwargs in input/field.html diff -r 0e69b5843c2f -r aa37750c2617 sat_templates/templates/default/blog/item.html --- a/sat_templates/templates/default/blog/item.html Tue May 19 00:02:34 2020 +0200 +++ b/sat_templates/templates/default/blog/item.html Tue May 19 00:04:47 2020 +0200 @@ -42,7 +42,7 @@ {% if avatar is defined %} {{ avatar.avatar(item.author_jid, "avatar--float-left") }} {% endif %} - <span class="blog__author">{{identities[item.author_jid].nicknames[0] | default(item.author)}}</span> + <span class="blog__author">{{identities[item.author_jid].nicknames[0] if identities[item.author_jid].nicknames else item.author}}</span> {% else %} <span class="blog__author">{{item.author}}</span> {% endif %} diff -r 0e69b5843c2f -r aa37750c2617 sat_templates/templates/default/event/admin.html --- a/sat_templates/templates/default/event/admin.html Tue May 19 00:02:34 2020 +0200 +++ b/sat_templates/templates/default/event/admin.html Tue May 19 00:04:47 2020 +0200 @@ -33,6 +33,7 @@ <th>{% trans %}name{% endtrans %}</th> <th>{% trans %}coming?{% endtrans %}</th> <th>{% trans %}guests{% endtrans %}</th> + </tr> {% for name, data in invitees.items() %} <tr> <td>{{name}}</td> diff -r 0e69b5843c2f -r aa37750c2617 sat_templates/templates/default/file/discover.html --- a/sat_templates/templates/default/file/discover.html Tue May 19 00:02:34 2020 +0200 +++ b/sat_templates/templates/default/file/discover.html Tue May 19 00:04:47 2020 +0200 @@ -24,7 +24,7 @@ {% if disco_service_entities|count == 1 %} {% trans %}your server{% endtrans %} {% else %} - {{ ident.values()[0].values()[0][0] }} + {{ (ident.values()|first).values()|first|first }} {% endif %} </span> </a> @@ -41,7 +41,9 @@ <li class='grid__item grid__item--medium grid__item--selectable'> <a href="{{entities_url[entity]}}"> {{images.get_icon_client(ident)}} - <span>{{ ident.values()[0].values()[0][0] }}</span> + <span> + {{ (ident.values()|first).values()|first|first }} + </span> </a> </li> {% endfor %} diff -r 0e69b5843c2f -r aa37750c2617 sat_templates/templates/default/input/field.html --- a/sat_templates/templates/default/input/field.html Tue May 19 00:02:34 2020 +0200 +++ b/sat_templates/templates/default/input/field.html Tue May 19 00:04:47 2020 +0200 @@ -93,5 +93,5 @@ @param text(str): label of the button @param id(none, str): id of the element #} - <input {{ 'id="{id}"'.format(id=id)|safe if id }} class="form_submit btn" type="submit" value="{{text}}" class="{{kwargs.pop('class', '')}}"> + <input {{ 'id="{id}"'.format(id=id)|safe if id }} class="form_submit btn {{kwargs.pop('class', '')}}" type="submit" value="{{text}}"> {% endmacro %}