{extends "../list.tpl"}

{block "list-filter" append}
    {* todo *}
   {if !isset($filtersStorage)}
      <div class="panel-heading">
         <div class="row">

            {if !empty($filtersValue)}
            {foreach $filtersValue as $filter}
               <div class="col-md-2 no-margin">
                  <div class="list_filter">
                     <select name="IDpr" class="selecter input-sm">
                        {$filter@key}
                        {foreach $filter as $option}
                           <option value="{$option@key}" {if $option.choiced == true}selected{/if}>{$option.name}</option>
                        {/foreach}
                     </select>
                  </div>
               </div>
            {/foreach}
               <script type="text/javascript">
                  $(".list_filter select").on('change',function (e) {
                     $this = $(this);
                     window.location.href = window.location.href + "&" + $this.serialize();
                  });
               </script>
            {/if}
         </div>
      </div>
   {/if}
{/block}

<script type="text/javascript">
   {block onready append}
   sortableList("products");
   {/block}
</script>
