Dynastie/templates/generate.html
2012-07-18 11:46:31 +02:00

31 lines
1.0 KiB
HTML

{% extends "templates/base.html" %}
{% block content %}
{% 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="/article/add/{{ blog.id }}">Add an article</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 }}
{% endautoescape %}
{% endif %}
{% if articles|length == 0 %}
<br/><br/>
<b>Any article available</b><br/><br/>
{% else %}
<table>
{% for article in articles %}
<hr><hl><a href="/article/edit/{{ article.id }}">{{ article.id }}</a></hl><hl>{{ article.title }}</hl><hl>{{ article.category.name }}</hl><hl>{{ article.creation_date }}</hl><hl>{{ article.published }}</hl><hl>{{ article.front_page }}</hl><hl><a href="/article/delete/{{ article.id }}">Delete</a></hl></hr>
{% endfor %}
{% endif %}
</table>
{% endblock %}