..
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89 | {% extends 'blog/partials/base.html' %} {% block content %}
{% load static %}
<div class="main">
<div>
{% include 'blog_admin/partials/posts_topbar.html' %}
<h2 {% if not messages %}style="border: none; margin-bottom: 0;"{% endif %}>{{ title }}</h2>
{% for message in messages %}
<div style="text-align:center;padding:0;">
<p class="{{message.tags}}" style="text-align:center; margin-bottom: 15px;">{{ message }}</p>
</div>
{% endfor %}
<table id="tabular">
<thead>
<tr>
<th style="width: 28px; text-align: center;"></th>
<th style="width: 90px; text-align: center;">Cover</th>
<th colspan='1'>Article</th>
<th>Author</th>
<th>Created</th>
<th>Category</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for post in posts %}
<tr>
<td>
{% if post.is_public %}
<img src="{% static 'images/site/icons/eye_open.png' %}" alt="Home" border="0" width="24" height="24" style="margin-left: 2px;">
{% else %}
<img src="{% static 'images/site/icons/eye_closed.png' %}" alt="Home" border="0" width="24" height="24" style="margin-left: 2px;">
{% endif %}
</td>
<td>
<img src="{% url 'ignis:post_image' '80' post.id %}.gif" alt="Cover Image" style="width: 80px; display: block; margin: 0 auto;">
</td>
<td colspan='1'>
<a href="{% url 'blog:post' post.slug %}">
{{ post.title }}
</a>
</td>
<td><a href="{% url 'blog:user_activity' post.author %}">{{ post.author }}</a></td>
<td>{{ post.date | date:"d M Y" }}</td>
<td><a href="{% url 'blog:categories' %}/{{ post.category.slug }}">{{ post.category }}</a></td>
<td>
<p><a href="{% url 'blog-admin:new-post'%}?mode=edit&post_id={{post.id}}">Edit Post Metadata</a></p>
<p><a href="{% url 'blog-admin:edit-post' post.slug %}">Edit Post Contents</a></p>
<p><a href="{% url 'admin:blog_post_delete' post.id %}" class="error">Delete Post</a></p>
{% if post.is_public %}
<p><a href="{% url 'blog-admin:unpublish-post' post.slug %}" class="error" onclick="return confirm('This post will immediately be hidden from users. Proceed?')">Unpublish Post</a></p>
{% else %}
<p><a href="{% url 'blog-admin:publish-post' post.slug %}" class="success" onclick="return confirm('This post will immediately be shown to users. Proceed?')">Publish Post</a></p>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% if num_pages and page %}
<div class="pagination">
<center>
<table id="pagination">
<tr>
{% if page == 1 %}
<td><a class="disabled">«</a></td>
<td style="margin-right: 15px;"><a class="disabled">‹</a></td>
{% else %}
<td><a href="{% url 'blog-admin:posts' %}?page=1">«</a></td>
<td style="margin-right: 15px;"><a href="{% url 'blog-admin:posts' %}?page={{ page|add:'-1' }}">‹</a></td>
{% endif %}
{% load times %}
{% for i in num_pages|times %}
<td><a {% if i == page %}class="active"{% endif %} href="{% url 'blog-admin:posts' %}?page={{ i }}">{{ i }}</a></td>
{% endfor %}
{% if page == num_pages %}
<td style="margin-left: 15px;" class="disabled"><a class="disabled">›</a></td>
<td><a class="disabled">»</a></td>
{% else %}
<td style="margin-left: 15px;"><a href="{% url 'blog-admin:posts' %}?page={{ page|add:'1' }}">›</a></td>
<td><a href="{% url 'blog-admin:posts' %}?page={{ num_pages }}">»</a></td>
{% endif %}
</tr>
</table>
</center>
</div>
{% endif %}
</div>
</div>
{% endblock %}
|
|