{*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <contact@prestashop.com>
*  @copyright  2007-2017 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
{include file="$tpl_dir./errors.tpl"}
{if isset($category)}
	{if $category->id AND $category->active}
		{if $products}
			<div class="content_sortPagiBar clearfix" style="background:#0c87cd">
				<div class="row">
					<div class="col-sm-6">
						<div class="sortPagiBar clearfix">
							{include file="./product-sort.tpl"}
							{include file="./nbr-product-page.tpl"}
							<div style="display:none">{include file="$tpl_dir./category-count.tpl"}</div>
						</div>
					</div>
					<div class="col-sm-6">
						<div class="top-pagination-content clearfix" style="color:#fff">
							{include file="./product-compare.tpl"}
							{include file="$tpl_dir./paginationc.tpl"}
						</div>
					</div>
					
					
				</div>
			</div>
			<div class="product-count text-right">
				{if ($n*$p) < $nb_products }
					{assign var='productShowing' value=$n*$p}
				{else}
					{assign var='productShowing' value=($n*$p-$nb_products-$n*$p)*-1}
				{/if}
				{if $p==1}
					{assign var='productShowingStart' value=1}
				{else}
					{assign var='productShowingStart' value=$n*$p-$n+1}
				{/if}
				{if $nb_products > 1}
					{l s='Showing %1$d - %2$d of %3$d items' sprintf=[$productShowingStart, $productShowing, $nb_products]}
				{else}
					{l s='Showing %1$d - %2$d of 1 item' sprintf=[$productShowingStart, $productShowing]}
				{/if}
			</div>
			<form action="{$category_url}" method="get" id="layered_form" >
				<div class="row search-form">
					<div class="col-xs-3 col-sm-4">
						<div class="form-group">
							<label>{l s='Name'}</label>
							<input type="text" name="name" id="name" class="form-control" value="{if isset($smarty.get.name)}{$smarty.get.name}{/if}" />
						</div>
					</div>
					<div class="col-xs-3 col-sm-2">
						<div class="form-group">
							<label>{l s='Abmessung'}</label>
							<input type="text" name="abmessung" id="abmessung" class="form-control" value="{if isset($smarty.get.abmessung)}{$smarty.get.abmessung}{/if}" />
						</div>
					</div>
					<div class="no-movil col-sm-2">
						<div class="form-group">
							<label>{l s='Reinheit'}</label>
							<input type="text" name="reinheit" id="reinheit" class="form-control" value="{if isset($smarty.get.reinheit)}{$smarty.get.reinheit}{/if}" />
						</div>
					</div>
					<div class="no-movil col-sm-1">
						<div class="form-group">
							<label>{l s='Menge'}</label>
							<input type="text" name="menge" id="menge" class="form-control" value="{if isset($smarty.get.menge)}{$smarty.get.menge}{/if}" />
						</div>
					</div>
					<div class="no-movil col-sm-1">
						<div class="form-group">
							<label>{l s='Art. Nr.'}</label>
							<input type="text" name="artnr" id="artnr" class="form-control" value="{if isset($smarty.get.artnr)}{$smarty.get.artnr}{/if}" />
						</div>
					</div>
					<div class="col-xs-3 col-sm-1">
						<div class="form-group">
							<label>{l s='Preis'}</label>
							<input type="text" name="preis" id="preis" class="form-control" value="{if isset($smarty.get.preis)}{$smarty.get.preis}{/if}" />
						</div>
					</div>
					<div class="col-xs-3 col-sm-1">
						<div class="form-group text-center">
							<a href="{$category_url}" class="text-center">Reset</a>
							<input type="submit" name="filtro" id="filtro" value="Search" class="btn" />
						</div>
					</div>
				</div>
			</form>
			{if $category->id==819}
				{include file="./product-list.tpl" products=$products}
			{else}
				{include file="./productos-lista.tpl" products=$products}
			{/if}
			<div class="content_sortPagiBar">
				<div class="bottom-pagination-content clearfix">
					{include file="./product-compare.tpl" paginationId='bottom'}
                    {include file="./pagination.tpl" paginationId='bottom'}
				</div>
			</div>
		{else}
			<form action="{$category_url}" method="get" id="layered_form" >
				<div class="row search-form">
					<div class="col-sm-4">
						<div class="form-group">
							<label>{l s='Name'}</label>
							<input type="text" name="name" id="name" class="form-control" value="{if isset($smarty.get.name)}{$smarty.get.name}{/if}" />
						</div>
					</div>
					<div class="col-sm-2">
						<div class="form-group">
							<label>{l s='Abmessung'}</label>
							<input type="text" name="abmessung" id="abmessung" class="form-control" value="{if isset($smarty.get.abmessung)}{$smarty.get.abmessung}{/if}" />
						</div>
					</div>
					<div class="col-sm-2">
						<div class="form-group">
							<label>{l s='Reinheit'}</label>
							<input type="text" name="reinheit" id="reinheit" class="form-control" value="{if isset($smarty.get.reinheit)}{$smarty.get.reinheit}{/if}" />
						</div>
					</div>
					<div class="col-sm-1">
						<div class="form-group">
							<label>{l s='Menge'}</label>
							<input type="text" name="menge" id="menge" class="form-control" value="{if isset($smarty.get.menge)}{$smarty.get.menge}{/if}" />
						</div>
					</div>
					<div class="col-sm-1">
						<div class="form-group">
							<label>{l s='Art. Nr.'}</label>
							<input type="text" name="artnr" id="artnr" class="form-control" value="{if isset($smarty.get.artnr)}{$smarty.get.artnr}{/if}" />
						</div>
					</div>
					<div class="col-sm-1">
						<div class="form-group">
							<label>{l s='Preis'}</label>
							<input type="text" name="preis" id="preis" class="form-control" value="{if isset($smarty.get.preis)}{$smarty.get.preis}{/if}" />
						</div>
					</div>
					<div class="col-sm-1">
						<div class="form-group text-center">
							<a href="{$category_url}" class="text-center">Reset</a>
							<input type="submit" name="filtro" id="filtro" value="Search" class="btn" />
						</div>
					</div>
				</div>
			</form>
			<p class="alert alert-warning">{l s='There are no products with the filter inserted.'}</p>
		{/if}
	{elseif $category->id}
		<p class="alert alert-warning">{l s='This category is currently unavailable.'}</p>
	{/if}
{/if}
