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.
 
 
 
 
 
 

74 lines
2.6 KiB

{% extends 'base.html' %}
{% load thumbnail %}
{% load i18n %}
{% block body %}
<div class="box span8">
<div class="box-header well">
<h2><i class="icon-arrow-down"></i>Поиск</h2>
</div>
<div class="box-content">
<form method="get">
<input id="find" type ='text' name = 'query' placeholder={% trans "Заголовок" %}>
<input id="find_country" type ='text' name = 'country' placeholder={% trans "Страна" %}>
<input id="find_city" type ='text' name = 'city' placeholder={% trans "Город" %}>
<label for="only_country">{% trans "Только страны" %} <input class="checkbox" id="only_country" type ='checkbox' name = 'only_countries'></label>
<button type="submit" class="btn">{% trans "Найти" %}</button>
</form>
</div>
</div>
<script>
var cbx = $("#only_country")[0];
var fnd = $("#find_city")[0];
cbx.onclick = function(){
if (cbx.checked == true){
fnd.disabled = true;
}
else{
fnd.disabled = false;
}
}
</script>
<div class="box span8">
<div class="box-header well">
<h2><i class="icon-arrow-down"></i>{% trans "Все каталоги специалистов" %}</h2>
</div>
<div class="box-content">
<table class="table table-hover">
<thead>
<tr>
<th>{% trans "Заголовок" %}</th>
<th>{% trans 'Страна/Город' %}</th>
<th>Link</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{% for item in object_list %}
<tr>
<td>{{ item.title }}</td>
<td>{% if item.type == 1%}{{ item.country.name }}{% else %}{{ item.city.name }}{% endif %}</td>
<td><a href="{{ item.get_absolute_url }}" target="_blank">{% trans "на сайте" %}</a></td>
<td class="center sorting_1">
<a class="btn-small btn-info" href='{% url "catalog_edit" item.id %}'>
{% trans "Изменить" %}
</a>
</td>
<td>
<a class="btn-small btn-danger delete" href='{% url "catalog_delete" item.id %}'>
{% trans "Удалить" %}
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<a class="btn btn-success" href='{% url "catalog_new" %}'>
<i class="icon-plus-sign icon-white"></i> {% trans "Добавить" %}</a>
</div>
{% include 'admin/includes/admin_pagination.html' %}
</div>
{% endblock %}