Working user and link list, (big)restructure

This is now a workspace consisting of:
  * the pslink app (a wasm frontend for the admin interface)
  * the pslink binary
  * shared - modules for communication between the two above.
This commit is contained in:
2021-08-12 15:48:02 +02:00
committed by dietrich
parent 1611cfb9a2
commit fc9b18141f
60 changed files with 2238 additions and 396 deletions
+58
View File
@@ -0,0 +1,58 @@
{% extends "admin.html" %}
{% block head2 %}
<script src="/static/sorttable.js"></script>
{% endblock %}
{% block admin %}
<div class="scrollable">
<table class="sortable">
<tr>
<th>
{{ fluent(key="link-code", lang=user.language)
}}
</th>
<th>
{{ fluent(key="link-target", lang=user.language)
}}
</th>
<th>
{{ fluent(key="username", lang=user.language)
}}
</th>
<th>
{{ fluent(key="statistics", lang=user.language)
}}
</th>
</tr>
{% for links_user in links_per_users %}
{% set l = links_user.link %}
{% set u = links_user.user %}
{% set c = links_user.clicks %}
<tr>
<td>
<a href="/admin/view/link/{{l.code}}"><span>{{l.code}}</span>
</a>
</td>
<td>
<a href="/admin/view/link/{{l.code}}">{{ l.target }}
</a>
</td>
<td>
{% if user.role == 2 or user.id == u.id %}
<a href="/admin/view/profile/{{u.id}}"><small>{{ u.username }}</small>
</a>
{% else %}
<small>{{ u.username }}</small>
{% endif %}
</td>
<td>
{{ c.number }}
</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}