fix pagination for products on category view
This commit is contained in:
parent
f82b651a30
commit
d71a45d198
|
|
@ -1,53 +1,55 @@
|
||||||
<%= render '/product/partials/product_modal' %>
|
<%= render '/product/partials/product_modal' %>
|
||||||
<% if @category.active_childrens.size > 0 %>
|
<% if @category.active_childrens.size > 0 %>
|
||||||
<div class="title-wrap">
|
<div class="title-wrap">
|
||||||
<h2 class="title lines">Kategorie</h2>
|
<h2 class="title lines">Kategorie</h2>
|
||||||
</div>
|
</div>
|
||||||
<% row = 0 %>
|
<% row = 0 %>
|
||||||
<% for cat in @category.active_childrens %>
|
<% for cat in @category.active_childrens %>
|
||||||
<% if row == 0 %>
|
<% if row == 0 %>
|
||||||
<div class="row column-4">
|
<div class="row column-4">
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="col-sm-6 col-md-3">
|
<div class="col-sm-6 col-md-3">
|
||||||
<div class="thumbnail store style2">
|
<div class="thumbnail store style2">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<figure style="height:338px; background-color: white;">
|
<figure style="height:338px; background-color: white;">
|
||||||
<% if !cat.cover_image.blank? %>
|
<% if !cat.cover_image.blank? %>
|
||||||
<%= link_to(image_tag(cat.cover_image.image.url(:large), style: 'margin: auto;vertical-align: middle;display: inline-block;'), category_path(cat), style: 'line-height: 338px;') %>
|
<%= link_to(image_tag(cat.cover_image.image.url(:large), style: 'margin: auto;vertical-align: middle;display: inline-block;'), category_path(cat), style: 'line-height: 338px;') %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to(image_tag('kaktus.png'), category_path(cat)) %>
|
<%= link_to(image_tag('kaktus.png'), category_path(cat)) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
<div class="caption">
|
<div class="caption">
|
||||||
<h6 class="regular"><%= link_to(cat.name, category_path(cat)) %></h6>
|
<h6 class="regular"><%= link_to(cat.name, category_path(cat)) %></h6>
|
||||||
</div><!-- end caption -->
|
</div>
|
||||||
</div><!-- end thumbnail -->
|
<!-- end caption -->
|
||||||
|
</div>
|
||||||
|
<!-- end thumbnail -->
|
||||||
</div>
|
</div>
|
||||||
<% row += 1
|
<% row += 1
|
||||||
if row == 4
|
if row == 4
|
||||||
row = 0
|
row = 0
|
||||||
%>
|
%>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if row > 0 && row < 4 %>
|
<% if row > 0 && row < 4 %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @products.size > 0 %>
|
<% if @products.size > 0 %>
|
||||||
<div class="title-wrap">
|
<div class="title-wrap">
|
||||||
<h2 class="title lines">Produkty</h2>
|
<h2 class="title lines">Produkty</h2>
|
||||||
</div>
|
</div>
|
||||||
<div id="products_list">
|
<div id="products_list">
|
||||||
<%= render '/product/partials/products_thumbnails' %>
|
<%= render '/product/partials/products_thumbnails' %>
|
||||||
<div>
|
<div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function () {
|
||||||
$(".productQuickView").on('hidden.bs.modal', function () {
|
$(".productQuickView").on('hidden.bs.modal', function () {
|
||||||
$(this).data('bs.modal', null);
|
$(this).data('bs.modal', null);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
$("#products_list").html("<%= escape_javascript(render('/product/partials/products_thumbnails')) %>");
|
||||||
Loading…
Reference in New Issue