diff --git a/server.py b/server.py index b6a695aff38ea657d10ee989abc29af75726a9d7..51fa2fb3da7d85f8f0207d8bf860bbb70480a3bb 100755 --- a/server.py +++ b/server.py @@ -249,3 +249,9 @@ def schedule(): @mod_required def stats(): return render_template('stats.html') + +@app.route('/log') +@register_navbar('Changelog', 'book') +@mod_required +def log(): + return render_template('log.html', changelog=query('SELECT * FROM changelog ORDER BY "when" LIMIT 10')) diff --git a/templates/log.html b/templates/log.html new file mode 100644 index 0000000000000000000000000000000000000000..188c0c0d0c1c7083d76e2c21dc183126bff6d138 --- /dev/null +++ b/templates/log.html @@ -0,0 +1,31 @@ +{% from 'macros.html' import preview %} +{% extends "base.html" %} +{% block content %} +<div class="panel-group"> + <div class="panel panel-default"> + <div class="panel-heading"> + <h1 class="panel-title">Changelog</h1> + </div> + <table class="table"> + <tr> + <th>Zeit</th> + <th>Wer</th> + <th>Pfad</th> + <th>alter Wert</th> + <th>neuer Wert</th> + <th></th> + </tr> + {% for i in changelog %} + <tr> + <td>{{i.when}}</td> + <td>{{i.who}}</td> + <td>{{i.path}}</td> + <td>"{{i.value_old}}"</td> + <td>"{{i.value_new}}"</td> + <td><a class="btn btn-default">undo</button></td> + </tr> + {% endfor %} + </table> + </div> +</div> +{% endblock %}