diff --git a/qr.py b/qr.py index fe13f85..7d3895a 100644 --- a/qr.py +++ b/qr.py @@ -61,13 +61,24 @@ def edit(): saveFile() return render_template('success.html') -@app.route("/admin", methods=['GET', 'POST']) +@app.route("/admin") def admin(): return render_template('admin.html') +@app.route("/generate", methods=['GET', 'POST']) +def generate(): + howmany = request.form.get("howmany") + if howmany is None: + return render_template('generate.html') + return render_template("message.html", message="Totally generated {} many codes right now.".format(howmany)) + @app.route("/list") def list(): - return render_template('message.html', message='Comming soon!™') + linklist = [] + for key, value in links.items(): + if len(value['url'])>0: + linklist.append({'code':key, 'url':value['url']}) + return render_template('list.html', linklist=linklist) @app.route('/', defaults={'path': ''}) @app.route('/') diff --git a/static/style.css b/static/style.css index 8fe76bc..57e6353 100644 --- a/static/style.css +++ b/static/style.css @@ -58,6 +58,12 @@ a{ font-weight: 800; } +.linkonalist{ + color: #202222; + font-size: medium; + font-weight: 500; +} + a:link { text-decoration: none; } diff --git a/templates/admin.html b/templates/admin.html index b8ffef9..aee33c0 100644 --- a/templates/admin.html +++ b/templates/admin.html @@ -2,5 +2,8 @@ {% block content %}

Welcome Mr. admin person.

-

This funcionality has not been implemented yet. Please return later

+

List all attached links

+

Show unused labels

+

Generate blank labels

+

Log out

{% endblock %} \ No newline at end of file diff --git a/templates/generate.html b/templates/generate.html new file mode 100644 index 0000000..46efea5 --- /dev/null +++ b/templates/generate.html @@ -0,0 +1,10 @@ +{% extends 'base.html' %} + +{% block content %} +
+How many?:
+
+
+Note: It is best to print the generated codes immediatly from the result of this generation. +
+{% endblock %} \ No newline at end of file diff --git a/templates/list.html b/templates/list.html new file mode 100644 index 0000000..511d071 --- /dev/null +++ b/templates/list.html @@ -0,0 +1,14 @@ +{% extends 'base.html' %} + +{% block content %} +

ALL used links: (this many)

+ {% for label in linklist %} +

+ {{label['code']}}: + Show QR | Edit +
+ {{label['url']}} +


+

+ {% endfor %} +{% endblock %} \ No newline at end of file