View file Next v1.6/Шаблон (v1.6)/Next/search.tpl

File size: 5.66Kb
<article class="bg-white shadow rounded-lg">
  <div class="px-4 py-4 lg:px-6 lg:py-6 flex place-content-between">
    <h3 class="leading-6 font-bold lg:text-2xl sm:text-xl">[extended-search]Расширенный поиск по сайту[/extended-search][simple-search]Поиск по сайту[/simple-search]</h3>
	[extended-search]<a class="btn_filter_search hidden lg:flex ml-2 w-9 py-2 h-[34px] inline-flex items-center justify-center transition-colors duration-150 rounded-lg border border-gray-200  bg-white shadow-sm hover:bg-gray-50 opacity-[.7] hover:opacity-[.9]" href="#"> <img src="{THEME}/dleimages/filter/filter.svg"  title="Расширенный фильтр" width="24px" height="24px"> </a>[/extended-search]			
  </div>
<div id="searchtable" name="searchtable" class="searchtable border-t border-gray-100 px-5 pt-2 pb-5">
	
  [simple-search]
   <table class="w-full pb-5">
    <td class="search">
      <div align="center">
        <table style="width:100%;">
        <tr style="vertical-align: top;">
				<td class="search">
				        <table style="width:100%;padding:3px;">
						<tr>
						<td class="search">
						{searchfield}
						</tr>
						</table>
			    </td>
		</tr>
		</table>
		</div>
	</td>
    <tr>
    </tr>        
   </table>
  [/simple-search]
	
	
		[extended-search]
<table class="w-full pb-5">
    <td class="search">
      <div align="center">
        <table style="width:100%;">
        <tr style="vertical-align: top;">
				<td class="search">
				        <table style="width:100%;padding:3px;">
						<tr>
						<td class="search">
						{searchfield}
						</tr>
						<tr>
						<td class="search">
							{search-area}
						</td>
						</tr>
						</table>
				</td>
		</tr>
		</table>
		</div>
	</td>
    <tr>
    </tr>        
</table>

<table class="w-full pb-5">
  <td class="block_filter_search  search" style="display: none;">
       <table style="width:100%;">
            <td class="search" width="100%">				
					<fieldset>
						<legend>Поиск по разделам</legend>
						     {category-option}
					</fieldset>
					
					<fieldset style="margin:0px">
						<legend>Поиск по имени</legend>
						<table style="width:100%;">
						<td class="search">
							<div>Имя пользователя</div>
							<div id="userfield">{userfield}<br /><label>{user-option}Точное совпадение</label></div>
						</td>
						</table>
					</fieldset>
				
				    <fieldset style="margin:0px">
						<legend>Искать статьи с</legend>
						<div class="grid grid-cols-2 gap-2">
						   <div class="flex flex-col">
							{news-option}
							</div>
							<div class="flex flex-col" style="width:100%;">
							{comments-num} 
						     </div>
						</div>
						комментариями
					</fieldset>

					<fieldset style="padding-top:10px">
						<legend>Временной период</legend>
                        <div class="grid grid-cols-2 gap-2">
						    <div class="flex flex-col">					
							{date-option}
							</div>
							<div class="flex flex-col">
							{date-beforeafter}
							</div>
						</div>
					</fieldset>

					<fieldset style="padding-top:10px">
						<legend>Сортировка результатов</legend>
							<div class="grid grid-cols-2 gap-2">
						    <div class="flex flex-col">	
								{sort-option}
								</div>
							<div class="flex flex-col">
								{order-option}
							</div>
					</fieldset>

					<fieldset style="padding-top:10px">
						<legend>Показывать результаты как</legend>
                        <table style="width:100%;">
						<tr align="left" valign="middle">
						<td align="left" class="search-w">Результаты поиска как:&nbsp;
					            {view-option}
						</td>
						</tr>

						</table>
					</fieldset>
				
            </td> 
        </table>
    </td>         
</table>
[/extended-search]
                <span class="search" colspan="2">
                    <div class="ml-2 flex gap-2">
                        <input type="button" class="!bg-[#307df0] hover:!bg-[#2664bf] active:!bg-[#2a6dd1] !text-white focus:!text-white items-center !px-4 !py-2 !text-base font-medium rounded-lg" name="dosearch" id="dosearch" value="Искать" onclick="javascript:list_submit(-1); return false;">
                        <input type="button" class="!bg-[#307df0] hover:!bg-[#2664bf] active:!bg-[#2a6dd1] !text-white focus:!text-white items-center !px-4 !py-2 !text-base font-medium rounded-lg" name="doclear" id="doclear" value="Сбросить" onclick="javascript:clearform('fullsearch'); return false;">
                        <input type="reset" class="cursor-pointer !bg-[#307df0] hover:!bg-[#2664bf] active:!bg-[#2a6dd1] !text-white focus:!text-white items-center !px-4 !py-2 !h-[38px] !text-base font-medium " name="doreset" id="doreset" value="Вернуть">
                    </div>
                </span>
    </div>
	[searchmsg]<div class="search_result_num center px-4 pb-5 !mt-0 text-xs lg:text-base">{searchmsg}</div>[/searchmsg]
	</div>
</article>

<link href="{THEME}/js/select/slimselect.css" rel="stylesheet">
<script src="{THEME}/js/select/slimselect.min.js"></script>
[script]
$(document).ready(function(){
	$('.btn_filter_search').click(function(){
		$('.block_filter_search').slideToggle(100, function(){
			if ($(this).is(':hidden')) {
				$('.btn_filter_search').html('<img src="{THEME}/dleimages/filter/filter-down.svg"  title="Показать фильтр" width="24px" height="24px">');
			} else {
				$('.btn_filter_search').html('<img src="{THEME}/dleimages/filter/filter-up.svg"  title="Скрыть фильтр" width="24px" height="24px">');
			}							
		});
		return false;
	});
});
[/script]