1
|
{% extends 'base.html' %}
|
2
|
{% load i18n %}
|
3
|
{% block title %}{% trans "Management" %}{% endblock %}
|
4
|
{% block content %}
|
5
|
<div class="category">
|
6
|
{% trans "Category:" %}
|
7
|
<select>
|
8
|
<option value='' selected>---</option>
|
9
|
{% for category in categories %}
|
10
|
<option value='{{ category.id }}'>{{ category }}</option>
|
11
|
{% endfor %}
|
12
|
</select>
|
13
|
</div>
|
14
|
<ul id="management">
|
15
|
{% for obj in object_list %}
|
16
|
<li>
|
17
|
<div class="status">
|
18
|
{% if obj.published %}
|
19
|
<span class="icon published" title="{% trans "published" %}"></span>
|
20
|
{% endif %}
|
21
|
{% if obj.expired %}
|
22
|
<span class="icon expired" title="{% trans "expired" %}"></span>
|
23
|
{% endif %}
|
24
|
{% if obj.not_published %}
|
25
|
<span class="icon unpublished" title="{% trans "not published yet" %}"></span>
|
26
|
{% endif %}
|
27
|
</div>
|
28
|
<div class="actions">
|
29
|
<span class="icon edit"><a href="#"></a></span>
|
30
|
<span class="icon delete"><a href="#"></a></span>
|
31
|
</div>
|
32
|
<div class="announce">
|
33
|
<div class="title">{{ obj.title }}</div>
|
34
|
<div class="text_preview">{{ obj.text|safe|truncatechars_html:100 }}</div>
|
35
|
</div>
|
36
|
</li>
|
37
|
{% endfor %}
|
38
|
</ul>
|
39
|
|
40
|
{% if is_paginated %}
|
41
|
<ul class="pagination">
|
42
|
{% if page_obj.has_previous %}
|
43
|
<li class="prev">
|
44
|
<a href="?page={{ object_list.previous_page_number }}" class="icon"></a>
|
45
|
</li>
|
46
|
{% endif %}
|
47
|
<li class="current">
|
48
|
page {{ page_obj.number }} of {{ paginator.num_pages }}
|
49
|
</li>
|
50
|
{% if page_obj.has_next %}
|
51
|
<li class="next">
|
52
|
<a href="?page={{ page_obj.next_page_number }}" class="icon"></a>
|
53
|
</li>
|
54
|
{% endif %}
|
55
|
</ul>
|
56
|
{% endif %}
|
57
|
{% endblock %}
|