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
|
||||
template_name = "inventory/car_list_view.html"
|
||||
context_object_name = "cars"
|
||||
paginate_by = 10
|
||||
paginate_by = 20
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
dealer = get_user_type(self.request)
|
||||
@ -2449,7 +2449,7 @@ class EstimateListView(LoginRequiredMixin, ListView):
|
||||
model = EstimateModel
|
||||
template_name = "sales/estimates/estimate_list.html"
|
||||
context_object_name = "estimates"
|
||||
paginate_by = 10
|
||||
paginate_by = 20
|
||||
|
||||
def get_queryset(self):
|
||||
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 class="row">
|
||||
<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>
|
||||
<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>
|
||||
|
||||
|
||||
<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>
|
||||
<tr>
|
||||
<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">
|
||||
{% for car in page_obj %}
|
||||
<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">
|
||||
<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 class="align-middle white-space-nowrap deadline">
|
||||
<p class="mb-0 fs-9 text-body">{{car.year}}</p>
|
||||
</td>
|
||||
<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 class="align-middle white-space-nowrap task">
|
||||
<p class="fw-bo text-body fs-9 mb-0">{{car.vin}}</p>
|
||||
@ -164,18 +164,18 @@
|
||||
</table>
|
||||
</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"
|
||||
hx-on::before-request="on_before_request()"
|
||||
hx-on::after-request="on_after_request()">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row d-flex justify-content-end align-items-center p-3">
|
||||
|
||||
{% if is_paginated %}
|
||||
{% include 'partials/pagination.html' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,66 +1,39 @@
|
||||
{% load i18n static %}
|
||||
|
||||
<div class="pagination my-1">
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination pagination-sm justify-content-center mb-0">
|
||||
{% if page_obj.has_previous %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="?page={{ page_obj.previous_page_number }}" aria-label="{% trans 'Previous' %}">
|
||||
<span aria-hidden="true">
|
||||
{% if LANGUAGE_CODE == 'ar' %}
|
||||
<span class="fa fa-chevron-right"></span>
|
||||
{% else %}
|
||||
<span class="fa fa-chevron-left"></span>
|
||||
{% endif %}
|
||||
<div class="row align-items-center justify-content-end py-4 pe-0 fs-9">
|
||||
<div class="col-auto d-flex">
|
||||
{% if page_obj.has_previous %}
|
||||
<button class="page-link" data-list-pagination="prev" onclick="window.location.href='?page={{ page_obj.previous_page_number }}'">
|
||||
<span class="fas {% if LANGUAGE_CODE == 'ar' %}fa-chevron-right{% else %}fa-chevron-left{% endif %}"></span>
|
||||
</button>
|
||||
{% else %}
|
||||
<button class="page-link" disabled>
|
||||
<span class="fas {% if LANGUAGE_CODE == 'ar' %}fa-chevron-right{% else %}fa-chevron-left{% endif %}"></span>
|
||||
</button>
|
||||
{% 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-right"></span>
|
||||
{% else %}
|
||||
<span class="fa fa-chevron-left"></span>
|
||||
{% endif %}
|
||||
</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
<ul class="mb-0 pagination">
|
||||
{% for num in page_obj.paginator.page_range %}
|
||||
{% if page_obj.number == num %}
|
||||
<li class="page-item active">
|
||||
<span class="page-link">{{ num }}</span>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="?page={{ num }}">{{ num }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if page_obj.number == num %}
|
||||
<li class="page-item active">
|
||||
<span class="page-link">{{ num }}</span>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="?page={{ num }}">{{ num }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% 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>
|
||||
</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>
|
||||
Loading…
x
Reference in New Issue
Block a user