From 2a7dc3bf199bfd7864594012d99e22260fcdabdc Mon Sep 17 00:00:00 2001 From: Andreas Valder <andreasv@fsmpi.rwth-aachen.de> Date: Wed, 31 Aug 2016 14:54:17 +0200 Subject: [PATCH] started changelog --- server.py | 6 ++++++ templates/log.html | 31 +++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 templates/log.html diff --git a/server.py b/server.py index b6a695a..51fa2fb 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 0000000..188c0c0 --- /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 %} -- GitLab