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.
53 lines
1.5 KiB
53 lines
1.5 KiB
{% extends 'base.html' %}
|
|
{% block body %}
|
|
{% comment %}
|
|
Displays lists of all articles in the table
|
|
and creating buttons which can change each article
|
|
{% endcomment %}
|
|
|
|
<div class="box span8">
|
|
<div class="box-header well">
|
|
<h2><i class="icon-arrow-down"></i>Список статей</h2>
|
|
</div>
|
|
<div class="box-content">
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>id</th>
|
|
<th>Заголовок</th>
|
|
<th>Автор</th>
|
|
<th> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for item in objects %}
|
|
<tr>
|
|
<td>{{ item.id }}</td>
|
|
<td>{{ item.main_title }}</td>
|
|
<td>{% ifnotequal item.author None %}{{ item.author }} {% endifnotequal %}</td>
|
|
<td class="center sorting_1">
|
|
<a class="btn btn-info" href="/article/change/{{ item.url|lower }}">
|
|
<i class="icon-edit icon-white"></i> Изменить
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
<a class="btn btn-success" href="/article/add"><i class="icon-plus-sign icon-white"></i> Добавить статью</a>
|
|
</div>
|
|
|
|
<div class="pagination pagination-centered">
|
|
<ul>
|
|
{% if objects.has_previous %}
|
|
<li> <a href="?page={{ objects.previous_page_number }}">←</a></li>
|
|
{% endif %}
|
|
|
|
{% if objects.has_next %}
|
|
<li><a href="?page={{ objects.next_page_number }}">→</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %} |