matemat/templates/admin.html
s3lph 4cf563ce62
All checks were successful
/ build_wheel (push) Successful in 1m58s
/ build_debian (push) Successful in 2m23s
/ test (push) Successful in 1m23s
/ codestyle (push) Successful in 4m52s
fix: missing error message when scanning an unassociated barcode
2024-12-01 23:37:22 +01:00

38 lines
976 B
HTML

{% extends "base.html" %}
{% block header %}
{# If the logged in user is an administrator, call the title "Administration", otherwise "Settings" #}
{% if authuser.is_admin %}
<h1>Administration</h1>
{% else %}
<h1>Settings</h1>
{% endif %}
{{ super() }}
{% endblock %}
{% block main %}
{# Always show the settings a user can edit for itself #}
{% include "admin_all.html" %}
{# Only show the "restricted" section if the user is an admin #}
{% if authuser.is_admin %}
{% include "admin_restricted.html" %}
{% endif %}
{{ super() }}
{% endblock %}
{% block eanwebsocket %}
let tokeninput = document.getElementById("admin-newtoken-token");
tokeninput.value = e.data;
tokeninput.select();
{% if authuser.is_admin %}
let eaninput = document.getElementById("admin-newproduct-ean");
eaninput.value = e.data;
eaninput.select();
{% else %}
tokeninput.scrollIntoView();
{% endif %}
{% endblock %}