byceps/blueprints/admin/user_badge/templates/macros/admin/user_badge.html
{% macro render_user_badge_linked(badge, size) -%}
<a href="{{ url_for('user_badge_admin.view', badge_id=badge.id) }}" class="user-badge size-{{ size }}" title="{{ badge.label }}"><img src="{{ badge.image_url_path }}"></a>
{%- endmacro %}
{% macro render_user_badges_list(badges_with_awarding_quantity) %}
<table class="itemlist is-vcentered">
{%- for badge, quantity in badges_with_awarding_quantity|items|sort(attribute='0.label') %}
<tr>
<td>{{ render_user_badge_linked(badge, 32) }}</td>
<td>{{ badge.label }}</td>
<td class="centered dimmed">{% if quantity > 1 %}×{{ quantity }}{% endif %}</td>
</tr>
{%- endfor %}
</table>
{%- endmacro %}