2014-02-02 14:21:16 +01:00
|
|
|
{% extends "base.html" %}
|
2012-07-08 16:23:39 +02:00
|
|
|
|
|
|
|
{% block content %}
|
2012-12-24 16:34:30 +01:00
|
|
|
{% if edited %}
|
|
|
|
<p class="edited">Blog successfuly updated</p>
|
2012-07-08 16:23:39 +02:00
|
|
|
<br/><br/>
|
2020-03-20 16:48:52 +01:00
|
|
|
{% endif %}
|
2012-11-25 20:39:19 +01:00
|
|
|
<a href="/post/add/{{ blog.id }}">Add a post</a> <a href="/generate/{{ blog.id }}">Generate blog</a> <a href="/search/generate/{{ blog.id }}">Generate search index</a>
|
2012-08-25 22:33:34 +02:00
|
|
|
<br/><br/>
|
2014-03-18 20:30:17 +01:00
|
|
|
<form action="/blog/search/{{ blog.id }}" method="post">
|
|
|
|
{% csrf_token %}
|
|
|
|
<input name="text"/><input type="submit" name="search" value="Search" />
|
|
|
|
</form>
|
2014-05-27 18:24:14 +02:00
|
|
|
{% if drafts|length != 0 %}
|
|
|
|
<b>Drafts</b>
|
|
|
|
<table>
|
|
|
|
{% for draft in drafts %}
|
2020-03-20 16:48:52 +01:00
|
|
|
<tr><td><a href="/draft/edit/{{ draft.id }}">{{ draft.id }}</a></td><td>{{ draft.title }}</td><td>{{ draft.category.name }}</td><td>{{ draft.creation_date }}</td><td>{{ draft.modification_date }}</td><td><a href="/draft/delete/{{ draft.id }}" onclick="return confirm('Do you really want to delete this item ?')">Delete</a></td><td><td/></tr>
|
2014-05-27 18:24:14 +02:00
|
|
|
{% endfor %}
|
|
|
|
</table><br/>
|
|
|
|
{% endif %}
|
|
|
|
|
2012-08-28 09:09:14 +02:00
|
|
|
{% if posts|length == 0 %}
|
2012-07-08 16:23:39 +02:00
|
|
|
<br/><br/>
|
2012-08-28 09:09:14 +02:00
|
|
|
<b>Any post available</b><br/><br/>
|
2012-07-08 16:23:39 +02:00
|
|
|
{% else %}
|
2014-05-27 18:24:14 +02:00
|
|
|
<b>Posts</b>
|
2012-07-08 16:23:39 +02:00
|
|
|
<table>
|
2012-08-28 09:09:14 +02:00
|
|
|
{% for post in posts %}
|
2012-10-04 21:49:33 +02:00
|
|
|
{% with post.id as cur_id %}
|
2020-03-20 16:48:52 +01:00
|
|
|
<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 }}" onclick="return confirm('Do you really want to delete this item ?')">Delete</a></td><td><a href="/generate/{{ blog.id }}/{{ post.id }}" onclick="return confirm('Do you really want to re generate only this item ?')">re Generate this article</td></tr>
|
2012-10-04 21:49:33 +02:00
|
|
|
{% endwith %}
|
2012-07-08 16:23:39 +02:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
</table>
|
2012-11-17 09:46:33 +01:00
|
|
|
<br/><br/>
|
|
|
|
{% autoescape off %}
|
|
|
|
<center>{{ navigation_bar }}</center>
|
|
|
|
{% endautoescape %}
|
2012-07-08 16:23:39 +02:00
|
|
|
{% endblock %}
|