1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-29 04:55:02 +03:00

Удален result.tpl из экшена Search

* Результаты теперь выводятся через ActionSearch/index.tpl
This commit is contained in:
Denis Shakhov 2013-07-04 14:26:10 +07:00
parent cede048005
commit b812c5180f
5 changed files with 69 additions and 83 deletions

View file

@ -250,7 +250,7 @@ class ActionSearch extends Action {
$this->Viewer_Assign('aPaging', $aPaging);
}
$this->SetTemplateAction('results');
$this->SetTemplateAction('index');
$this->Viewer_AddHtmlTitle($aReq['q']);
$this->Viewer_Assign('bIsResults', $this->bIsResults);
return $aRes;

View file

@ -4,8 +4,42 @@
{extends file='layouts/layout.base.tpl'}
{block name='layout_options'}
{$bNoSidebar = true}
{/block}
{block name='layout_page_title'}{$aLang.search}{/block}
{block name='layout_content'}
{include file='forms/form.search.main.tpl'}
{if $bIsResults}
<ul class="nav nav-pills">
{foreach from=$aRes.aCounts item=iCount key=sType name="sTypes"}
<li {if $aReq.sType == $sType}class="active"{/if}>
<a href="{router page='search'}{$sType}/?q={$aReq.q|escape:'html'}">
{$iCount}
{if $sType=="topics"}
{$aLang.search_results_count_topics}
{elseif $sType=="comments"}
{$aLang.search_results_count_comments}
{else}
{hook run='search_result_item' sType=$sType}
{/if}
</a>
</li>
{/foreach}
</ul>
{if $aReq.sType == 'topics'}
{include file='topics/topic_list.tpl'}
{elseif $aReq.sType == 'comments'}
{include file='comments/comment_list.tpl'}
{else}
{hook run='search_result' sType=$aReq.sType}
{/if}
{elseif $aReq.q}
{$aLang.search_results_empty}
{/if}
{/block}

View file

@ -1,41 +0,0 @@
{**
* Результаты поиска
*}
{extends file='layouts/layout.base.tpl'}
{block name='layout_page_title'}{$aLang.search_results}{/block}
{block name='layout_content'}
{include file='forms/form.search.main.tpl'}
{if $bIsResults}
<ul class="nav nav-pills">
{foreach from=$aRes.aCounts item=iCount key=sType name="sTypes"}
<li {if $aReq.sType == $sType}class="active"{/if}>
<a href="{router page='search'}{$sType}/?q={$aReq.q|escape:'html'}">
{$iCount}
{if $sType=="topics"}
{$aLang.search_results_count_topics}
{elseif $sType=="comments"}
{$aLang.search_results_count_comments}
{else}
{hook run='search_result_item' sType=$sType}
{/if}
</a>
</li>
{/foreach}
</ul>
{if $aReq.sType == 'topics'}
{include file='topics/topic_list.tpl'}
{elseif $aReq.sType == 'comments'}
{include file='comments/comment_list.tpl'}
{else}
{hook run='search_result' sType=$aReq.sType}
{/if}
{else}
{$aLang.search_results_empty}
{/if}
{/block}

View file

@ -4,8 +4,42 @@
{extends file='layouts/layout.base.tpl'}
{block name='layout_options'}
{$bNoSidebar = true}
{/block}
{block name='layout_page_title'}{$aLang.search}{/block}
{block name='layout_content'}
{include file='forms/form.search.main.tpl'}
{if $bIsResults}
<ul class="nav nav-pills">
{foreach from=$aRes.aCounts item=iCount key=sType name="sTypes"}
<li {if $aReq.sType == $sType}class="active"{/if}>
<a href="{router page='search'}{$sType}/?q={$aReq.q|escape:'html'}">
{$iCount}
{if $sType=="topics"}
{$aLang.search_results_count_topics}
{elseif $sType=="comments"}
{$aLang.search_results_count_comments}
{else}
{hook run='search_result_item' sType=$sType}
{/if}
</a>
</li>
{/foreach}
</ul>
{if $aReq.sType == 'topics'}
{include file='topics/topic_list.tpl'}
{elseif $aReq.sType == 'comments'}
{include file='comments/comment_list.tpl'}
{else}
{hook run='search_result' sType=$aReq.sType}
{/if}
{elseif $aReq.q}
{$aLang.search_results_empty}
{/if}
{/block}

View file

@ -1,41 +0,0 @@
{**
* Результаты поиска
*}
{extends file='layouts/layout.base.tpl'}
{block name='layout_page_title'}{$aLang.search_results}{/block}
{block name='layout_content'}
{include file='forms/form.search.main.tpl'}
{if $bIsResults}
<ul class="nav nav-pills">
{foreach from=$aRes.aCounts item=iCount key=sType name="sTypes"}
<li {if $aReq.sType == $sType}class="active"{/if}>
<a href="{router page='search'}{$sType}/?q={$aReq.q|escape:'html'}">
{$iCount}
{if $sType=="topics"}
{$aLang.search_results_count_topics}
{elseif $sType=="comments"}
{$aLang.search_results_count_comments}
{else}
{hook run='search_result_item' sType=$sType}
{/if}
</a>
</li>
{/foreach}
</ul>
{if $aReq.sType == 'topics'}
{include file='topics/topic_list.tpl'}
{elseif $aReq.sType == 'comments'}
{include file='comments/comment_list.tpl'}
{else}
{hook run='search_result' sType=$aReq.sType}
{/if}
{else}
{$aLang.search_results_empty}
{/if}
{/block}