diff --git a/snikket_web/templates/admin_edit_invite.html b/snikket_web/templates/admin_edit_invite.html index c6936d9..de4c04b 100644 --- a/snikket_web/templates/admin_edit_invite.html +++ b/snikket_web/templates/admin_edit_invite.html @@ -1,5 +1,5 @@ {% extends "admin_app.html" %} -{% from "library.j2" import showuri, form_button, standard_button, extract_circle_name %} +{% from "library.j2" import showuri, form_button, standard_button, extract_circle_name, invite_type_description %} {% block head_lead %} {{ super() }} {% include "copy-snippet.html" %} @@ -15,7 +15,7 @@
{% trans %}Link{% endtrans %}
{% call showuri(invite.landing_page) %}{% endcall %}
{% trans %}Invitation type{% endtrans %}
-
{% if invite.reusable %}{% trans %}This invitation link can be used arbitrarily often, until it expires, is revoked or a service-wide user limit is reached.{% endtrans %}{% else %}{% trans %}This invitation link can only be used once and is then depleted.{% endtrans %}{% endif %}
+
{% call invite_type_description(invite) %}{% endcall %}
{%- set ngroups = invite.group_ids | length -%} {%- if ngroups > 1 -%} {#- not supported via the web UI, but we should still display it properly -#} @@ -36,6 +36,10 @@ {%- endif -%} {%- endif -%} + {%- if invite.type_.value == "roster" -%} +
{% trans %}Contact{% endtrans %}
+
{% trans peer_jid=invite.jid %}The user will get added as contact of {{ peer_jid }}.{% endtrans %}
+ {%- endif -%}
{% trans %}Created{% endtrans %}
{{ invite.created_at | format_date }}
diff --git a/snikket_web/templates/admin_invites.html b/snikket_web/templates/admin_invites.html index 1dad14b..0b49b37 100644 --- a/snikket_web/templates/admin_invites.html +++ b/snikket_web/templates/admin_invites.html @@ -1,5 +1,5 @@ {% extends "admin_app.html" %} -{% from "library.j2" import action_button, icon, clipboard_button, form_button, custom_form_button, extract_circle_name, invite_type_name %} +{% from "library.j2" import action_button, icon, clipboard_button, form_button, custom_form_button, extract_circle_name, invite_type_name, invite_type_description %} {% block head_lead %} {{ super() }} {% include "copy-snippet.html" %} @@ -28,7 +28,7 @@ {% for invite in invites %} {{ (invite.expires - now) | format_timedelta(add_direction=True) }} - {% call invite_type_name(invite) %}{% endcall %} + {% call invite_type_name(invite) %}{% endcall %} {#- -#}