parent
1b6020132e
commit
8d17d83d57
5 changed files with 90 additions and 3 deletions
@ -0,0 +1,57 @@ |
||||
{% 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> |
||||
{% 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 %} |
||||
|
||||
Loading…
Reference in new issue