{extends "../menu.tpl"}

{block name="content"}
   
<ul class="nav nav-pills nav-stacked">
   <li class="nav-header" style="white-space: nowrap;"><i class="glyphicon glyphicon-shopping-cart"></i><span>{'module'|translate}</span></li>

   <li><a href="launch.php?s=list.php&amp;type=reviews" target="mainFrame"><i class="glyphicon glyphicon-list"></i> <span>{'toolbar_list'|translate}</span></a></li>
   <li><a href="launch.php?s=list.php&amp;type=reviews&amp;type_list=ShowNotConfirmed" target="mainFrame"><span>{'list_not_confirmed'|translate}</span></a></li>
   <li><a href="launch.php?s=list.php&amp;type=reviews&amp;type_list=ShowConfirmed" target="mainFrame"><span>{'list_confirmed'|translate}</span></a></li>
   <li><a href="launch.php?s=list.php&amp;type=reviews&amp;type_list=showTop" target="mainFrame"><span>{'list_top'|translate}</span></a></li>
   <li><a href="launch.php?s=list.php&amp;type=reviews&amp;type_list=showMostRated" target="mainFrame"><span>{'list_most_rated'|translate}</span></a></li>
</ul>

<ul class="nav nav-pills nav-stacked small-hidden">
<li class="nav-header smaller"><i class="glyphicon glyphicon-search"></i><span>{'search'|translate}</span></li>
<form id='search' target="mainFrame" method="get" action="launch.php" class="form-inline">
   <input type="hidden" name="s" value="list.php" />
   <input type="hidden" name="type" value="reviews" />
   <li>
      <ul class="nav-sub nav-pills">
         <div class="form-group">
            <div class="input-group">
               <input type="text" class="form-control input-sm" name="review" maxlength="100" value="" placeholder="{'searchReview'|translate}"/>
               <span class="input-group-btn">
                  <button type="submit" border="0" class="btn btn-primary btn-sm" title="Vyhledat"><i class="glyphicon glyphicon-search"></i></button>
               </span>
            </div>
         </div>
         <div class="form-group">
            <div class="input-group">
               <input type="text" class="form-control input-sm" name="email" maxlength="100" value="" placeholder="{'searchEmail'|translate}"/>
               <span class="input-group-btn">
                  <button type="submit" border="0" class="btn btn-primary btn-sm" title="Vyhledat"><i class="glyphicon glyphicon-search"></i></button>
               </span>
            </div>
         </div>
         <div class="form-group">
            <input type="text" class="form-control input-sm" name="dateFrom" id="dateFrom" maxlength="10" value="" placeholder="Datum od" autocomplete="off"/>
            {insert_calendar selector='#dateFrom' format='date'}
         </div>
         <div class="form-group">
            <input type="text" class="form-control input-sm" name="dateTo" id="dateTo" maxlength="10" value="" placeholder="Datum do" autocomplete="off"/>
            {insert_calendar selector='#dateTo' format='date'}
         </div>
         <div class="form-group">
            <div class="input-group invert">
               <select name="figure[]" multiple="multiple" class="selecter" data-placeholder="{'selectStatus'|translate}">
                  {foreach KupShop\CatalogBundle\Util\ReviewsUtil::$rank as $key => $figure}
                     <option value="{$key}">{$figure|translate} </option>
                  {/foreach}
               </select>
               {inversion field="figure"}
            </div>
         </div>
         <a href="#"><span>{'searchRating'|translate}</span></a>
         <div class="form-group">
            <div class="input-group">
               <input type="text" class="form-control input-sm" name="ratingFrom" maxlength="1" value="" placeholder="{'from'|translate}" onKeyPress="checkInputData('int')"/>
               <span class="input-group-btn"></span>
               <input type="text" class="form-control input-sm" name="ratingTo" maxlength="1" value="" placeholder="{'to'|translate}" onKeyPress="checkInputData('int')"/>
               <span class="input-group-addon"><i class="glyphicon glyphicon-star rating-empty"></i></span>
            </div>
         </div>
         <a href="#"><span>{'searchProduct'|translate}</span></a>
         <div class="form-group">
            <input type="text" class="form-control input-sm" name="productId" maxlength="100" value="" onKeyPress="checkInputData('int')" placeholder="{'searchNameCode'|translate}"/>
         </div>
         <div class="form-group">
            <select name="variationId" class="input-sm form-control" title="{'searchVariation'|translate}"></select>
            <script type="text/javascript">
               {literal}
               $(function(){
                  initAutocompleteVariation('[name=productId]', '[name=variationId]', '', {'selectProduct': selectProduct});
               });

               function selectProduct() {
                  var $variation = $("select[name=variationId]")[0];
                  if ($variation.options[0].value == -1) {
                     $variation.options[0].value = '';
                     $variation.options[0].text = '---';
                  }
               }
               {/literal}
            </script>
         </div>
         <div class="form-group">
            <div class="input-group invert">
               <select name="response[]" multiple="multiple" class="selecter"
                       data-placeholder="{'response'|translate:"reviews"}">
                      <option value="Y">{'withResponse'|translate:"reviews"}</option>
                      <option value="N">{'withoutResponse'|translate:"reviews"}</option>
               </select>
                {inversion field="response"}
            </div>
         </div>
         <div class="form-group">
            <input type="reset" value="{'delete'|translate}" class="btn btn-danger btn-sm"/>
            <button type="submit" border="0" class="btn btn-primary btn-sm" title="Vyhledat">{'searchBtn'|translate}</i></button>
         </div>
      </form>
   </ul>
</li>

{/block}
