Dynastie/templates/generate.html
Grégory Soutadé 85488e0838 Add tags support
Set slugify to be global
Update modification date only if text has been changed
Fix a bug in preview (post_id was passed instead of blog_id)
Add Home, Category and Tag links in blog area instead of global area (dynastie template)
Fix a bug in Have_I_right
2012-11-08 21:23:30 +01:00

35 lines
1.3 KiB
HTML

{% extends "templates/base.html" %}
{% block content %}
<a href="/blog/{{ blog.id }}">Home</a> <a href="/category/{{ blog.id }}">Categories</a> <a href="/tag/{{ blog.id }}">Tags</a>
{% if user.is_superuser %}
<form action="/blog/edit/{{ blog.id }}" method="post">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" name="edit" value="Edit" /><input type="submit" name="delete" value="Delete" />
</form>
{% endif %}
<br/><br/>
<a href="/post/add/{{ blog.id }}">Add a post</a> <a href="/generate/{{ blog.id }}">Generate blog</a><br/>
{% if report|length == 0 %}
<b style="color:red">Any engine selected</b><br/><br/>
{% else %}
{% autoescape off %}
{{ report }}
<br/><br/>
{% endautoescape %}
{% endif %}
{% if posts|length == 0 %}
<br/><br/>
<b>Any post available</b><br/><br/>
{% else %}
<table>
{% for post in posts %}
{% with post.id as cur_id %}
<tr><td><a href="/post/edit/{{ post.id }}">{{ post.id }}</a></td><td>{{ post.title }}</td><td>{{ post.category.name }}</td><td>{{ post.creation_date }}</td><td>{{ post.modification_date }}</td><td>{{ post.published }}</td><td>{{ post.front_page }}</td><td>{{ comments|hash:cur_id|default_if_none:"0" }} comment{{ comments|hash:cur_id|pluralize }}</td><td><a href="/post/delete/{{ post.id }}">Delete</a></td></tr>
{% endwith %}
{% endfor %}
{% endif %}
</table>
{% endblock %}