Do a cleaner package.
Add an Apache sample configuration file Update README with better installation instructions
This commit is contained in:
9
dynastie/templates/add_blog.html
Executable file
9
dynastie/templates/add_blog.html
Executable file
@@ -0,0 +1,9 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<form action="/blog/add" method="post">{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" name="add" value="Add" />
|
||||
<input type="submit" name="cancel" value="Cancel" />
|
||||
</form>
|
||||
{% endblock %}
|
||||
9
dynastie/templates/add_category.html
Executable file
9
dynastie/templates/add_category.html
Executable file
@@ -0,0 +1,9 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<form action="/category/add" method="post">{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" name="add" value="Add" />
|
||||
<input type="submit" name="cancel" value="Cancel" />
|
||||
</form>
|
||||
{% endblock %}
|
||||
85
dynastie/templates/add_post.html
Executable file
85
dynastie/templates/add_post.html
Executable file
@@ -0,0 +1,85 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block head %}
|
||||
<script type="text/javascript" src="/static/js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
|
||||
<script type="text/javascript">
|
||||
var external_list = "/tinyMCEExternalList/post/add/{{ blog_id }}";
|
||||
</script>
|
||||
<script type="text/javascript" src="/static/js/dynastie.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form id="previewForm" action="/post/add/{{ blog_id }}" method="post">{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
Available tags:
|
||||
<select id="available_tags" size=5>
|
||||
{% for tag in all_tags %}<option>{{ tag.name }}
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="button" onclick="addTag();" value="Add Tag"/>
|
||||
<br/>Editor <select name="editor" id="editor" onchange="switchEditor();">
|
||||
{% if editor == "html" %}
|
||||
<option value="html" selected="selected">HTML
|
||||
<option value="text">Text
|
||||
{% else %}
|
||||
<option value="html">HTML
|
||||
<option value="text" selected="selected">Text
|
||||
{% endif %}
|
||||
</select><br/>
|
||||
{% if editor == "html" %}
|
||||
<textarea id="content" name="content" cols="100" rows="25" class="mceAdvanced"></textarea>
|
||||
{% else %}
|
||||
<textarea id="content" name="content" cols="100" rows="25"></textarea>
|
||||
{% endif %}
|
||||
<br/>
|
||||
<input type="submit" name="add" value="Add" /><input type="button" name="preview" value="Preview" onClick="previewPost({{ blog_id }});"/><input type="submit" name="cancel" value="Cancel" />
|
||||
</form>
|
||||
{% if editor == "html" %}
|
||||
<div id="markdown_help" style="display:none">
|
||||
{% else %}
|
||||
<div id="markdown_help">
|
||||
{% endif %}
|
||||
<b>Markdown syntax</b><br /><br />
|
||||
<table>
|
||||
<tr>
|
||||
<td class="markdown_help">
|
||||
<pre style="display:inline">_italic_</pre> <span style="font-style:italic">italic</span><br/>
|
||||
<pre style="display:inline">**bold**</pre> <span style="font-weight:bold">bold</span><br/>
|
||||
<pre style="display:inline">~~line through~~</pre> <span style="text-decoration:line-through">line through</span><br/>
|
||||
<pre style="display:inline">>Citation</pre><br/>
|
||||
<pre>
|
||||
* Unordered list
|
||||
* Second element
|
||||
</pre>
|
||||
<ul>
|
||||
<li>Unordered list
|
||||
<li>Second element
|
||||
</ul>
|
||||
<pre>
|
||||
1. Ordered list
|
||||
1. Second element
|
||||
</pre>
|
||||
<ol>
|
||||
<li>Ordered list
|
||||
<li>Second element
|
||||
</ol>
|
||||
<pre style="display:inline"></pre><img src="https://bits.wikimedia.org/images/wikimedia-button.png" alt="Picture"/><br/>
|
||||
<pre style="display:inline">[Link](http://www.wikipedia.org)</pre> <a href="http://www.wikipedia.org">Link</a><br/><br/>
|
||||
</td>
|
||||
<td>
|
||||
<pre># Title # or
|
||||
Title
|
||||
=====</pre>
|
||||
<h1>Title</h1>
|
||||
<pre>## Sub title ## or
|
||||
Sub title
|
||||
---------</pre>
|
||||
<h2>Sub title</h2>
|
||||
<pre>### Sub sub title ###</pre>
|
||||
<h3>Sub sub title</h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br/><br/>
|
||||
{% endblock %}
|
||||
9
dynastie/templates/add_user.html
Executable file
9
dynastie/templates/add_user.html
Executable file
@@ -0,0 +1,9 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<form action="/user/add" method="post">{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" name="add" value="Add" />
|
||||
<input type="submit" name="cancel" value="Cancel" />
|
||||
</form>
|
||||
{% endblock %}
|
||||
14
dynastie/templates/base.html
Executable file
14
dynastie/templates/base.html
Executable file
@@ -0,0 +1,14 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Dynastie</title>
|
||||
{% block head %} {% endblock %}
|
||||
<link href="{{ STATIC_URL }}css/dynastie.css" rel="stylesheet" type="text/css"/>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a href="/user">Users</a> <a href="/blog">Blogs</a> <a href="/disconnect">Disconnect</a><br/><br/>
|
||||
{% block content %} {% endblock %}
|
||||
<br/><br/><br/>
|
||||
<center><a href="http://indefero.soutade.fr/p/dynastie">Dynastie</a> 0.2</center>
|
||||
</body>
|
||||
</html>
|
||||
14
dynastie/templates/blog.html
Executable file
14
dynastie/templates/blog.html
Executable file
@@ -0,0 +1,14 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% if blogs|length == 0 %}
|
||||
<b>Any blog available</b><br/><br/>
|
||||
{% else %}
|
||||
{% for blog in blogs %}
|
||||
<li><a href="/blog/{{ blog.id }}">{{ blog.name }} : {{ blog.title }}</a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if user.is_superuser %}
|
||||
<li><a href="/blog/add">Add a blog</a></li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
15
dynastie/templates/category.html
Executable file
15
dynastie/templates/category.html
Executable file
@@ -0,0 +1,15 @@
|
||||
{% 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/>
|
||||
{% if categories|length == 0 %}
|
||||
<b>Any category available</b><br/><br/>
|
||||
{% else %}
|
||||
<table>
|
||||
{% for category in categories %}
|
||||
<tr><td>{{ category.id }}</td><td>{{ category.name }}</td><td><a href="/category/edit/{{ category.id }}">Edit</a></td><td><a href="/category/delete/{{ category.id }}" onclick="return confirm('Do you really want to delete this item ?')">Delete</a></td></tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
<li><a href="/category/add">Add a category</a></li>
|
||||
{% endblock %}
|
||||
9
dynastie/templates/edit_category.html
Executable file
9
dynastie/templates/edit_category.html
Executable file
@@ -0,0 +1,9 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<form action="/category/edit/{{ category.id }}" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" name="edit" value="Edit" /> <input type="submit" name="cancel" value="Cancel" />
|
||||
</form>
|
||||
{% endblock %}
|
||||
9
dynastie/templates/edit_comment.html
Executable file
9
dynastie/templates/edit_comment.html
Executable file
@@ -0,0 +1,9 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<form action="/comment/edit/{{ comment.id }}" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" name="edit" value="Edit" /><input type="submit" name="cancel" value="Cancel" />
|
||||
</form>
|
||||
{% endblock %}
|
||||
96
dynastie/templates/edit_post.html
Executable file
96
dynastie/templates/edit_post.html
Executable file
@@ -0,0 +1,96 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block head %}
|
||||
<script type="text/javascript" src="/static/js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
|
||||
<script type="text/javascript">
|
||||
var external_list = "/tinyMCEExternalList/post/edit/{{ post_id }}";
|
||||
</script>
|
||||
<script type="text/javascript" src="/static/js/dynastie.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form id="previewForm" action="/post/edit/{{ post_id }}" method="post">{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
Available tags:
|
||||
<select id="available_tags" size=5>
|
||||
{% for tag in all_tags %}<option>{{ tag.name }}
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="button" onclick="addTag();" value="Add Tag"/>
|
||||
<br/>Editor <select name="editor" id="editor" onchange="switchEditor();">
|
||||
{% if editor == "html" %}
|
||||
<option value="html" selected="selected">HTML
|
||||
<option value="text">Text
|
||||
{% else %}
|
||||
<option value="html">HTML
|
||||
<option value="text" selected="selected">Text
|
||||
{% endif %}
|
||||
</select><br/>
|
||||
{% if editor == "html" %}
|
||||
<textarea id="content" name="content" cols="100" rows="25" class="mceAdvanced">{{ content }}</textarea><br/>
|
||||
{% else %}
|
||||
<textarea id="content" name="content" cols="100" rows="25">{{ content }}</textarea><br/>
|
||||
{% endif %}
|
||||
<input type="submit" name="edit" value="Edit" /><input type="button" name="preview" value="Preview" onClick="previewPost({{ blog_id }});"/><input type="submit" name="cancel" value="Cancel" />
|
||||
</form>
|
||||
<div class="comments">
|
||||
{% for comment in comments %}
|
||||
<div class="comment">
|
||||
<div class="infos">
|
||||
<a href="/comment/edit/{{ comment.id }}">#{{ comment.id }}</a> <span class="author">{{ comment.author }}</span> <span class="mail">{{ comment.email|default:"no mail" }}</span> <span class="date">{{ comment.date|date:"D d M Y H:m" }}<span> <a href="/comment/delete/{{ comment.id }}" onclick="return confirm('Do you really want to delete this item ?')">delete</a>
|
||||
</div>
|
||||
<div class="content">
|
||||
{% autoescape off %}
|
||||
{{ comment.the_comment }}
|
||||
{% endautoescape %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div><br/>
|
||||
{% if editor == "html" %}
|
||||
<div id="markdown_help" style="display:none">
|
||||
{% else %}
|
||||
<div id="markdown_help">
|
||||
{% endif %}
|
||||
<b>Markdown syntax</b><br /><br />
|
||||
<table>
|
||||
<tr>
|
||||
<td class="markdown_help">
|
||||
<pre style="display:inline">_italic_</pre> <span style="font-style:italic">italic</span><br/>
|
||||
<pre style="display:inline">**bold**</pre> <span style="font-weight:bold">bold</span><br/>
|
||||
<pre style="display:inline">~~line through~~</pre> <span style="text-decoration:line-through">line through</span><br/>
|
||||
<pre style="display:inline">>Citation</pre><br/>
|
||||
<pre>
|
||||
* Unordered list
|
||||
* Second element
|
||||
</pre>
|
||||
<ul>
|
||||
<li>Unordered list
|
||||
<li>Second element
|
||||
</ul>
|
||||
<pre>
|
||||
1. Ordered list
|
||||
1. Second element
|
||||
</pre>
|
||||
<ol>
|
||||
<li>Ordered list
|
||||
<li>Second element
|
||||
</ol>
|
||||
<pre style="display:inline"></pre><img src="https://bits.wikimedia.org/images/wikimedia-button.png" alt="Picture"/><br/>
|
||||
<pre style="display:inline">[Link](http://www.wikipedia.org)</pre> <a href="http://www.wikipedia.org">Link</a><br/><br/>
|
||||
</td>
|
||||
<td>
|
||||
<pre># Title # or
|
||||
Title
|
||||
=====</pre>
|
||||
<h1>Title</h1>
|
||||
<pre>## Sub title ## or
|
||||
Sub title
|
||||
---------</pre>
|
||||
<h2>Sub title</h2>
|
||||
<pre>### Sub sub title ###</pre>
|
||||
<h3>Sub sub title</h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
9
dynastie/templates/edit_tag.html
Executable file
9
dynastie/templates/edit_tag.html
Executable file
@@ -0,0 +1,9 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<form action="/tag/edit/{{ tag.id }}" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" name="edit" value="Edit" /> <input type="submit" name="cancel" value="Cancel" />
|
||||
</form>
|
||||
{% endblock %}
|
||||
21
dynastie/templates/edit_user.html
Executable file
21
dynastie/templates/edit_user.html
Executable file
@@ -0,0 +1,21 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% if edited %}
|
||||
<p class="edited">User successfuly updated</p>
|
||||
{% endif %}
|
||||
{% if user.is_superuser or user.id == user_to_edit.id %}
|
||||
<form action="/user/edit/{{ user_to_edit.id }}" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<p><label for="id_password">Password:</label> <input id="id_password" type="text" name="password" maxlength="128" /></p>
|
||||
<input type="submit" name="edit" value="Edit" /><input type="submit" name="cancel" value="Cancel" />{% if user.is_superuser %}<input type="submit" name="delete" value="Delete" onclick="return confirm('Do you really want to delete this item ?')"/>{% endif %}
|
||||
</form>
|
||||
{% else %}
|
||||
<form action="/user/edit/{{ user_to_edit.id }}" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" name="cancel" value="Cancel" />
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
2
dynastie/templates/footer.html
Executable file
2
dynastie/templates/footer.html
Executable file
@@ -0,0 +1,2 @@
|
||||
</body>
|
||||
</html>
|
||||
38
dynastie/templates/generate.html
Executable file
38
dynastie/templates/generate.html
Executable file
@@ -0,0 +1,38 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<a href="/blog/{{ blog.id }}">Home</a> <a href="/category/{{ blog.id }}">Categories</a> <a href="/tag/{{ blog.id }}">Tags</a>
|
||||
{% 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="/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/>
|
||||
{% if report|length == 0 %}
|
||||
<b style="color:red">Any engine selected</b><br/><br/>
|
||||
{% else %}
|
||||
{% autoescape off %}
|
||||
{{ report }}
|
||||
<br/><br/>
|
||||
{% endautoescape %}
|
||||
{% endif %}
|
||||
{% if posts|length == 0 %}
|
||||
<br/><br/>
|
||||
<b>Any post available</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 }}">Delete</a></td></tr>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</table>
|
||||
<br/><br/>
|
||||
{% autoescape off %}
|
||||
<center>{{ navigation_bar }}</center>
|
||||
{% endautoescape %}
|
||||
{% endblock %}
|
||||
6
dynastie/templates/header.html
Executable file
6
dynastie/templates/header.html
Executable file
@@ -0,0 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Dynastie</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href="/users">Users</a> <a href="/blog">Blogs</a> <a href="/disconnect">Disconnect</a><br/><br/>
|
||||
18
dynastie/templates/index.html
Executable file
18
dynastie/templates/index.html
Executable file
@@ -0,0 +1,18 @@
|
||||
<html xmlns:dyn="http://indefero.soutade.fr/p/dynastie">
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
||||
<meta name="robots" content="index, follow"/>
|
||||
<meta name="keywords" content="blog, gregory, soutade, grégory, soutadé, Grégory, Soutadé"/>
|
||||
<meta name="description" content="Bolg de Grégory Soutadé"/>
|
||||
<meta name="generator" content="Joomla! 1.5 - Open Source Content Management"/>
|
||||
<title>Blog de Grégory Soutadé</title>
|
||||
</head>
|
||||
<body>
|
||||
<dyn:title/>
|
||||
<dyn:author/>
|
||||
<dyn:date/>
|
||||
<dyn:content/>
|
||||
<title>Another title</title>
|
||||
</body>
|
||||
</html>
|
||||
39
dynastie/templates/login.html
Executable file
39
dynastie/templates/login.html
Executable file
@@ -0,0 +1,39 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Dynastie</title>
|
||||
<style type="text/css">
|
||||
div.logo {
|
||||
margin-top:2%;
|
||||
margin-bottom:5%;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
div.form {
|
||||
margin-left:40%;
|
||||
}
|
||||
|
||||
#login_failed {
|
||||
color:red;
|
||||
font-weight:bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="logo">
|
||||
<a href="http://indefero.soutade.fr/p/dynastie>"><img src="{{ STATIC_URL }}images/logo.png"/></a>
|
||||
</div>
|
||||
<div class="form">
|
||||
<form method="post" action="/index">
|
||||
{% csrf_token %}
|
||||
{% if login_failed %} <p id="login_failed">Login or password is invalid</p> {% endif %}
|
||||
<table>
|
||||
<tr><td>Login</td><td><input type="text" name="login"/></td></tr>
|
||||
<tr><td>Password</td><td><input id="password" type="password" name="password"/></td></tr>
|
||||
<tr><td/><td><input type="submit" value="Connect"/></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
3
dynastie/templates/search.html
Executable file
3
dynastie/templates/search.html
Executable file
@@ -0,0 +1,3 @@
|
||||
{% autoescape off %}
|
||||
{{ result }}
|
||||
{% endautoescape %}
|
||||
14
dynastie/templates/tag.html
Executable file
14
dynastie/templates/tag.html
Executable file
@@ -0,0 +1,14 @@
|
||||
{% 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/>
|
||||
{% if tags|length == 0 %}
|
||||
<b>Any tag available</b><br/><br/>
|
||||
{% else %}
|
||||
<table>
|
||||
{% for tag in tags %}
|
||||
<tr><td>{{ tag.id }}</td><td>{{ tag.name }}</td><td><a href="/tag/edit/{{ tag.id }}">Edit</a></td><td><a href="/tag/delete/{{ tag.id }}" onclick="return confirm('Do you really want to delete this item ?')">Delete</a></td></tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
18
dynastie/templates/user.html
Executable file
18
dynastie/templates/user.html
Executable file
@@ -0,0 +1,18 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% if users|length == 0 %}
|
||||
<b>Any user available</b><br/><br/>
|
||||
{% else %}
|
||||
{% for user in users %}
|
||||
{% if user.first_name != "" or user.last_name != "" %}
|
||||
<li><a href="/user/{{ user.id }}">{{ user.first_name }} {{ user.last_name }}</a></li>
|
||||
{% else %}
|
||||
<li><a href="/user/{{ user.id }}">{{ user.username }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if user.is_superuser %}
|
||||
<li><a href="/user/add">Add a user</a></li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
34
dynastie/templates/view_blog.html
Executable file
34
dynastie/templates/view_blog.html
Executable file
@@ -0,0 +1,34 @@
|
||||
{% 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>
|
||||
{% if edited %}
|
||||
<p class="edited">Blog successfuly updated</p>
|
||||
{% endif %}
|
||||
{% 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" onclick="return confirm('Do you really want to delete this item ?')"/>
|
||||
</form>
|
||||
{% endif %}
|
||||
<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/>
|
||||
{% if posts|length == 0 %}
|
||||
<br/><br/>
|
||||
<b>Any post available</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>
|
||||
<br/><br/>
|
||||
{% autoescape off %}
|
||||
<center>{{ navigation_bar }}</center>
|
||||
{% endautoescape %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user