{extends "../menu.tpl"}

{block name="content"}
   <ul class="nav nav-pills nav-stacked">
      <li class="nav-header"><i class="glyphicon glyphicon-transfer"></i><span>Chybějící prod.</span></li>
   </ul>
   <ul class="nav nav-pills nav-stacked small-hidden">
      <li class="with_caret "><a href="#" class="opener"><span>Chybějící produkty</span></a></li>
      <li class="pill-content hidden">
         <div class="nav-sub nav-pills">
            <form name="search" target="mainFrame" method="get" action="launch.php" class="form-inline">
               <div class="form-group">
                  <div class="checkbox">
                     <input type="checkbox" class="input" id="notHandled" name="notHandled" value="1"><label for="notHandled">v nezpracovaných obj.</label>
                     <input type="checkbox" class="input" id="active"  name="active" value="1" checked><label for="active">zobrazují se</label>
                     <input type="checkbox" class="input" id="buyable" name="buyable" value="1"><label for="buyable">jsou skladem u dod.</label>
                     <input type="checkbox" class="input" id="notOrdered" name="notOrdered" value="1" checked><label for="notOrdered">nejsou v obj./na cestě</label>
                  </div>
                  <div class="checkbox">
                     <input type="checkbox" class="input" id="ignoreMin" name="ignoreMin" value="1"><label for="ignoreMin">zobrazit všechny</label>
                     <a class="help-tip" data-toggle="tooltip" title="" data-original-title="Zobrazí i produkty, které jsou skladem v dostatečném množství."
                        style="padding: 0; left: 100%;"><i class="bi bi-question-circle"></i></a>
                  </div>
               </div>

               <div class="form-group">
                  <div class="checkbox">
                     <input type="checkbox" class="input" id="missing"  name="search" value="missing"><label for="missing">Zapnout predikci</label>
                  </div>
               </div>

               <script>
                  $('#missing').on('change', function() {
                     $('[data-prediction-wrapper]').slideToggle($(this).is(':checked'));
                  });
               </script>

               <div data-prediction-wrapper style="display: none;">
                  <div class="form-group">
                     <label>Najít produkty, které dojdou do</label>
                     <div class="input-group">
                        <input type="text" class="form-control input-sm" name="interval" maxlength="10" value="14"
                               onKeyPress="checkInputData('int')"/>
                        <span class="input-group-addon">dní</span>
                     </div>

                     <div class="checkbox">
                        <input type="checkbox" class="input" id="wasSold" name="wasSold" value="1" checked/><label for="wasSold">a byly
                           objednány</label>
                     </div>
                  </div>
                  <div class="form-group">
                     <label>Prodejnost za</label>
                     <div class="input-group">
                        <input type="text" class="form-control input-sm" name="sellInterval" maxlength="10" value="30"
                               onKeyPress="checkInputData('int')"/>
                        <span class="input-group-addon">dní</span>
                     </div>
                  </div>
               </div>
               <div class="with_caret "><a href="#" class="opener" style="padding-left: 0;">Filtr produktů</a></div>
               <div class="pill-content hidden">
                  <div class="nav-sub productfilter-nav">
                     {include 'block.productsFilter.tpl' filter=$data.filter filterName="missingProducts" filterEnabled=true}
                  </div>
               </div>
               <div class="form-group">
                  <input type="hidden" name="s" value="list.php">
                  <input type="hidden" name="type" value="stockInMissing" />
                  <input type="reset" value="Vymazat" class="btn btn-danger btn-sm"/>
                  <input type="submit" value="Hledat" class="btn btn-primary btn-sm"/>
               </div>
            </form>
         </div>
      </li>
   </ul>
   <ul class="nav nav-pills nav-stacked small-hidden">
      <li class="with_caret "><a href="#" class="opener"><span>Ležáci ve skladu</span></a></li>
      <li class="pill-content hidden">
         <div class="nav-sub nav-pills">
            <form name="search" target="mainFrame" method="get" action="launch.php" class="form-inline">
               <div class="form-group">
                  <label>Najít produkty, které dojdou za více než</label>
                  <div class="input-group">
                     <input type="text" class="form-control input-sm" name="interval" maxlength="10" value="180" onKeyPress="checkInputData('int')"/>
                     <span class="input-group-addon">dní</span>
                  </div>
                  <div class="checkbox">
                     <input class="input" type="checkbox" value="1" name="wasSold" id="wasSold2" checked>
                     <label for="wasSold2">
                        a byly objednány
                     </label>
                  </div>
               </div>
               <div class="form-group">
                  <label>prodejnost za</label>
                  <div class="input-group">
                     <input type="text" class="form-control input-sm" name="sellInterval" maxlength="10" value="90" onKeyPress="checkInputData('int')"/>
                     <span class="input-group-addon">dní</span>
                  </div>
               </div>

               <div class="with_caret "><a href="#" class="opener" style="padding-left: 0;">Filtr produktů</a></div>
               <div class="pill-content hidden">
                  <div class="nav-sub productfilter-nav">
                     {include 'block.productsFilter.tpl' filterName="inStock" filterEnabled=true}
                  </div>
               </div>

               <div class="form-group">
                  <input type="hidden" name="s" value="list.php">
                  <input type="hidden" name="type" value="stockInMissing" />
                  <input type="hidden" name="search" value="iddle" />
                  <input type="hidden" name="order" value="7d" />
                  <input type="reset" value="Vymazat" class="btn btn-danger btn-sm"/>
                  <input type="submit" value="Hledat" class="btn btn-primary btn-sm"/>
               </div>
            </form>
         </div>
      </li>
      {ifmodule WATCHDOG}
         <li class="nav-header smaller"><i class="glyphicon glyphicon-search"></i><span>Hlídací pes</span></li>
         <li>
            <ul class="nav-sub nav-pills">
               <form name="watchdog_search" target="mainFrame" method="get" action="launch.php" class="form-inline">
                  <li class="with_caret "><a href="#" class="opener" style="padding-left: 10px;"><span>{'filter'|translate:'productsFilter'}</span></a></li>
                  <li class="pill-content hidden opener-no-remember">
                     <div class="nav-sub productfilter-nav">
                        {include 'block.productsFilter.tpl' filterName="watchDog" filterEnabled=true}
                     </div>
                  </li>
                  <li>
                     <div class="form-group">
                        <input type="hidden" name="s" value="list.php">
                        <input type="hidden" name="type" value="WatchdogMissing"/>
                        <input type="reset" value="Vymazat" class="btn btn-danger btn-sm"/>
                        <input type="submit" value="Hledat" class="btn btn-primary btn-sm"/>
                     </div>
                  </li>
               </form>
            </ul>
         </li>
      {/ifmodule}
   </ul>
{/block}

