Add ljdc (les joies du code) generator
This commit is contained in:
24
dynastie/templates/search_blog.html
Normal file
24
dynastie/templates/search_blog.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<a href="/blog/{{ blog.id }}?page=0">Home</a> <a href="/category/{{ blog.id }}">Categories</a> <a href="/tag/{{ blog.id }}">Tags</a>
|
||||
<br/><br/>
|
||||
<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>
|
||||
<br/><br/>
|
||||
<form action="/blog/search/{{ blog.id }}" method="post">
|
||||
{% csrf_token %}
|
||||
<input name="text"/><input type="submit" name="search" value="Search" />
|
||||
</form>
|
||||
{% if posts|length == 0 %}
|
||||
<br/><br/>
|
||||
<b>Any post found</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 }}" onclick="return confirm('Do you really want to delete this item ?')">Delete</a></td></tr>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</table>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user