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.
 
 
 
 
 
 

58 lines
2.0 KiB

{% extends 'admin/base.html' %}
{% load staticfiles %}
{% block body %}
<div class="box span10">
<div class="box-header well">
<h2><i class="icon-arrow-down"></i>История для {{ newsletter.title }}</h2>
</div>
<div class="box-content">
<form id="id_form" class="form-inline">
<div class="form-group">
<select class="form-control" name="filter" id="filter">
<option>Фильтровать</option>
<option value="">Все</option>
{% for id, name in choices%}
<option class="opt" value="{{ id }}">{{ name }}</option>
{% endfor %}
</select>
</div>
</form>
<table class="table table-hover table table-bordered table-striped">
<colgroup>
<col width="33%">
<col width="33%">
<col width="33%">
</colgroup>
<thead>
<tr>
<th>Дата</th>
<th>Контакт</th>
<th>Статус</th>
</tr>
</thead>
<tbody>
{% for item in object_list %}
<tr>
<td>{{ item.creation_date|date:"Y-m-d H:i:s" }}</td>
<td>{{ item.contact.email }}</td>
<td>{{ item.get_verbose_status|safe }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{# pagination #}
{% include 'admin/includes/admin_pagination.html' with page_obj=object_list %}
</div>
<script>
$(document).ready(function(){
$("#filter").on('change', function(event){
console.log("click");
$("#id_form").submit();
})
})
</script>
{% endblock %}