diff --git a/snikket_web/templates/admin_invites.html b/snikket_web/templates/admin_invites.html index 84c6d62..d4d2213 100644 --- a/snikket_web/templates/admin_invites.html +++ b/snikket_web/templates/admin_invites.html @@ -18,17 +18,17 @@ - {% trans %}Expires{% endtrans %} {% trans %}Type{% endtrans %} {% trans %}Circle{% endtrans %} + {% trans %}Expires{% endtrans %} {% trans %}Actions{% endtrans %} {% for invite in invites %} + {% set invite_type = invite.reusable and "group" or "account" %} - {{ (invite.expires - now) | format_timedelta(add_direction=True) }} - {% call invite_type_name(invite) %}{% endcall %} + {% call invite_type_name(invite_type) %}{% endcall %} {#- -#} {#- -#} + {{ (invite.expires - now) | format_timedelta(add_direction=True) }} {%- call action_button("more", url_for(".edit_invite", id_=invite.id_), class="secondary") -%} {% trans %}Show invite details{% endtrans %} diff --git a/snikket_web/templates/library.j2 b/snikket_web/templates/library.j2 index 54915dc..1ddee5f 100644 --- a/snikket_web/templates/library.j2 +++ b/snikket_web/templates/library.j2 @@ -132,11 +132,11 @@ {%- endif -%} {% endmacro %} -{%- macro invite_type_name(invite_info, caller=None) -%} -{%- if invite_info.reusable -%} -{% trans %}Group{% endtrans %} -{%- else -%} +{%- macro invite_type_name(invite_type, caller=None) -%} +{%- if invite_type == "account" -%} {% trans %}Individual{% endtrans %} +{%- else -%} +{% trans %}Group{% endtrans %} {%- endif -%} {%- endmacro -%}