{# The tokens that still work, on the API tokens page and on a person's. #} {% macro token_table(tokens, csrf_token, show_holder=True) %} {% if tokens %}
{% if show_holder %} {% endif %} {% for token, holder in tokens %} {% if show_holder %} {% endif %} {% endfor %}
HolderToken Scopes Created Expires Last used Actions
{{ holder.email }}
{{ token.name }}
{{ token.hint }}...
{{ token.scopes or '-' }} {{ token.created_at.strftime('%b %d, %Y') }} {% if token.expires_at %} {{ token.expires_at.strftime('%b %d, %Y') }} {% else %} Never {% endif %} {{ token.last_used_at.strftime('%b %d, %Y %H:%M') if token.last_used_at else 'Never' }}
{% else %}

No API tokens

No token that still works.

{% endif %} {% endmacro %}