{{ header }}
<div id="product-search" class="container">
  <ul class="breadcrumb">
    {% for breadcrumb in breadcrumbs %}
    <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
    {% endfor %}
  </ul>
  <div class="row">{{ column_left }}
    {% if column_left and column_right %}
    {% set class = 'col-sm-6' %}
    {% elseif column_left or column_right %}
    {% set class = 'col-sm-9' %}
    {% else %}
    {% set class = 'col-sm-12' %}
    {% endif %}
    <div id="content" class="{{ class }}">{{ content_top }}
      <h2>{{ heading_title }}</h2>
      {% if products %}
		<div class="tool-bar">
		  <div class="row">
			<div class="col-md-2 col-sm-6 col-xs-6">
			  <div class="btn-group btn-group-sm">
				<button type="button" id="grid-view" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="{{ button_grid }}"><i class="icon ion-grid"></i></button>
				<button type="button" id="list-view" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="{{ button_list }}"><i class="icon ion-android-menu"></i></button>
			  </div>
			</div>
			<div class="col-md-3 col-sm-6 col-xs-6">
			  <div class="form-group"><a href="{{ compare }}" id="compare-total" class="btn btn-link">{{ text_compare }}</a></div>
			</div>
			<div class="col-md-4 col-xs-6">
			  <div class="form-group input-group input-group-sm">
				<label class="input-group-addon" for="input-sort">{{ text_sort }}</label>
				<select id="input-sort" class="form-control" onchange="location = this.value;">
				  
				  {% for sorts in sorts %}
				  {% if sorts.value == '%s-%s'|format(sort, order) %}
				  
				  <option value="{{ sorts.href }}" selected="selected">{{ sorts.text }}</option>
				  
				  {% else %}
				  
				  <option value="{{ sorts.href }}">{{ sorts.text }}</option>
				  
				  {% endif %}
				  {% endfor %}
				
				</select>
			  </div>
			</div>
			<div class="col-md-3 col-xs-6">
			  <div class="form-group input-group input-group-sm">
				<label class="input-group-addon" for="input-limit">{{ text_limit }}</label>
				<select id="input-limit" class="form-control" onchange="location = this.value;">
				  
				  {% for limits in limits %}
				  {% if limits.value == limit %}
				  
				  <option value="{{ limits.href }}" selected="selected">{{ limits.text }}</option>
				  
				  {% else %}
				  
				  <option value="{{ limits.href }}">{{ limits.text }}</option>
				  
				  {% endif %}
				  {% endfor %}
				</select>
			  </div>
			</div>
		  </div>
		</div>
		<div class="row">
			{% for product in products %}
				<div class="product-layout product-list col-xs-12 product-items">
					<div class="product-thumb">
						<div class="product-item">	
							<div class="image rotate-image-container">
								<div class="inner">
									<a href="{{ product.href }}">
										<img src="{{ product.thumb }}" alt="{{ product.name }}" title="{{ product.name }}" class="img-responsive img-default-image" />
										{% if product.rotate_image %}
											<img src="{{ product.rotate_image }}" alt="{{ product.name }}" title="{{ product.name }}" class="img-responsive img-rotate-image" />
										{% endif %}
									</a>
									<div class="button-group">
										<div class="inner">
											<button type="button" class="button-cart"  title="{{ button_cart }}" onclick="cart.add('{{ product.product_id }}', '{{ product.minimum }}');"><span>{{ button_cart }}</span></button>
											<button class="button-quickview" type="button"  title="{{ button_quickview }}" onclick="ptquickview.ajaxView('{{ product.href }}')"><span>{{ button_quickview }}</span></button>
											<button type="button" class="button-wishlist"  title="{{ button_wishlist }}" onclick="wishlist.add('{{ product.product_id }}');"><span>{{ button_wishlist }}</span></button>
											<button type="button" class="button-compare"  title="{{ button_compare }}" onclick="compare.add('{{ product.product_id }}');"><span>{{ button_compare }}</span></button>
										</div>
									</div>
								</div>
							</div>
							<div class="caption">
								<h4><a href="{{ product.href }}">{{ product.name }}</a></h4>
								{% if product.manufacturer %}
									<p class="manufacture-product">
										<a href="{{ product.manufacturer_href }}">{{ product.manufacturer }}</a>
									</p>
								{% endif %}
								<!-- {% if product.rating %} -->
									<!-- <div class="rating"> -->
										<!-- {% for i in 1..5 %} -->
											<!-- {% if product.rating < i %} -->
												<!-- <span class="icon-ratings"><i class="icon-rating icon-rating-o"></i></span> -->
											<!-- {% else %} -->
												<!-- <span class="icon-ratings"><i class="icon-rating icon-rating-x"></i></span> -->
											<!-- {% endif %} -->
										<!-- {% endfor %} -->
									<!-- </div> -->
								<!-- {% endif %} -->
								{% if  product.price %}
									<p class="price"> {% if not product.special %}
											{{ product.price }}
										{% else %} <span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span> {% endif %}
										{% if product.tax %} <span class="price-tax">{{ text_tax }} {{ product.tax }}</span> {% endif %} </p>
								{% endif %}
								<p class="product-description">{{ product.description }}</p>
							</div>
							
						</div>
					</div>
				</div>
			{% endfor %}
		</div>
		<div class="tool-bar-bottom">
		  <div class="row">
			<div class="col-sm-6 text-left">{{ pagination }}</div>
			<div class="col-sm-6 text-right">{{ results }}</div>
		  </div>
		</div>
      {% else %}
      <p>{{ text_empty }}</p>
      <div class="buttons">
        <div class="pull-right"><a href="{{ continue }}" class="btn btn-primary">{{ button_continue }}</a></div>
      </div>
      {% endif %}
      {{ content_bottom }}</div>
    {{ column_right }}</div>
</div>
{{ footer }}