58 lines
1.7 KiB
HTML
58 lines
1.7 KiB
HTML
{% extends "meta.html" %}
|
|
{% block title %}
|
|
<title>Invitations - {{cfg("sr.ht", "site-name")}} meta</title>
|
|
{% endblock %}
|
|
{% block content %}
|
|
<div class="row">
|
|
<section class="col-md-7">
|
|
<p>
|
|
You have {{ current_user.invites }}
|
|
invite{{ 's' if current_user.invites != 1 else '' }} remaining with which
|
|
to invite people to {{ cfg("sr.ht", "site-name") }}. If you need more,
|
|
reach out to <a
|
|
href="mailto:{{cfg("sr.ht", "owner-email")}}"
|
|
>
|
|
{{cfg("sr.ht", "owner-name")}}
|
|
<{{cfg("sr.ht", "owner-email")}}>
|
|
</a>.
|
|
</p>
|
|
{% if current_user.user_type == UserType.admin %}
|
|
<div class="alert alert-info">
|
|
Admins have unlimited invites.
|
|
</div>
|
|
{% else %}
|
|
<div class="alert alert-warning">
|
|
You may be held accountable for the actions of users you invite. Please
|
|
exercise due care when giving them out.
|
|
</div>
|
|
{% endif %}
|
|
{% if current_user.invites != 0 or current_user.user_type == UserType.admin %}
|
|
<form method="POST" action="/invites/gen-invite">
|
|
{{csrf_token()}}
|
|
<button class="btn btn-primary" type="submit">
|
|
Generate link {{icon("caret-right")}}
|
|
</button>
|
|
</form>
|
|
{% endif %}
|
|
{% if current_user.invites_sent %}
|
|
<h3>Invites sent</h3>
|
|
<ul>
|
|
{% for invite in current_user.invites_sent %}
|
|
<li>
|
|
{% if invite.recipient_id %}
|
|
<code>{{invite.invite_hash}}</code>
|
|
(claimed by ~{{ invite.recipient.username}})
|
|
{% else %}
|
|
<code>
|
|
<a href="/register/{{invite.invite_hash}}">{{invite.invite_hash}}</a>
|
|
</code>
|
|
(unclaimed)
|
|
{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
</section>
|
|
</div>
|
|
{% endblock %}
|