diff options
Diffstat (limited to 'templates/admin.html')
-rw-r--r-- | templates/admin.html | 21 |
1 files changed, 21 insertions, 0 deletions
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 %} +<h1>Administration for {{ appname }}</h1> +{% if pastes %} +<table> +<tr><th>id</th><th>private</th><th>title</th><th>user</th><th>parent</th><th>children</th><th>Actions</th></tr> +{% for p in pastes %} +<tr> +<td>{{ p.id }}</td> +<td>{% if p.private %}✓{% endif %}</td>{# magic string is from utf8icons.com #} +<td><a href="{% if not p.private %}{{ url_for('show_paste', paste_id=p.id) }}{% else %}{{ url_for('show_paste', paste_id=p.id, s=p.private) }}{% endif %}">{{ p.title }}</a></td> +<td>{% if p.user %}{{ p.user }}{% endif%}</td> +<td>{% if p.parent[0] %}<a href="{{ url_for('show_paste', paste_id=p.parent[0]) }}">{{ p.parent[1] }}</a>{% endif %}</td> +<td>{% if p.children %}{% for c in p.children %}{% if not loop.first %},{% endif %} +<a href="{{ url_for('show_paste', paste_id=c[0]) }}">{{ c[1] }}</a>{% endfor %}{% endif %} +</td> +<td><form method="post" action="{{ url_for('delete_paste', paste_id=p.id) }}"><input type="submit" value="delete"/> <input type="hidden" id="s" name="s" value="{{ p.delete }}"/></form></a></td> +{% endfor %} +{% endif %} +{% endblock %} |