forked from rc/aircox
add filters
This commit is contained in:
20
aircox/templates/admin/aircox/filters/date_filter.html
Normal file
20
aircox/templates/admin/aircox/filters/date_filter.html
Normal file
@ -0,0 +1,20 @@
|
||||
{% extends "./filter.html" %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
{% with choices|first as choice %}
|
||||
<form method="GET">
|
||||
<ul>
|
||||
{% for choice in choices %}
|
||||
<li>
|
||||
<label for="{{ choice.name }}">{{ choice.label }}</label>
|
||||
<input type="{{ choice.type }}" name="{{ choice.name }}"
|
||||
value="{{ choice.value }}" {{ choice.extra }} />
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div style="text-align: right;">
|
||||
<input type="submit" value="Chercher">
|
||||
</div>
|
||||
</form>
|
||||
{% endwith %}
|
||||
{% endblock %}
|
@ -0,0 +1,7 @@
|
||||
{% extends "admin/aircox/filter.html" %}
|
||||
{% block content %}
|
||||
{% with choices|first as choice %}
|
||||
<input type="datetime-local" value="choice.value" />
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
|
4
aircox/templates/admin/aircox/filters/filter.html
Normal file
4
aircox/templates/admin/aircox/filters/filter.html
Normal file
@ -0,0 +1,4 @@
|
||||
{% load i18n %}
|
||||
<h3>{% blocktranslate with filter_title=title %} By {{ filter_title }} {% endblocktranslate %}</h3>
|
||||
{% block content %}{% endblock %}
|
||||
|
Reference in New Issue
Block a user