summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authormichal <michal.sipa@mirumee.com>2017-09-25 16:16:12 +0200
committermichal <michal.sipa@mirumee.com>2017-09-27 15:59:13 +0200
commit0deb80fd9a11d2315df15f3109a89b351528032b (patch)
tree3f9a573fd355159362587bb0ad160498dd0db44a /templates
parentc8b0780259591d7fc7e354f27e60d2188bfc3911 (diff)
downloadsaleor-frontend-0deb80fd9a11d2315df15f3109a89b351528032b.tar.gz
saleor-frontend-0deb80fd9a11d2315df15f3109a89b351528032b.tar.bz2
saleor-frontend-0deb80fd9a11d2315df15f3109a89b351528032b.zip
Add filters
Add filter for price. Add filters for product/variant attributes - not working properly. Add some template updates.
Diffstat (limited to 'templates')
-rw-r--r--templates/category/index.html44
1 files changed, 18 insertions, 26 deletions
diff --git a/templates/category/index.html b/templates/category/index.html
index 512e7b37..351a006e 100644
--- a/templates/category/index.html
+++ b/templates/category/index.html
@@ -59,47 +59,39 @@
<div class="row">
<div class="col-md-4 col-lg-3">
<div class="product-filters">
- {% for name, filter in filters.items %}
- <form method="get">
- {{ name }}
- {{ filter.form.as_p }}
- <button type="submit">Search</button>
- </form>
- {% endfor %}
+
</div>
- <div>
+ <div>
<h2>
{% trans 'Filters' context 'Filter heading title' %}
<span class="clear-filters float-right" onClick="">{% trans 'Clear filters' context 'Category page filters' %}</span>
</h2>
<div class="product-filters">
<div class="product-filters__attributes">
- <div key={{ attribute.pk }}>
- <h3 onClick="">
- {{ title }}
- <div class="collapse-filters-icon">
- <InlineSVG key={key} src={imageSrc} />
- </div>
- </h3>
- <ul id={{ attribute.slug }}>
- <li key={value.id} class="item">
+ <form method="get">
+ <!--{% csrf_token %}-->
+ {% for field in filter.form %}
+ <div key={{ attribute.pk }}>
+ <h3 onClick="">
+ {{ field.label }}
+ <!--<div class="collapse-filters-icon">-->
+ <!--<InlineSVG key={key} src={imageSrc} />-->
+ <!--</div>-->
+ </h3>
+ {{ field }}
- </li>
- </ul>
- </div>
+ </div>
+ {% endfor %}
+ <button type="submit">Search</button>
+ </form>
</div>
- <PriceFilter
- onFilterChanged={this.updatePriceFilter}
- maxPrice={variables.maxPrice}
- minPrice={variables.minPrice}
- />
</div>
</div>
</div>
<div class="col-md-8 col-lg-9 category-list">
<div>
<!--ProductList-->
- {% for product in products %}
+ {% for product in filter.qs %}
<div class="row">
<!--ProductItem-->