{extends "index.tpl"}

{block "body-content"}
   {include "block.breadcrumbs.tpl"}
   <h1 class="category-title">{$view -> getTitle()}</h1>
   <div id="catDescription">
      {foreach $body.category.blocks as $block}
         {$block|inline_edit nofilter}
      {/foreach}
      {$body.producer.descr nofilter}
   </div>
   {if $body.producer.image.id or $body.producer.web}
      <div class="content-block producer-link p-a-1">
         {if $body.producer.image.id}
            <img src="{get_photo photo=$body.producer.image size=7}" alt="{$body.producer.title}" class="img-responsive pull-left m-r-1">
         {/if}
         {if $body.producer.web}
            <a href="{$body.producer.web}" class="btn-link" style="">Web výrobce</a>
         {/if}
      </div>
   {/if}

   {insert_subsections category=$body.category up=false}

   {if $body.productsList}
      <div data-filter="wrapper">

         {if $body.pager.count > 1 || isAjax()}
            <div class="pager-top" data-reload="pager-top">
               {include "block.pager.tpl" pager=$body.pager}
            </div>
         {/if}

         {include "filter.tpl"}

         <div data-filter="products">

            <div data-reload="products">
               {include "block.products.tpl" products=$body.productsList}

               {if $body.pager.count > 1}
                  {include "block.pager.tpl" pager=$body.pager}
               {/if}
            </div>
         </div>
      </div>
   {else}
      <div data-reload="products">
         <div class="alert alert-info" role="alert">
            Žádný produkt
         </div>
      </div>
   {/if}
{/block}

{block "js-entry" append}
   {encore_entry_script_tags entry='category'}
{/block}
