<div id="products_list">
	<form name="products_all_search_form" method="GET" action="/products/searchstop" class="close_window">
		<input type="hidden" name="not_add" value="1">
	<table width="100%">
		<tr>
			<td>
				<input type="text" name="product_search" class="form_product_search with_full_keyboard" value="{{@search}}" placeholder="Наименование" autocomplete="off">
			</td>
			<td>
				<select name="order">
					<option value="0">По релевантности</option>
					<option value="title" {{@GET.order=='title'?'selected="selected"':''}}>По алфавиту от А до Я</option>
					<option value="title DESC" {{@GET.order=='title DESC'?'selected="selected"':''}}>По алфавиту от Я до А</option>
				</select>
			</td>
			<td>
				<input type="checkbox" class="custom-checkbox" id="exact_match" name="exact_match" value="1" {{@exact_match?'checked="checked"':''}}>
				<label for="exact_match">Точное соответствие</label>
			</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_search 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="form_product_search">
					</false>
				</check>
			</loop>
			<button type="button" class="virtual_key_bks" for="form_product_search">
				<i class="fas fa-long-arrow-alt-left"></i>
			</button>
			<input type="button" class="virtual_key_delete" for="form_product_search" value="CE">
			<br>
			<input type="button" class="virtual_key_ru" value="RU">
			<input type="button" class="virtual_key virtual_key_space" for="form_product_search" value=" ">
			<input type="button" class="virtual_key" for="form_product_search" value=",">
			<input type="button" class="virtual_key" for="form_product_search" value=".">
			<input type="button" class="virtual_key virtual_key_ok" value="OK">
		</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="form_product_search">
						</false>
					</check>
			</loop>
			<button type="button" class="virtual_key_bks" for="form_product_search">
				<i class="fas fa-long-arrow-alt-left"></i>
			</button>
			<input type="button" class="virtual_key_delete" for="form_product_search" value="CE">
			<br>
			<input type="button" class="virtual_key_eng" value="ENG">
			<input type="button" class="virtual_key virtual_key_space" for="form_product_search" value=" ">
			<input type="button" class="virtual_key" for="form_product_search" value=",">
			<input type="button" class="virtual_key" for="form_product_search" value=".">
			<input type="button" class="virtual_key virtual_key_ok" value="OK">
		</div>
	</div>
		</check>
	</form>
	<div class="add_stop_list content2" align="center">
		<div>
			<check if="{{!empty(@parent)}}">
			<button type="button" class="catalog_a catalog_navigation" href="/products/addstop">
				<i class="fas fa-home"></i>
				<br>
				<div class="small">Начало</div>
			</button>
			<button type="button" class="catalog_a catalog_navigation" href="/products/addstop?category_id={{@parent['parent_id']}}">
				<i class="fas fa-caret-left"></i>
				<br>
				<div class="small">Назад</div>
			</button>
			</check>
		</div>
		<table width="100%">
			<tr>
				<td align="left" width="30%">
					<check if="{{@page>1}}">
					<button type="button" class="catalog_a left" href="/products/addstop?category_id={{@GET.category_id}}&page={{@page-1}}">
						<i class="fas fa-caret-left"></i>
						Стр. {{@page-1}}
					</button>
					</check>
				</td>
				<td align="center">
					<check if="{{@page>1 || @page<@page_all}}">
					<div class="page_number">
						Стр. {{@page}}
					</div>
					</check>
				</td>
				<td align="right" width="30%">
					<check if="{{@page<@page_all}}">
					<button type="button" class="catalog_a right" href="/products/addstop?category_id={{@GET.category_id}}&page={{@page+1}}">
						Стр. {{@page+1}}
						<i class="fas fa-caret-right"></i>
					</button>
					</check>
				</td>
			</tr>
		</table>
		<br>
		<div id="catalog">
			<repeat group="{{@categories}}" value="{{@c}}">
			<button type="button" class="catalog_item catalog_a {{@c['icon']?'button_with_icon':''}}" style="{{@c['color']!='transparent'?'background: '.@c['color'].';':''}};" href="/products/addstop?category_id={{@c['id']}}">
				<check if="{{@c['icon']}}">
				<div class="category_icon">
					{{@c['icon']|raw}}
				</div>
				</check>
				<b>{{@c['title']}}</b>
			</button>
			</repeat>
			<repeat group="{{@products}}" value="{{@p}}">
			<div class="stop_list_product stop_list_product_{{@p['id']}} {{@p['stop']==1?'stoplist':''}}">
				<form action="/products/changestop" method="POST">
					<input type="hidden" name="id" value="{{@p['id']}}">
					<input type="hidden" name="title" value="{{@p['title']}}">
					<input type="hidden" name="stop" value="1">
					<button type="submit" class="add_stop_list_button">
						<i class="fas fa-plus"></i>
						<i class="fas fa-minus"></i>
					</button>
					<b>{{@p.short_title}}</b>
				</form>
				<div class="stop_txt">
					<i class="fas fa-ban false"></i><small>в стоп-листе</small>
				</div>
			</div>
			</repeat>
		</div>
		<table width="100%">
			<tr>
				<td align="left" width="30%">
					<check if="{{@page>1}}">
					<button type="button" class="catalog_a left" href="/products/addstop?category_id={{@GET.category_id}}&page={{@page-1}}">
						<i class="fas fa-caret-left"></i>
						Стр. {{@page-1}}
					</button>
					</check>
				</td>
				<td align="center">
					<check if="{{@page>1 || @page<@page_all}}">
					<div class="page_number">
						Стр. {{@page}}
					</div>
					</check>
				</td>
				<td align="right" width="30%">
					<check if="{{@page<@page_all}}">
					<button type="button" class="catalog_a right" href="/products/addstop?category_id={{@GET.category_id}}&page={{@page+1}}">
						Стр. {{@page+1}}
						<i class="fas fa-caret-right"></i>
					</button>
					</check>
				</td>
			</tr>
		</table>
	</div>
</div>
<script type="text/javascript" src="/ui/scripts/receipts.js?v={{@site_version}}"></script>