{% from '_functions.html' import avatar_thumbnail, badge_thumbnail, show_badges_by_tags, pluralize with context %} {% extends '_base.html' %} {% block head %} {% endblock %} {% block body %}

User Info

{{ avatar_thumbnail(user, 'responsive', 100, False) }}

{{user.nickname}}

{% if g.oidc_user.email == user.email %} {% endif %}
{% if g.oidc_user.email == user.email %} {% if invitations|length > 0 %}

Active Invitations

    {% for i in invitations %}
  • {{i.badge.name}}, expires {{ i.expires_on | relative_time }}, [claim link], [QR code].
  • {% endfor %}
{% endif %} {% if g.oidc_user.awarded_assertions %} {% endif %}
{% if user.opt_out %}
{% else%}
{% endif %} {% elif g.oidc_user.logged_in %}
{% endif %}
{% if user.assertions %}

History

{% for assertion in (user.assertions|sort(attribute="issued_on", reverse=True))[:history_limit] %}
{{ badge_thumbnail(assertion.badge, 64, 33) }}

received on {{assertion.issued_on.strftime('%Y-%m-%d')}} {% if assertion.issued_for %} for this activity {% endif %}

{% endfor %} {% if history_limit < user.assertions|length %}

This is only the last {{history_limit}} entries. Click here to see all of them.

{% endif %}
{% endif %}

Badges Earned

{% if user_badges|length < 1 %} {% if user.email == g.oidc_user.email %}

You have not earned any badges yet!

{% else%}

{{user.nickname}} has not earned any badges yet!

{% endif %} {% else%} {% if user.email == g.oidc_user.email %}

You have earned {% else%}

{{user.nickname}} has earned {% endif %} {{user_badges|length}} {{ pluralize("badge", user_badges|length) }} ({{"{0:.1f}".format(percent_earned)}}% of total). {% endif %}

{{ show_badges_by_tags(badges_by_tag, uncategorized_badges) }}
{% endblock %}