Dynastie/templates/generate.html

32 lines
1.1 KiB
HTML
Raw Normal View History

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/>
<a href="/article/add/{{ blog.id }}">Add an article</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 }}
<br/><br/>
2012-07-18 11:30:54 +02:00
{% endautoescape %}
{% endif %}
2012-07-18 11:46:31 +02:00
{% if articles|length == 0 %}
<br/><br/>
<b>Any article available</b><br/><br/>
{% else %}
<table>
{% for article in articles %}
<tr><td><a href="/article/edit/{{ article.id }}">{{ article.id }}</a></td><td>{{ article.title }}</td><td>{{ article.category.name }}</td><td>{{ article.creation_date }}</td><td>{{ article.published }}</td><td>{{ article.front_page }}</td><td><a href="/article/delete/{{ article.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 %}