add filters

This commit is contained in:
bkfox
2022-05-05 12:53:30 +02:00
parent e94aeb2440
commit 36f5ee8b44
6 changed files with 76 additions and 4 deletions

View 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 %}

View File

@ -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 %}

View File

@ -0,0 +1,4 @@
{% load i18n %}
<h3>{% blocktranslate with filter_title=title %} By {{ filter_title }} {% endblocktranslate %}</h3>
{% block content %}{% endblock %}