59 lines
2.4 KiB
Smarty
59 lines
2.4 KiB
Smarty
<h2 id="page-heading" class="mb-4">{#SEARCH_RESULTS#}</h2>
|
|
|
|
{if $no_results == 1}
|
|
<div class="alert alert-light border">
|
|
{#SEARCH_NO_RESULTS#}
|
|
</div>
|
|
{else}
|
|
{if $q_navi}
|
|
<div class="mb-4 small text-muted">
|
|
{#SEARCH_PAGES#}: {$q_navi}
|
|
</div>
|
|
{/if}
|
|
|
|
<div class="search-results">
|
|
{foreach from=$searchresults item=result}
|
|
<div class="search-item mb-4" style="max-width: 700px;">
|
|
<div class="d-flex align-items-center mb-1">
|
|
<a href="{$result->document_alias}" class="text-success text-decoration-none small" style="font-size: 0.85rem;">
|
|
{if $ABS_PATH == "/" || $ABS_PATH == ""}
|
|
{* Собираем URL динамически на основе данных сервера *}
|
|
{if $smarty.server.HTTPS == 'on' || $smarty.server.SERVER_PORT == 443}https{else}http{/if}://{$smarty.server.HTTP_HOST}{$result->document_alias|replace:'//':'/'}
|
|
{else}
|
|
{* Если в ABS_PATH уже прописан путь, просто чистим лишние слеши *}
|
|
{$ABS_PATH|regex_replace:"/\/$/":""}{$result->document_alias}
|
|
{/if}
|
|
</a>
|
|
</div>
|
|
|
|
<h4 class="mb-1">
|
|
<a href="{$result->document_alias}" class="text-primary text-decoration-none hover-underline" style="color: #1a0dab !important;">
|
|
{$result->document_title|escape}
|
|
</a>
|
|
</h4>
|
|
|
|
{if $result->Text}
|
|
<div class="text-dark mb-1" style="font-size: 0.95rem; color: #4d5156; line-height: 1.5;">
|
|
{$result->Text}
|
|
</div>
|
|
{/if}
|
|
|
|
<div class="text-muted" style="font-size: 0.85rem;">
|
|
<span class="me-3">Опубликован: {$result->document_published|date_format:$DATE_FORMAT|pretty_date}</span>
|
|
<span>Просмотров: {$result->document_count_view}</span>
|
|
</div>
|
|
</div>
|
|
{/foreach}
|
|
</div>
|
|
|
|
{if $q_navi}
|
|
<div class="mt-4 pt-3 border-top small text-muted">
|
|
{#SEARCH_PAGES#}: {$q_navi}
|
|
</div>
|
|
{/if}
|
|
{/if}
|
|
|
|
<div class="mt-5 bg-light p-4 border rounded shadow-sm">
|
|
<h6 class="mb-3 text-muted fw-bold">Новый поиск</h6>
|
|
{include file="$inc_path/form_big.tpl"}
|
|
</div> |