Admin interface for snippets

This commit is contained in:
Armin Ronacher 2010-05-15 23:19:13 +02:00
parent 45df60cfc6
commit 53ce827b17
15 changed files with 214 additions and 83 deletions

View file

@ -17,13 +17,17 @@
{% endif %}
<p>
Want to share something? Then add a
<a href="{{ url_for('snippets.new') }}">new snippet</a>.
<a href="{{ url_for('new') }}">new snippet</a>.
<h2>Snippets by Category</h2>
<ul>
{% for category in categories %}
<li><a href="{{ category.url }}">{{ category.name }}</a> ({{ category.count }})
{% endfor %}
</ul>
{% if g.user.is_admin %}
<p>
<a href="{{ url_for('manage_categories') }}">manage categories</a>
{% endif %}
{% if recent %}
<h2>Recently Added</h2>
<ul>