s3lph
66f23f5dda
feat: list all users and products in a table in the settings feat: add back buttons to signup, password login and touchkey login pages feat: if the tabfocus webextension is installed, use it to focus the tab when a barcode is scanned
32 lines
804 B
HTML
32 lines
804 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 eaninput = document.getElementById("admin-newproduct-ean");
|
|
eaninput.value = e.data;
|
|
eaninput.select();
|
|
eaninput.scrollIntoView();
|
|
{% endblock %}
|