fix: basic styles, dont list table if no entries
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
cellarspoon 2022-01-10 09:59:48 +01:00
parent 3138a2964f
commit e50ffa50ee
No known key found for this signature in database
GPG Key ID: 03789458B3D0C410
4 changed files with 40 additions and 19 deletions

View File

@ -1,3 +1,12 @@
input {
display: block;
margin-bottom: 15px;
}
th, td {
padding: 15px;
}
table, th, td {
border: 1px solid black;
}

View File

@ -1,3 +1,12 @@
input {
display: block;
margin-bottom: 15px;
}
th, td {
padding: 15px;
}
table, th, td {
border: 1px solid black;
}

View File

@ -1,27 +1,30 @@
{% extends "base.html" %}
{% block content %}
<p>
Hello, {{ user.preferred_username }}
Hello, {{ user.preferred_username }} 👋
<small>(<a href="{{ url_for('logout') }}">logout</a>)</small>
</p>
<table>
<tr>
<th>Link</th>
<th>Validity</th>
<th>Operations</th>
</tr>
{% for invite in invites[user.preferred_username] %}
{% if user.preferred_username in invites and invites[user.preferred_username]|length > 0 %}
<table>
<tr>
<td>
<a class="invite" href="{{ url_for('register_invite', invite=invite.link) }}">
{{ url_for('register_invite', invite=invite.link) }}
</a>
</td>
<td> {{ invite.validity }} </td>
<td> <a href="{{ url_for('invite_keycloak_delete') }}?invite={{ invite.link }}">delete</a> </td>
<th>Link</th>
<th>Validity</th>
<th>Actions</th>
</tr>
{% endfor %}
</table>
{% for invite in invites[user.preferred_username] %}
<tr>
<td>
<a class="invite" href="{{ url_for('register_invite', invite=invite.link) }}">
{{ url_for('register_invite', invite=invite.link) }}
</a>
</td>
<td> {{ invite.validity }} </td>
<td> <a href="{{ url_for('invite_keycloak_delete') }}?invite={{ invite.link }}">delete</a> </td>
</tr>
{% endfor %}
</table>
{% endif %}
<p>
<a href="{{ url_for('invite_keycloak_create') }}">Generate an invite link</a>
</p>

View File

@ -1,7 +1,7 @@
{% extends "base.html" %}
{% block content %}
<p>
You've been invited by {{ username }} to register an account!
You've been invited by {{ username }} 🎉
</p>
<form method="post" action="{{ url_for('form_keycloak_register') }}">
@ -22,7 +22,7 @@
<input type="hidden" name="invited_by" value="{{ username }}"/>
<input type="submit" />
<input type="submit" value="Register" />
</form>
{% endblock %}