2021-04-20 16:24:52 +00:00
|
|
|
{% from "erpnext/templates/includes/macros.html" import attribute_filter_section, field_filter_section, discount_range_filters %}
|
2019-03-19 06:18:32 +00:00
|
|
|
{% extends "templates/web.html" %}
|
2021-04-20 16:24:52 +00:00
|
|
|
|
2021-07-11 21:58:33 +00:00
|
|
|
{% block title %}{{ _('All Products') }}{% endblock %}
|
2019-03-19 06:18:32 +00:00
|
|
|
{% block header %}
|
2021-07-11 21:58:33 +00:00
|
|
|
<div class="mb-6">{{ _('All Products') }}</div>
|
2021-06-01 07:14:49 +00:00
|
|
|
{% endblock header %}
|
2019-03-19 06:18:32 +00:00
|
|
|
|
2021-06-01 07:14:49 +00:00
|
|
|
{% block page_content %}
|
2019-03-19 06:18:32 +00:00
|
|
|
<div class="row">
|
2021-05-17 15:14:41 +00:00
|
|
|
<!-- Items section -->
|
2021-05-12 19:52:05 +00:00
|
|
|
<div id="product-listing" class="col-12 order-2 col-md-9 order-md-2 item-card-group-section">
|
|
|
|
<!-- Rendered via JS -->
|
2019-03-19 06:18:32 +00:00
|
|
|
</div>
|
|
|
|
|
2021-05-12 19:52:05 +00:00
|
|
|
<!-- Filters Section -->
|
|
|
|
<div class="col-12 order-1 col-md-3 order-md-1">
|
2020-12-24 06:10:33 +00:00
|
|
|
<div class="collapse d-md-block mr-4 filters-section" id="product-filters">
|
|
|
|
<div class="d-flex justify-content-between align-items-center mb-5 title-section">
|
|
|
|
<div class="mb-4 filters-title" > {{ _('Filters') }} </div>
|
|
|
|
<a class="mb-4 clear-filters" href="/all-products">{{ _('Clear All') }}</a>
|
|
|
|
</div>
|
2021-04-20 16:24:52 +00:00
|
|
|
<!-- field filters -->
|
2021-02-19 10:26:52 +00:00
|
|
|
{% if field_filters %}
|
2021-04-20 16:24:52 +00:00
|
|
|
{{ field_filter_section(field_filters) }}
|
2021-02-19 10:26:52 +00:00
|
|
|
{% endif %}
|
2019-03-19 06:18:32 +00:00
|
|
|
|
2021-04-20 16:24:52 +00:00
|
|
|
<!-- attribute filters -->
|
2021-02-19 10:26:52 +00:00
|
|
|
{% if attribute_filters %}
|
2021-04-20 16:24:52 +00:00
|
|
|
{{ attribute_filter_section(attribute_filters) }}
|
|
|
|
{% endif %}
|
2019-03-19 06:18:32 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-05-12 19:52:05 +00:00
|
|
|
|
2019-03-19 06:18:32 +00:00
|
|
|
<script>
|
|
|
|
frappe.ready(() => {
|
|
|
|
$('.btn-prev, .btn-next').click((e) => {
|
|
|
|
const $btn = $(e.target);
|
|
|
|
$btn.prop('disabled', true);
|
|
|
|
const start = $btn.data('start');
|
|
|
|
let query_params = frappe.utils.get_query_params();
|
|
|
|
query_params.start = start;
|
|
|
|
let path = window.location.pathname + '?' + frappe.utils.get_url_from_dict(query_params);
|
|
|
|
window.location.href = path;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2020-12-24 06:10:33 +00:00
|
|
|
{% endblock %}
|