64 lines
1.9 KiB
HTML
64 lines
1.9 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n paginacion %}
|
|
{% load render_table from django_tables2 %}
|
|
|
|
|
|
{% block content %}
|
|
|
|
<a href="{% url 'lot:add' %}" type="button" class="btn btn-green-admin">
|
|
<i class="bi bi-plus"></i>
|
|
{% trans 'Add new lot' %}
|
|
</a>
|
|
|
|
<h3>{{ subtitle }}</h3>
|
|
<!-- Search and Filter Section -->
|
|
<div class="row mb-4">
|
|
<!-- Search Input -->
|
|
<div class="col-md-6">
|
|
<form method="get" class="d-flex">
|
|
<input
|
|
type="text"
|
|
name="q"
|
|
class="form-control me-2"
|
|
placeholder="{% trans 'Search lots...' %}"
|
|
value="{{ search_query }}">
|
|
<button type="submit" class="btn btn-outline-secondary">
|
|
<i class="bi bi-search"></i>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- Filter Dropdown -->
|
|
<div class="col-md-6 text-md-end">
|
|
<div class="dropdown">
|
|
<button class="btn btn-outline-secondary dropdown-toggle" type="button" id="filterDropdown" data-bs-toggle="dropdown" aria-expanded="false">
|
|
<i class="bi bi-filter me-2"></i>
|
|
{% trans 'Filter' %}
|
|
</button>
|
|
<ul class="dropdown-menu" aria-labelledby="filterDropdown">
|
|
|
|
<li>
|
|
<a class="dropdown-item {% if show_closed %}border border-info rounded{% endif %} " href="?show_closed={% if show_closed %}false{% else %}true{% endif %}{% if search_query %}&q={{ search_query }}{% endif %}">
|
|
{% trans 'Closed Lots' %}
|
|
{% if show_closed %}<i class="bi bi-check"></i>{% endif %}
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a class="dropdown-item" href="?{% if search_query %}q={{ search_query }}{% endif %}">
|
|
{% trans 'Clear Filters' %}
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Lots Table -->
|
|
{% render_table table %}
|
|
<div class="mt-5 d-flex align-items-center justify-content-center">
|
|
{% if table.page and table.paginator.num_pages > 1 %}
|
|
{% include "django_tables2/pagination.html" %}
|
|
{% endif %}
|
|
</div>{% endblock %}
|