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' %>
|
||||
<% if @category.active_childrens.size > 0 %>
|
||||
<div class="title-wrap">
|
||||
<h2 class="title lines">Kategorie</h2>
|
||||
</div>
|
||||
<% row = 0 %>
|
||||
<div class="title-wrap">
|
||||
<h2 class="title lines">Kategorie</h2>
|
||||
</div>
|
||||
<% row = 0 %>
|
||||
<% for cat in @category.active_childrens %>
|
||||
<% if row == 0 %>
|
||||
<div class="row column-4">
|
||||
<% if row == 0 %>
|
||||
<div class="row column-4">
|
||||
<% end %>
|
||||
<div class="col-sm-6 col-md-3">
|
||||
<div class="thumbnail store style2">
|
||||
<div class="header">
|
||||
<figure style="height:338px; background-color: white;">
|
||||
<% 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;') %>
|
||||
<% else %>
|
||||
<%= link_to(image_tag('kaktus.png'), category_path(cat)) %>
|
||||
<% end %>
|
||||
</figure>
|
||||
</div>
|
||||
<div class="caption">
|
||||
<h6 class="regular"><%= link_to(cat.name, category_path(cat)) %></h6>
|
||||
</div><!-- end caption -->
|
||||
</div><!-- end thumbnail -->
|
||||
<div class="thumbnail store style2">
|
||||
<div class="header">
|
||||
<figure style="height:338px; background-color: white;">
|
||||
<% 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;') %>
|
||||
<% else %>
|
||||
<%= link_to(image_tag('kaktus.png'), category_path(cat)) %>
|
||||
<% end %>
|
||||
</figure>
|
||||
</div>
|
||||
<div class="caption">
|
||||
<h6 class="regular"><%= link_to(cat.name, category_path(cat)) %></h6>
|
||||
</div>
|
||||
<!-- end caption -->
|
||||
</div>
|
||||
<!-- end thumbnail -->
|
||||
</div>
|
||||
<% row += 1
|
||||
<% row += 1
|
||||
if row == 4
|
||||
row = 0
|
||||
%>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if row > 0 && row < 4 %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if @products.size > 0 %>
|
||||
<div class="title-wrap">
|
||||
<h2 class="title lines">Produkty</h2>
|
||||
</div>
|
||||
<div id="products_list">
|
||||
<%= render '/product/partials/products_thumbnails' %>
|
||||
<div class="title-wrap">
|
||||
<h2 class="title lines">Produkty</h2>
|
||||
</div>
|
||||
<div id="products_list">
|
||||
<%= render '/product/partials/products_thumbnails' %>
|
||||
<div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$(".productQuickView").on('hidden.bs.modal', function () {
|
||||
$(this).data('bs.modal', null);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$(".productQuickView").on('hidden.bs.modal', function () {
|
||||
$(this).data('bs.modal', null);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
$("#products_list").html("<%= escape_javascript(render('/product/partials/products_thumbnails')) %>");
|
||||
Loading…
Reference in New Issue