update
This commit is contained in:
parent
692fa3f0ed
commit
813f014c46
Binary file not shown.
@ -687,7 +687,7 @@ class CarListView(LoginRequiredMixin, ListView):
|
|||||||
model = models.Car
|
model = models.Car
|
||||||
template_name = "inventory/car_list_view.html"
|
template_name = "inventory/car_list_view.html"
|
||||||
context_object_name = "cars"
|
context_object_name = "cars"
|
||||||
paginate_by = 10
|
paginate_by = 20
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
dealer = get_user_type(self.request)
|
dealer = get_user_type(self.request)
|
||||||
@ -2449,7 +2449,7 @@ class EstimateListView(LoginRequiredMixin, ListView):
|
|||||||
model = EstimateModel
|
model = EstimateModel
|
||||||
template_name = "sales/estimates/estimate_list.html"
|
template_name = "sales/estimates/estimate_list.html"
|
||||||
context_object_name = "estimates"
|
context_object_name = "estimates"
|
||||||
paginate_by = 10
|
paginate_by = 20
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
dealer = get_user_type(self.request)
|
dealer = get_user_type(self.request)
|
||||||
|
|||||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -93,7 +93,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="table-responsive scrollbar transition">
|
<div class="table-responsive scrollbar transition">
|
||||||
<div class="d-flex flex-wrap align-items-center justify-content-between py-3 pe-0 fs-9 border-bottom border-translucent">
|
<div class="d-flex flex-wrap align-items-center justify-content-between py-3 pe-0 fs-9">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex" hx-boost="true" hx-push-url='false' hx-include=".make,.model,.year,.car_status" hx-target=".table-responsive" hx-select=".table-responsive" hx-swap="innerHTML show:window:top" hx-indicator=".htmx-indicator"
|
<div class="d-flex" hx-boost="true" hx-push-url='false' hx-include=".make,.model,.year,.car_status" hx-target=".table-responsive" hx-select=".table-responsive" hx-swap="innerHTML show:window:top" hx-indicator=".htmx-indicator"
|
||||||
@ -103,7 +103,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<table class="table table-sm fs-9 mb-0 border-top border-translucent">
|
<table class="table table-sm fs-9 mb-0 border-translucent">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="sort white-space-nowrap align-middle ps-0" scope="col" data-sort="projectName" style="width:10%;">
|
<th class="sort white-space-nowrap align-middle ps-0" scope="col" data-sort="projectName" style="width:10%;">
|
||||||
@ -121,15 +121,15 @@
|
|||||||
<tbody class="list" id="project-list-table-body">
|
<tbody class="list" id="project-list-table-body">
|
||||||
{% for car in page_obj %}
|
{% for car in page_obj %}
|
||||||
<tr class="position-static">
|
<tr class="position-static">
|
||||||
<td class="align-middle time white-space-nowrap ps-0 projectName"><a class="fw-bold fs-8" href="{% url 'car_detail' car.pk %}">{{car.id_car_make}}</a></td>
|
<td class="align-middle time white-space-nowrap ps-0 projectName"><a class="fw-bold fs-8" href="{% url 'car_detail' car.pk %}">{{car.id_car_make.get_local_name|default:car.id_car_make.name}}</a></td>
|
||||||
<td class="align-middle white-space-nowrap start">
|
<td class="align-middle white-space-nowrap start">
|
||||||
<p class="mb-0 fs-9 text-body">{{car.id_car_model}}</p>
|
<p class="mb-0 fs-9 text-body">{{car.id_car_model.get_local_name|default:car.id_car_model.name}}</p>
|
||||||
</td>
|
</td>
|
||||||
<td class="align-middle white-space-nowrap deadline">
|
<td class="align-middle white-space-nowrap deadline">
|
||||||
<p class="mb-0 fs-9 text-body">{{car.year}}</p>
|
<p class="mb-0 fs-9 text-body">{{car.year}}</p>
|
||||||
</td>
|
</td>
|
||||||
<td class="align-middle white-space-nowrap task">
|
<td class="align-middle white-space-nowrap task">
|
||||||
<p class="fw-bo text-body fs-9 mb-0">{{car.id_car_trim}}</p>
|
<p class="fw-bo text-body fs-9 mb-0">{{car.id_car_trim.get_local_name|default:car.id_ca_trim.name }}</p>
|
||||||
</td>
|
</td>
|
||||||
<td class="align-middle white-space-nowrap task">
|
<td class="align-middle white-space-nowrap task">
|
||||||
<p class="fw-bo text-body fs-9 mb-0">{{car.vin}}</p>
|
<p class="fw-bo text-body fs-9 mb-0">{{car.vin}}</p>
|
||||||
@ -164,18 +164,18 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="d-flex flex-wrap align-items-center justify-content-between py-3 pe-0 fs-9 border-bottom border-translucent">
|
<div class="d-flex flex-wrap align-items-center justify-content-between py-3 pe-0 fs-9 ">
|
||||||
<div class="d-flex" hx-boost="true" hx-push-url='false' hx-include=".make,.model,.year,.car_status" hx-target=".table-responsive" hx-select=".table-responsive" hx-swap="innerHTML" hx-indicator=".htmx-indicator"
|
<div class="d-flex" hx-boost="true" hx-push-url='false' hx-include=".make,.model,.year,.car_status" hx-target=".table-responsive" hx-select=".table-responsive" hx-swap="innerHTML" hx-indicator=".htmx-indicator"
|
||||||
hx-on::before-request="on_before_request()"
|
hx-on::before-request="on_before_request()"
|
||||||
hx-on::after-request="on_after_request()">
|
hx-on::after-request="on_after_request()">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row d-flex justify-content-end align-items-center p-3">
|
|
||||||
{% if is_paginated %}
|
{% if is_paginated %}
|
||||||
{% include 'partials/pagination.html' %}
|
{% include 'partials/pagination.html' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,66 +1,39 @@
|
|||||||
{% load i18n static %}
|
{% load i18n static %}
|
||||||
|
|
||||||
<div class="pagination my-1">
|
<div class="row align-items-center justify-content-end py-4 pe-0 fs-9">
|
||||||
<nav aria-label="Page navigation">
|
<div class="col-auto d-flex">
|
||||||
<ul class="pagination pagination-sm justify-content-center mb-0">
|
{% if page_obj.has_previous %}
|
||||||
{% if page_obj.has_previous %}
|
<button class="page-link" data-list-pagination="prev" onclick="window.location.href='?page={{ page_obj.previous_page_number }}'">
|
||||||
<li class="page-item">
|
<span class="fas {% if LANGUAGE_CODE == 'ar' %}fa-chevron-right{% else %}fa-chevron-left{% endif %}"></span>
|
||||||
<a class="page-link" href="?page={{ page_obj.previous_page_number }}" aria-label="{% trans 'Previous' %}">
|
</button>
|
||||||
<span aria-hidden="true">
|
{% else %}
|
||||||
{% if LANGUAGE_CODE == 'ar' %}
|
<button class="page-link" disabled>
|
||||||
<span class="fa fa-chevron-right"></span>
|
<span class="fas {% if LANGUAGE_CODE == 'ar' %}fa-chevron-right{% else %}fa-chevron-left{% endif %}"></span>
|
||||||
{% else %}
|
</button>
|
||||||
<span class="fa fa-chevron-left"></span>
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
</span>
|
<ul class="mb-0 pagination">
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% else %}
|
|
||||||
<li class="page-item disabled">
|
|
||||||
<span class="page-link" aria-hidden="true">
|
|
||||||
{% if LANGUAGE_CODE == 'ar' %}
|
|
||||||
<span class="fa fa-chevron-right"></span>
|
|
||||||
{% else %}
|
|
||||||
<span class="fa fa-chevron-left"></span>
|
|
||||||
{% endif %}
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
{% for num in page_obj.paginator.page_range %}
|
{% for num in page_obj.paginator.page_range %}
|
||||||
{% if page_obj.number == num %}
|
{% if page_obj.number == num %}
|
||||||
<li class="page-item active">
|
<li class="page-item active">
|
||||||
<span class="page-link">{{ num }}</span>
|
<span class="page-link">{{ num }}</span>
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<a class="page-link" href="?page={{ num }}">{{ num }}</a>
|
<a class="page-link" href="?page={{ num }}">{{ num }}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if page_obj.has_next %}
|
|
||||||
<li class="page-item">
|
|
||||||
<a class="page-link" href="?page={{ page_obj.next_page_number }}" aria-label="{% trans 'Next' %}">
|
|
||||||
<span aria-hidden="true">
|
|
||||||
{% if LANGUAGE_CODE == 'ar' %}
|
|
||||||
<span class="fa fa-chevron-left"></span>
|
|
||||||
{% else %}
|
|
||||||
<span class="fa fa-chevron-right"></span>
|
|
||||||
{% endif %}
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% else %}
|
|
||||||
<li class="page-item disabled">
|
|
||||||
<span class="page-link" aria-hidden="true">
|
|
||||||
{% if LANGUAGE_CODE == 'ar' %}
|
|
||||||
<span class="fa fa-chevron-left"></span>
|
|
||||||
{% else %}
|
|
||||||
<span class="fa fa-chevron-right"></span>
|
|
||||||
{% endif %}
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
|
||||||
|
{% if page_obj.has_next %}
|
||||||
|
<button class="page-link pe-0" data-list-pagination="next" onclick="window.location.href='?page={{ page_obj.next_page_number }}'">
|
||||||
|
<span class="fas {% if LANGUAGE_CODE == 'ar' %}fa-chevron-left{% else %}fa-chevron-right{% endif %}"></span>
|
||||||
|
</button>
|
||||||
|
{% else %}
|
||||||
|
<button class="page-link pe-0" disabled>
|
||||||
|
<span class="fas {% if LANGUAGE_CODE == 'ar' %}fa-chevron-left{% else %}fa-chevron-right{% endif %}"></span>
|
||||||
|
</button>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
Loading…
x
Reference in New Issue
Block a user