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.
 
 
 
 
 
 

76 lines
2.1 KiB

{% extends 'base.html' %}
{% comment %}
Displays lists of all countries in the table
and creating buttons which can change each country
{% endcomment %}
{% block body %}
<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>&nbsp;</th>
</tr>
</thead>
<tbody>
{% for item in objects %}
<tr>
<td>{{ item.id }}</td>
<td>{{ item.name }}</td>
<td>{% ifnotequal item.capital None %}{{ item.capital }} {% endifnotequal %}</td>
<td class="center sorting_1">
<a class="btn btn-info" href="/country/change/{{ item.url|lower }}">
<i class="icon-edit icon-white"></i> Изменить
</a>
<a class="btn btn-danger" href="/country/delete/{{ item.url }}">
<i class="icon-trash icon-white"></i> Удалить
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<a class="btn btn-success" href="/country/add"><i class="icon-plus-sign icon-white"></i> Добавить страну</a>
<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>
<!--
<span class="step-links">
{% if objects.has_previous %}
<a href="?page={{ objects.previous_page_number }}">previous</a>
{% endif %}
<span class="current">
Page {{ objects.number }} of {{ objects.paginator.num_pages }}.
</span>
{% if objects.has_next %}
<a href="?page={{ objects.next_page_number }}">next</a>
{% endif %}
</span>
</div> -->
</div>
</div>
{% endblock %}