All checks were successful
Build and Push Docker Image / build (push) Successful in 43s
- Replaced `Order.PaymentMethod` options with "cash" and "card" while adjusting related code and templates - Set "cash" as the default payment method for orders and checkout forms - Added profile editing functionality with `ProfileForm`, allowing users to update names - Improved feedback messages across profile and order management templates - Updated catalog to handle empty filter results with a "reset filters" option
28 lines
1.4 KiB
HTML
28 lines
1.4 KiB
HTML
<main class="item-list">
|
||
{% if page_obj.object_list %}
|
||
{% include "_fragments/item-grid.html" with items=page_obj empty_message="В этой категории пока нет товаров." %}
|
||
{% elif filters_active %}
|
||
<div class="catalog-empty">
|
||
<p class="item-list-empty">По выбранным фильтрам ничего не найдено.</p>
|
||
<a class="catalog-empty__reset" href="{{ reset_filters_url }}">Сбросить фильтры</a>
|
||
</div>
|
||
{% else %}
|
||
{% include "_fragments/item-grid.html" with items=page_obj empty_message="В этой категории пока нет товаров." %}
|
||
{% endif %}
|
||
|
||
{% if paginator.num_pages > 1 %}
|
||
<nav class="catalog-pagination">
|
||
{% if page_obj.has_previous %}
|
||
<a href="?{{ pagination_query_string }}&page={{ page_obj.previous_page_number }}" class="catalog-pagination__btn">«</a>
|
||
{% endif %}
|
||
{% for i in paginator.page_range %}
|
||
<a href="?{{ pagination_query_string }}&page={{ i }}"
|
||
class="catalog-pagination__btn {% if i == page_obj.number %}active{% endif %}">{{ i }}</a>
|
||
{% endfor %}
|
||
{% if page_obj.has_next %}
|
||
<a href="?{{ pagination_query_string }}&page={{ page_obj.next_page_number }}" class="catalog-pagination__btn">»</a>
|
||
{% endif %}
|
||
</nav>
|
||
{% endif %}
|
||
</main>
|