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

@ -8,7 +8,7 @@
<h2>{{ snippet.title }}</h2>
<p class=snippet-author>By {{ snippet.author.name }}
filed in <a href="{{ snippet.category.url }}">{{ snippet.category.name }}</a>
{% if snippet.author == g.user %}
{% if snippet.author == g.user or g.user.is_admin %}
(<a href="{{ url_for('snippets.edit', id=snippet.id) }}">edit</a>)
{% endif %}
{{ snippet.rendered_body }}