{% macro render_api_token(token, repo, username, form) -%}
{{ token.description or '' }}
{{token.acls_list_pretty|length}} ACLs
{% if token.expired %} Expired on {{ token.expiration.date() }} {% else %} Active until {{ token.expiration.date() }} {% endif %} {% if not token.expired %} {% if repo %}
{% else %} {% endif %} {{ form.csrf_token }}
{% endif %} {% if repo %}
{% else %} {% endif %} {{ form.csrf_token }}
{%- endmacro %}