{extends "[shared]/window.tpl"}

{block tabs}
   {windowTab id='flapShopStoreModule' label="Detail modulu"}
{/block}

{block tabsContent}
   {include "board/shopStore.utils.tpl"}

   <div id="flapShopStoreModule" class="tab-pane fade active in boxStatic box">
     <div class="row">
        <div class="col-sm-10 col-sm-offset-1">
           <h2>{$body.data.title}</h2>

           <div class="wpj-module-tile wpj-module-tile-large">
              <figure>
                 {if $body.data.icon}
                    <img src="https://klient.wpj.cz/media/{$body.data.icon}" alt="Logo" class="img-responsive">
                 {else}
                    <img src="/admin/static/images/shopstore-module-default.png" alt="Logo" class="img-responsive">
                 {/if}
              </figure>
              <div class="wpj-module-tile-content">
                 <div class="wpj-module-tile-badges">
                    {badges module=$body.data}
                 </div>
                 <p>
                    {$body.data.annotation}
                 </p>
              </div>
           </div>
        </div>
     </div>

      {if $body.data.photos|count}
         <div class="row">
            <div class="col-md-12">
               <div class="wpj-module-gallery">
                   {foreach $body.data.photos as $photo}
                      <div class="wpj-module-gallery-item">
                         <a href="https://klient.wpj.cz/media/{$photo.photo}" data-rel="bigphoto">
                            <img src="https://klient.wpj.cz/media/{$photo.photo}" class="img-fluid" {* class="img-rounded img-limited"*}>
                         </a>
                      </div>
                   {/foreach}
               </div>
              {* <div id="shopStoreModulePhotoCarousel" class="carousel slide" data-ride="carousel" data-items="2">
                  <ol class="carousel-indicators">
                  {foreach $body.data.photos as $photo}
                        <li data-target="#shopStoreModulePhotoCarousel" data-slide-to="{$photo@index}"{if $photo@index == 0} class="active"{/if}></li>
                  {/foreach}
                  </ol>
                  <div class="carousel-inner">
                     {foreach $body.data.photos as $photo}
                        <div class="carousel-item{if $photo@index == 0} active{/if}">
                          *}{* <a href="{get_photo photo=$photo.photo size='slider'}" class="thumbnail" data-rel="bigphoto">*}{*
                           <a href="https://klient.wpj.cz/media/{$photo.photo}" class="thumbnail" data-rel="bigphoto">
                              <img src="https://klient.wpj.cz/media/{$photo.photo}" class="img-rounded img-limited">
                             *}{* <img src="{get_photo photo=$photo.photo size='slider'}" class="img-rounded img-limited">*}{*
                           </a>
                           *}{*<img src="https://klient.wpj.cz/media/{$photo.photo}" class="img-fluid" alt="Logo">*}{*
                        </div>
                     {/foreach}
                  </div>

                  <a class="carousel-control-prev btn btn-default" href="#shopStoreModulePhotoCarousel" role="button" data-slide="prev">
                     <span class="fc icons_caret-left" aria-hidden="true"></span>
                  </a>
                  <a class="carousel-control-next btn btn-default" href="#shopStoreModulePhotoCarousel" role="button" data-slide="next">
                     <span class="fc icons_caret-right" aria-hidden="true"></span>
                  </a>
               </div>*}
            </div>
         </div>
      {/if}

      <div class="row">
         {if $body.data.description}
            <div class="col-sm-6 col-sm-offset-1">
               {$body.data.description nofilter}
            </div>
         {/if}
         <div class="col-sm-4 col-sm-offset-1">
            <h4 class="m-t-0">Důležité informace</h4>
            <p>
               <strong>Nasazení</strong><br>
               <small>{$body.data.deploy_time|nl2br nofilter}</small>
            </p>
            <p>
               <strong>Cena implementace</strong><br>
               <small>{$body.data.deploy_price|nl2br nofilter}</small>
            </p>
            <p>
               <strong>Cena za provoz</strong><br>
               <small>{$body.data.price|nl2br nofilter}</small>
            </p>
{*            <p>*}
{*               <strong>Oblíbenost</strong><br>*}
{*               <small>Modul používá 80 % e-shopů</small>*}
{*            </p>*}

            {if $body.data.help || $body.data.web}
               <hr>
               {if $body.data.web}
                  <a href="{$body.data.web}" target="_blank">Webová stránka služby</a>{if $body.data.help}<br>{/if}
               {/if}
               <a href="{$body.data.help}" target="_blank">Další informace v nápovědě</a>
            {/if}
            <hr>
            <h4>Kategorie</h4>
            {foreach $body.data.categories as $category}
               <a href="launch.php?s=main.php&l=s:menu.php|type:shopStore&r=s:board.php|type:shopStore|category={$category.id}" target="_blank">{$category.title}</a>{if !$category@last}, {/if}
            {/foreach}
         </div>
      </div>
   </div>

   <script type="text/javascript">
      /*$('#carouselExampleIndicators').carousel();*/
   </script>
{/block}

{block buttonsLeft}<div class="col-md-10"></div>{/block}
{block buttonsFreeSpace}{/block}
{block actionButtons}{/block}
