You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

72 lines
2.4 KiB

{% extends 'base.html' %}
{% load i18n %}
{% block body %}
<div class="box span8">
<div class="box-header well">
<h2><i class="icon-arrow-down"></i>{% trans "Список статей" %}</h2>
</div>
<div class="box-content">
<form class='form-search'>
{{ search_form.search_name }}
<button type="submit" class="btn">{% trans "Найти" %}</button>
</form>
<table class="table table-hover">
<thead>
<tr>
<th>{% trans "Заголовок" %}</th>
<th>{% trans "Автор" %}</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{% for item in object_list %}
<tr>
<td>{{ item.main_title }}</td>
<td>{% ifnotequal item.author None %}{{ item.author }} {% endifnotequal %}
{% if item.draft %}
<br><i class="icon-edit"></i>{% trans "Черновик" %}
{% endif %}
</td>
<td class="center sorting_1">
<a class="btn-small btn-info" href="{{ item.admin_url }}">
{% trans "Изменить" %}
</a>
</td>
<td class="center sorting_1">
<a class="btn-small btn-inverse" href="/admin/article/copy/{{ item.slug|lower }}">
{% trans "Копировать" %}
</a>
</td>
<td>
<a class="btn-small btn-danger delete" href="/admin/article/article/{{ item.slug }}/delete/">
{% trans "Удалить" %}
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<a class="btn btn-success" href="{% if blog_flag %}/admin/article/blog/{% else %}{% if news_flag %}/admin/article/news/{% endif %}{% endif %}">
<i class="icon-plus-sign icon-white"></i> {% trans "Добавить" %}
{% if blog_flag %}{% trans "статью" %}{% else %}{% if news_flag %}{% trans "новость" %}{% endif %}{% endif %}
</a>
</div>
<div class="pagination pagination-centered">
<ul>
{% if page_obj.has_previous %}
<li> <a href="?page={{ page_obj.previous_page_number }}"></a></li>
{% endif %}
{% if page_obj.has_next %}
<li><a href="?page={{ page_obj.next_page_number }}"></a></li>
{% endif %}
</ul>
</div>
</div>
{% endblock %}