added some filters to templates
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
{% extends 'list-crud.html' %}
|
||||
{% load static %}
|
||||
{% load filters %}
|
||||
|
||||
{% block filter %}
|
||||
<form id="filterForm" method="get" style="display: inline;">
|
||||
<input type="hidden" name="filter" id="filterInput" value="{{ request.GET.filter|default:'active' }}">
|
||||
<button type="button" class="btn btn-primary" id="activeBtn">Active</button>
|
||||
<button type="button" class="btn btn-primary" id="allBtn">All</button>
|
||||
</form>
|
||||
{% endblock filter %}
|
||||
|
||||
{% block table_header %}
|
||||
<th style="display: none;">Select</th>
|
||||
<th>Company</th>
|
||||
<th>Invoice №</th>
|
||||
<th>Total amount</th>
|
||||
<th>Created on</th>
|
||||
<th>Paid</th>
|
||||
<th>Paid on</th>
|
||||
{% endblock table_header %}
|
||||
|
||||
{% block table_data %}
|
||||
<td>{{ object.company.name }}</td>
|
||||
<td>{{ object.invoice_number }}</td>
|
||||
<td>{{ object.total_amount }}</td>
|
||||
<td>{{ object.created_on|bg_date }}</td>
|
||||
<td>{{ object.paid|yesno:"Yes,No" }}</td>
|
||||
<td>{{ object.paid_on|bg_date|default:"" }}</td>
|
||||
{% endblock %}
|
||||
|
||||
{% block buttons %}
|
||||
{# <a href="{% url 'client_booking_create' %}" class="btn btn-primary">Create booking</a>#}
|
||||
{# <a href="#" id="editBtn" data-url="{% url 'client_booking_update' pk=0 %}" class="btn btn-primary" disabled>Edit Preinfo</a>#}
|
||||
{# <button id="deleteButton" class="btn btn-danger">Delete Preinfo</button>#}
|
||||
{# #}
|
||||
{# <button class="btn btn-primary" type="button" onclick="window.location.href='{% url 'client_booking_create' %}'">Create booking</button>#}
|
||||
{# <button class="btn btn-primary" type="button" id="editBtn" data-url="{% url 'client_booking_update' pk=0 %}" data-requires-selection disabled>Edit booking</button>#}
|
||||
{# <button class="btn btn-primary" type="button" id="deleteBtn" data-url="{% url 'client_booking_active' pk=0 %}" data-requires-selection disabled>Delete booking</button> #}
|
||||
|
||||
{% endblock buttons %}
|
||||
Reference in New Issue
Block a user