From bd134ed333278f33c9b5596ef5df2501ee648bb1 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Sat, 12 Feb 2022 12:07:05 -0500 Subject: add admin page, delete function, and APPNAME var The admin can view the links to private pastes, and can delete pastes from the web console. For now, the admin page is not protected, so this is not production-ready. --- templates/admin.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 templates/admin.html (limited to 'templates/admin.html') diff --git a/templates/admin.html b/templates/admin.html new file mode 100644 index 0000000..a815fb5 --- /dev/null +++ b/templates/admin.html @@ -0,0 +1,21 @@ +{% extends "layout.html" %} +{% block title %}Administration{% endblock %} +{% block body %} +

Administration for {{ appname }}

+{% if pastes %} + + +{% for p in pastes %} + + +{# magic string is from utf8icons.com #} + + + + + +{% endfor %} +{% endif %} +{% endblock %} -- cgit
idprivatetitleuserparentchildrenActions
{{ p.id }}{% if p.private %}✓{% endif %}{{ p.title }}{% if p.user %}{{ p.user }}{% endif%}{% if p.parent[0] %}{{ p.parent[1] }}{% endif %}{% if p.children %}{% for c in p.children %}{% if not loop.first %},{% endif %} +{{ c[1] }}{% endfor %}{% endif %} +