2012-07-18 11:30:54 +02:00
|
|
|
{% extends "templates/base.html" %}
|
|
|
|
|
|
|
|
{% block content %}
|
2012-07-18 11:46:31 +02:00
|
|
|
{% 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/>
|
2012-09-08 12:35:52 +02:00
|
|
|
<a href="/post/add/{{ blog.id }}">Add a post</a> <a href="/generate/{{ blog.id }}">Generate blog</a><br/>
|
2012-07-18 11:30:54 +02:00
|
|
|
{% if report|length == 0 %}
|
|
|
|
<b style="color:red">Any engine selected</b><br/><br/>
|
|
|
|
{% else %}
|
|
|
|
{% autoescape off %}
|
|
|
|
{{ report }}
|
2012-08-25 22:33:34 +02:00
|
|
|
<br/><br/>
|
2012-07-18 11:30:54 +02:00
|
|
|
{% endautoescape %}
|
|
|
|
{% endif %}
|
2012-08-28 09:09:14 +02:00
|
|
|
{% if posts|length == 0 %}
|
2012-07-18 11:46:31 +02:00
|
|
|
<br/><br/>
|
2012-08-28 09:09:14 +02:00
|
|
|
<b>Any post available</b><br/><br/>
|
2012-07-18 11:46:31 +02:00
|
|
|
{% else %}
|
|
|
|
<table>
|
2012-08-28 09:09:14 +02:00
|
|
|
{% for post in posts %}
|
|
|
|
<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.published }}</td><td>{{ post.front_page }}</td><td><a href="/post/delete/{{ post.id }}">Delete</a></td></tr>
|
2012-07-18 11:46:31 +02:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
</table>
|
2012-07-18 11:30:54 +02:00
|
|
|
{% endblock %}
|