#1128 통합 검색에서 엮인 글 모듈 유무에 따라 표시 조절

https://github.com/xpressengine/xe-core/issues/1128

엮인글 모듈이 없는 경우, 엮인글과 관련된 링크를 감춥니다.
This commit is contained in:
MinSoo Kim 2015-02-17 13:51:04 +09:00
parent c5893358d5
commit 6a77438077
3 changed files with 42 additions and 33 deletions

View file

@ -83,6 +83,13 @@ class integration_searchView extends integration_search
if($is_keyword)
{
$oIS = getModel('integration_search');
$oTrackbackModel = getAdminModel('trackback');
Context::set('trackback_module_exist', true);
if(!$oTrackbackModel)
{
Context::set('trackback_module_exist', false);
}
switch($where)
{
case 'document' :

View file

@ -12,11 +12,13 @@
<div class="isMore"><a href="{getAutoEncodedUrl('where','comment','page',1)}">more</a></div>
<!--@end-->
{@ $output = $search_result['trackback'] }
{@ $search_target = 'title'; }
<!--#include("trackback.html")-->
<!--@if(count($output->data))-->
<div class="isMore"><a href="{getAutoEncodedUrl('where','trackback','page',1)}">more</a></div>
<!--@if($trackback_module_exist)-->
{@ $output = $search_result['trackback'] }
{@ $search_target = 'title'; }
<!--#include("trackback.html")-->
<!--@if(count($output->data))-->
<div class="isMore"><a href="{getAutoEncodedUrl('where','trackback','page',1)}">more</a></div>
<!--@end-->
<!--@end-->
{@ $output = $search_result['multimedia'] }

View file

@ -3,39 +3,39 @@
<h3 class="subTitle">{$lang->trackback} <span>({number_format($output->total_count)})</span></h3>
<ul class="subNavigation">
<!--@foreach($lang->is_search_option['trackback'] as $key => $val)-->
<li value="{$key}" class="<!--@if($search_target == $key)-->on<!--@end--><!--@if($key=="tag")--> last<!--@end-->"><a href="{getUrl('where','trackback','search_target',$key,'page',1)}">{$val}</a></li>
<!--@end-->
<!--@foreach($lang->is_search_option['trackback'] as $key => $val)-->
<li value="{$key}" class="<!--@if($search_target == $key)-->on<!--@end--><!--@if($key=="tag")--> last<!--@end-->"><a href="{getUrl('where','trackback','search_target',$key,'page',1)}">{$val}</a></li>
<!--@end-->
</ul>
<!--@if(!count($output->data))-->
<span class="noResult">{$lang->msg_no_result}</span>
<span class="noResult">{$lang->msg_no_result}</span>
<!--@else-->
<ul class="searchResult">
<!--@foreach($output->data as $no => $trackback)-->
<li>
<dl>
<dt><a href="{getUrl('','document_srl',$trackback->document_srl)}" onclick="window.open(this.href);return false;">{htmlspecialchars($trackback->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}</a> </span></dt>
<dd>{cut_str(htmlspecialchars($trackback->excerpt, ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</dd>
</dl>
<address><strong><a href="{$trackback->url}">{htmlspecialchars($trackback->blog_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}</a></strong> | <span class="time">{zdate($trackback->regdate, "Y-m-d H:i")}</span> </address>
<ul class="searchResult">
<!--@foreach($output->data as $no => $trackback)-->
<li>
<dl>
<dt><a href="{getUrl('','document_srl',$trackback->document_srl)}" onclick="window.open(this.href);return false;">{htmlspecialchars($trackback->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}</a> </span></dt>
<dd>{cut_str(htmlspecialchars($trackback->excerpt, ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</dd>
</dl>
<address><strong><a href="{$trackback->url}">{htmlspecialchars($trackback->blog_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}</a></strong> | <span class="time">{zdate($trackback->regdate, "Y-m-d H:i")}</span> </address>
</li>
<!--@end-->
</ul>
</li>
<!--@end-->
</ul>
<!--@if($where == 'trackback' && $output->page_navigation)-->
<div class="pagination a1">
<a href="{getUrl('page','')}" class="prevEnd">{$lang->first_page}</a>
<!--@while($page_no = $output->page_navigation->getNextPage())-->
<!--@if($page == $page_no)-->
<strong>{$page_no}</strong>
<!--@else-->
<a href="{getUrl('page',$page_no)}">{$page_no}</a>
<!--@end-->
<!--@end-->
<a href="{getUrl('page',$output->page_navigation->last_page)}" class="nextEnd">{$lang->last_page}</a>
</div>
<!--@end-->
<!--@if($where == 'trackback' && $output->page_navigation)-->
<div class="pagination a1">
<a href="{getUrl('page','')}" class="prevEnd">{$lang->first_page}</a>
<!--@while($page_no = $output->page_navigation->getNextPage())-->
<!--@if($page == $page_no)-->
<strong>{$page_no}</strong>
<!--@else-->
<a href="{getUrl('page',$page_no)}">{$page_no}</a>
<!--@end-->
<!--@end-->
<a href="{getUrl('page',$output->page_navigation->last_page)}" class="nextEnd">{$lang->last_page}</a>
</div>
<!--@end-->
<!--@end-->