<table class="window">
  <tr>
    <td class="content2">
      <div class="frame_center products" href="{{@URI}}">
        <div class="reload">
          <h1>{{@page_data.title}}</h1>
          <form name="products_directory_searcch" action="/products/directory" method="GET" class="no_ajax">
            <table width="100%">
              <tr>
                <td>
                  <input type="text" name="title" class="mixed_pay mixed_pay_title" pid="title" value="{{@GET.title}}" placeholder="Наименование или штрих-код" autocomplete="off">
                </td>
                <td width="100">
                  <button type="submit">
                    <i class="fas fa-search"></i>
                    <br>
                    <div class="small">Искать</div>
                  </button>
                </td>
              </tr>
            </table>
          <check if="{{@base_settings.virtual_keyboard==1}}">
            <div class="virtual_keyboard virtual_keyboard_hide virtual_keyboard_product_directory full_keyboard">
            {~@keys='1234567890-+|QWERTYUIOP_|ASDFGHJKL@|ZXCVBNM'~}
              <div class="eng">
              <loop from="{{@i=0}}" to="{{@i<mb_strlen(@keys)}}" step="{{@i++}}">
                <check if="{{@keys[@i]=='|'}}">
                  <true>
                <br>
                  </true>
                  <false>
                <input type="button" class="virtual_key" value="{{@keys[@i]}}" for="mixed_pay_title">
                  </false>
                </check>
              </loop>
                <button type="button" class="virtual_key_bks" for=" mixed_pay_title">
                  <i class="fas fa-long-arrow-alt-left"></i>
                </button>
                <input type="button" class="virtual_key_delete" for="mixed_pay_title" value="CE">
                <br>
                <input type="button" class="virtual_key_ru" value="RU">
                <input type="button" class="virtual_key virtual_key_space" for="mixed_pay_title" value=" ">
                <input type="button" class="virtual_key" for="mixed_pay_title" value=",">
                <input type="button" class="virtual_key" for="mixed_pay_title" value=".">
                <button type="button" class="virtual_key_ok">OK</button>
              </div>
              {~@keys='1234567890-+|ЙЦУКЕНГШЩЗХЪ|ФЫВАПРОЛДЖЭ_|ЯЧСМИТЬБЮ@'~}
              <div class="ru">
                <loop from="{{@i=0}}" to="{{@i<mb_strlen(@keys)}}" step="{{@i++}}">
                  {~@a=mb_substr(@keys, @i, 1)~}
                  <check if="{{@a=='|'}}">
                    <true>
                <br>
                    </true>
                    <false>
                <input type="button" class="virtual_key" value="{{@a}}" for="mixed_pay_title">
                    </false>
                  </check>
                </loop>
                <button type="button" class="virtual_key_bks" for="mixed_pay_title">
                  <i class="fas fa-long-arrow-alt-left"></i>
                </button>
                <input type="button" class="virtual_key_delete" for="mixed_pay_title" value="CE">
                <br>
                <input type="button" class="virtual_key_eng" value="ENG">
                <input type="button" class="virtual_key virtual_key_space" for="mixed_pay_title" value=" ">
                <input type="button" class="virtual_key" for="mixed_pay_title" value=",">
                <input type="button" class="virtual_key" for="mixed_pay_title" value=".">
                <button type="button" class="virtual_key_ok">OK</button>
              </div>
            </div>
            </check>
          </form>
          <include href="pagination.htm" />
          <table width="100%">
            <tr>
              <th>Название</th>
              <th>Категория</th>
              <th>Цена</th>
              <td align="right">
                <button type="button" class="show_window" href="/products/form">
                  <i class="fa fa-plus"></i>
                  <br>
                  <div class="small">Добавить</div>
                </button>
              </td>
            </tr>
            <repeat group="{{@data}}" value="{{@d}}">
            <tr>
              <td>
                {{@d.title}}
              </td>
              <td>
                {{@d.category_title}}
              </td>
              <td align="center">
                {~@price=@d.price+(@d.price*(@d.vat/100))*max(0, @d.vat_type)~}
                {~@price=round(@price, 2)~}
                {{number_format(@price, 2)}}
              </td>
              <td class="receipts_search_buttons" align="right">
                <button type="button" class="return_receipts_button show_window" href="/messages/continue?uri={{urlencode("/products/delete?id=".@d.id)}}">
                  <i class="fa fa-times"></i>
                  <br>
                  <div class="small">Удалить</div>
                </button>
                <button type="button" class="show_window" href="/products/form?id={{@d.id}}">
                  <i class="fa fa-pen"></i>
                  <br>
                  <div class="small">Изменить</div>
                </button>
              </td>
            </tr>
            </repeat>
          </table>
          <include href="pagination.htm" />
        </div>
      </div>
    </td>
  </tr>
</table>
