forked from bton/matekasse
könnte so klappen
This commit is contained in:
parent
727617e2be
commit
19fbecda56
14 changed files with 205 additions and 187 deletions
|
@ -1,29 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en-150">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.1/socket.io.js" integrity="sha512-q/dWJ3kcmjBLU4Qc47E4A9kTB4m3wuTY7vkFJDTZKjTs8jhyGQnaUrxa0Ytd0ssMZhbNua9hE+E7Qv1j+DyZwA==" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var socket = io();
|
||||
socket.on("update", function(){
|
||||
window.location="http://matekasse.server.c3h/list"
|
||||
});
|
||||
</script>
|
||||
<title>Strichliste</title>
|
||||
<p><a href="/list">user and tag list</a> | <a href="/documentation">Documentation</a></p>
|
||||
<form action="/list/user" method="get"><input name="user" type="search" placeholder="Search for user"><button>Search</button></form>
|
||||
<form action="/adduser" method="post"><button type="submit">Add User</button></form>
|
||||
<br></br>
|
||||
{% for i in users %}
|
||||
<form action="/change" method="post" style="display: inline;">
|
||||
<p style="display: inline;">
|
||||
<a href="list/user?id={{i[0]}}">{{i[1]|safe}}</a>: {{i[2]/100}}€
|
||||
</p>
|
||||
<input name="id" type="hidden" value="{{i[0]}}">
|
||||
<input name="change" type="number" lang="nb" step="0.01" placeholder="add to balance">
|
||||
</form>
|
||||
<form action="/change" method="post" style="display: inline">
|
||||
<input name="id" type="hidden" value="{{i[0]}}">
|
||||
<button type="submit" name="change" value=-{{preis}}>-{{preis}}€</button>
|
||||
</form>
|
||||
<br style="line-height: 50%;"></br>
|
||||
{% endfor %}
|
||||
</html>
|
||||
{% extends "base.html" %}
|
||||
{% block title %}
|
||||
Strichliste
|
||||
{% endblock %}
|
||||
{% block customscript %}
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var socket = io();
|
||||
socket.on("update", function () {
|
||||
window.location = "http://matekasse.server.c3h/list"
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<form action="/list/user" method="get"><input name="user" type="search" placeholder="Search for user">
|
||||
<button>Search</button>
|
||||
</form>
|
||||
<form action="/adduser" method="post">
|
||||
<button type="submit">Add User</button>
|
||||
</form>
|
||||
<br></br>
|
||||
{% for i in users %}
|
||||
<form action="/change" method="post" style="display: inline;">
|
||||
<p style="display: inline;">
|
||||
<a href="list/user?id={{i[0]}}">{{i[1]|safe}}</a>: {{i[2]/100}}€
|
||||
</p>
|
||||
<input name="id" type="hidden" value="{{i[0]}}">
|
||||
<input name="change" type="number" lang="nb" step="0.01" placeholder="add to balance">
|
||||
</form>
|
||||
<form action="/change" method="post" style="display: inline">
|
||||
<input name="id" type="hidden" value="{{i[0]}}">
|
||||
<button type="submit" name="change" value=-{{preis}}>-{{preis}}€</button>
|
||||
</form>
|
||||
<br style="line-height: 50%;"></br>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue