{extends "../menu.tpl"}

{block name="content"}

<ul class="nav nav-pills nav-stacked">
   <li class="nav-header"><i class="glyphicon glyphicon-book"></i><span>{'articles'|translate}</span></li>
   <li><a href="javascript:nf('', 'launch.php?s=list.php&amp;type=articles');"><i class="glyphicon glyphicon-list"></i> <span>{'articleList'|translate}</span></a></li>
   <li><a href="javascript:nw('article', '0');"><i class="glyphicon glyphicon-plus"></i> <span>{'addArticle'|translate}</span></a></li>
</ul>
<ul class="nav nav-pills nav-stacked small-hidden">
   <li class="nav-header smaller"><i class="glyphicon glyphicon-filter"></i><span>{'filter'|translate}</span></li>
   {if {find_module name="articles_sections"}}
   <li class="with_caret"><a href="#" class="opener"><span>{'filterBySections'|translate}</span></a></li>
   <li class="pill-content hidden">
      <div class="tree">
        {include file='../menuTree.tpl'}
        {menuTree data=$article_sec}
      </div>
   </li>
   {/if}
   <li><a href="launch.php?s=list.php&amp;type=articles&amp;figure=N" target="mainFrame"><span>{'filterHidden'|translate}</span></a></li>
   <li><a href="launch.php?s=list.php&amp;type=articles&amp;figure=Y" target="mainFrame"><span>{'filterDisplayed'|translate}</span></a></li>
   {*<li class="with_caret "><a href="#" class="opener"><span>Podle autorů</span></a></li>
   <li class="pill-content hidden ">
      <div class="nav-sub nav-pills">
         <ul>
         {foreach from=$article_aut item=author}
             <li>
                 <a	onmousedown="_XP_selectItem(event);" target="mainFrame" href="launch.php?s=list.php&type=articles&IDauth={$author.id}">
                    {$author.nick}
                 </a>
             </li>
         {/foreach}
         </ul>
      </div>
   </li>*}
   <li class="nav-header smaller"><i class="glyphicon glyphicon-search"></i><span>{'search'|translate}</span></li>
   <li class="with_caret "><a href="#" class="opener"><span>{'searchBasic'|translate}</span></a></li>
   <li class="pill-content hidden">
      <ul class="nav-sub nav-pills">
      <form target="mainFrame" method="get" action="launch.php" class="form-inline">
         <div class="form-group">
            <div class="input-group">
               <input type="text" class="form-control input-sm" name="IDa" maxlength="10" value="" onKeyPress="checkInputData('int')"  placeholder="{'searchIdPlaceholder'|translate}"/>
               <span class="input-group-btn">
                  <button type="submit" border="0" class="btn btn-primary btn-sm" title="{'lookUp'|translate}"><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="title" value="" placeholder="{'searchTitlePlaceholder'|translate}"/>
               <span class="input-group-btn">
                  <button type="submit" border="0" class="btn btn-primary btn-sm" title="{'lookUp'|translate}"><i class="glyphicon glyphicon-search"></i></button>
               </span>
            </div>
         </div>
         <div class="form-group">
            <div class="input-group invert">
               <select name="figure[]" multiple="multiple" class="selecter" data-placeholder="{'searchFigurePlaceholder'|translate}">
                   <option value="Y">Viditelný</option>
                   <option value="N">Skrytý</option>
               </select>
               {inversion field="figure"}
            </div>
         </div>
         <input type="hidden" name="s" value="list.php"><input type="hidden" name="type" value="articles" />

         <input type="reset" value="Vymazat" class="btn btn-danger btn-sm"/>
         <input type="submit" value="Hledat" class="btn btn-primary btn-sm"/>
      </form>
      </ul>
   </li>
   <li class="with_caret "><a href="#" class="opener"><span>{'searchDate'|translate}</span></a></li>
   <li class="pill-content hidden ">
      <ul class="nav-sub nav-pills">
         <form target="mainFrame" method="get" action="launch.php" class="form-inline">
            <div class="form-group">
               <label for="dateFrom">{'searchDateFrom'|translate}</label>
               <input type="text" class="form-control input-sm" name="dateFrom" id="dateFrom" maxlength="10" value="{$dateFrom|format_date:'admin'}" placeholder="{'searchDateFromPlaceholder'|translate}" autocomplete="off"/>
               {insert_calendar selector='#dateFrom' format='date'}
               <label for="dFND"><input type="checkbox" name="dateFromNotDecide" value="ON" id="dFND" checked="checked" />{'notDecide'|translate}</label>
            </div>
            <div class="form-group">
               <label for="dateTo">{'searchDateTo'|translate}</label>
               <input type="text" class="form-control input-sm" name="dateTo" id="dateTo" maxlength="10" value="{$dateFrom|format_date:'admin'}" placeholder="{'searchDateToPlaceholder'|translate}" autocomplete="off"/>
               {insert_calendar selector='#dateTo' format='date'}
               <label for="dTND"><input type="checkbox" name="dateToNotDecide" value="ON" id="dTND" checked="checked" />{'notDecide'|translate}</label>
            </div>
            <input type="hidden" name="s" value="list.php"><input type="hidden" name="type" value="articles" />
            <input type="reset" value="{'delete'|translate}" class="btn btn-danger btn-sm"/>
            <input type="submit" value="{'find'|translate}" class="btn btn-primary btn-sm"/>
         </form>
      </ul>
   </li>
   <li class="with_caret "><a href="#" class="opener"><span>{'searchTag'|translate}</span></a></li>
   <li class="pill-content hidden ">
      <ul class="nav-sub nav-pills">
         <form target="mainFrame" method="get" action="launch.php" class="form-inline">
            <div class="form-group">
               {print_select name="tags[]" param="data-type='articles_tags' id='tags' multiple='multiple'"}
               <script>
                  articles_applyChosen($('#tags'));

                  function articles_applyChosen($selector) {
                     $selector.ajaxChosen({
                        minTermLength: 0,
                        dataType: 'json',
                        type: 'GET',
                        url: 'launch.php?s=autocomplete.php&type=' + $selector.data('type')
                     }, function (data) {
                        return data;
                     }, {
                        width: '100%',
                        allow_single_deselect: true,
                        placeholder_text_single: 'Vyberte možnost',
                        placeholder_text_multiple: 'Vyberte několik možností'
                     });
                  }
               </script>
            </div>
            <input type="hidden" name="s" value="list.php"><input type="hidden" name="type" value="articles" />
            <input type="reset" value="{'delete'|translate}" class="btn btn-danger btn-sm"/>
            <input type="submit" value="{'find'|translate}" class="btn btn-primary btn-sm"/>
         </form>
      </ul>
   </li>
</ul>

{/block}
