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.
 
 
 
 
 
 

64 lines
2.3 KiB

{% extends 'base.html' %}
{% load thumbnail %}
{% 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>&nbsp; </th>
<th>Заголовок</th>
<th>{% if request.path == "/admin/specialist_catalog/catalog/city/" %}Город{% elif request.path == "/admin/specialist_catalog/catalog/country/" %}Страна{% else %}Страна/Город{% endif %}</th>
<th>Количество специалистов</th>
<th>Link</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{% for item in object_list %}
<tr>
<td>
{% thumbnail item.logo_preview "100x100" crop="center" as im %}
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}">
{% endthumbnail %}</td>
<td>{{ item.title }}</td>
<td>{% if item.type == 1%}{{ item.country.name }}{% else %}{{ item.city.name }}{% endif %}</td>
<td>{{ item.specialists.count }}</td>
<td><a href="{{ item.get_absolute_url }}">Заценить</a></td>
<td class="center sorting_1">
<a class="btn-small btn-info" href='{% url "catalog_edit" item.id %}'>
Изменить
</a>
</td>
<td>
<a class="btn-small btn-danger delete" href='{% url "catalog_delete" item.id %}'>
Удалить
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<a class="btn btn-success" href='{% url "catalog_new" %}'>
<i class="icon-plus-sign icon-white"></i> Хочу еще один </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 %}