You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

52 line
1.6 KiB

  1. {% from "erpnext/templates/includes/macros.html" import attribute_filter_section, field_filter_section, discount_range_filters %}
  2. {% extends "templates/web.html" %}
  3. {% block title %}{{ _('All Products') }}{% endblock %}
  4. {% block header %}
  5. <div class="mb-6">{{ _('All Products') }}</div>
  6. {% endblock header %}
  7. {% block page_content %}
  8. <div class="row">
  9. <!-- Items section -->
  10. <div id="product-listing" class="col-12 order-2 col-md-9 order-md-2 item-card-group-section">
  11. <!-- Rendered via JS -->
  12. </div>
  13. <!-- Filters Section -->
  14. <div class="col-12 order-1 col-md-3 order-md-1">
  15. <div class="collapse d-md-block mr-4 filters-section" id="product-filters">
  16. <div class="d-flex justify-content-between align-items-center mb-5 title-section">
  17. <div class="mb-4 filters-title" > {{ _('Filters') }} </div>
  18. <a class="mb-4 clear-filters" href="/all-products">{{ _('Clear All') }}</a>
  19. </div>
  20. <!-- field filters -->
  21. {% if field_filters %}
  22. {{ field_filter_section(field_filters) }}
  23. {% endif %}
  24. <!-- attribute filters -->
  25. {% if attribute_filters %}
  26. {{ attribute_filter_section(attribute_filters) }}
  27. {% endif %}
  28. </div>
  29. </div>
  30. </div>
  31. <script>
  32. frappe.ready(() => {
  33. $('.btn-prev, .btn-next').click((e) => {
  34. const $btn = $(e.target);
  35. $btn.prop('disabled', true);
  36. const start = $btn.data('start');
  37. let query_params = frappe.utils.get_query_params();
  38. query_params.start = start;
  39. let path = window.location.pathname + '?' + frappe.utils.get_url_from_dict(query_params);
  40. window.location.href = path;
  41. });
  42. });
  43. </script>
  44. {% endblock %}