2012-12-26 13:33:26 +00:00
|
|
|
<div class="search-header">
|
|
|
|
<form class="inlineblock form-search" style="margin-right:10px;" action="{link name='search_result'}" data-component="cbsearch">
|
|
|
|
<input type="hidden" name="type" id="searchType" value="{'type'|get_form_val:true}" />
|
|
|
|
<div class="inlineblock valignTop input-append input-prepend">
|
|
|
|
<div class="btn-group">
|
|
|
|
{$search_type='type'|get_form_val:true}
|
2012-12-27 13:28:31 +00:00
|
|
|
<button class="btn dropdown-toggle selected-search-type" type="button" data-toggle="dropdown"><span>{$search_type|capitalize}</span> <i class='caret'></i></button>
|
2012-12-26 13:33:26 +00:00
|
|
|
<ul class="dropdown-menu">
|
|
|
|
{foreach from=$Cbucket->search_types item=t key=stypes name=SearchTypes}
|
|
|
|
<li>
|
|
|
|
<a id="{$stypes}" data-type="{$stypes}" href="#" class="search-type{if $smarty.get.type == $stypes && $smarty.const.THIS_PAGE == "search_result"} active{/if}">{$stypes|capitalize}</a>
|
|
|
|
</li>
|
|
|
|
{/foreach}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<input type="text" class="span5" value="{'query'|get_form_val:true}" name="query" id="query">
|
|
|
|
<div class="btn-group">
|
|
|
|
<button class="btn"><i class="icon-search"></i></button>
|
|
|
|
<button class="btn search-options" type="button" data-toggle="button">Options <i class="search-options-caret"></i></button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<div class="search-advance-options">
|
|
|
|
{foreach from=$Cbucket->search_types item=search_type key=search_type_key}
|
|
|
|
{if $search_type}
|
|
|
|
{assign var='type' value=$cbsearch->init_search($search_type_key)}
|
|
|
|
{if $type}
|
|
|
|
{foreach $type->search_type as $stype => $search}
|
|
|
|
<div id="{$stype}-advance-options" class="search-advance-option" data-type="{$stype}">
|
|
|
|
<h4 class="search-advance-options-heading">{lang code='More options for %s'|sprintf:$search.title}</h4>
|
|
|
|
<form class="search-options-form form-horizontal" name="search-form-{$stype}" id="search-form-{$stype}" method="get">
|
|
|
|
<input type="hidden" name="type" value="{$stype}" />
|
|
|
|
<div class="search-advance-options-fields">
|
|
|
|
{foreach $search.fields as $field}
|
|
|
|
{include_template_file file='common/form_field.html' field=$field}
|
|
|
|
{/foreach}
|
|
|
|
</div>
|
|
|
|
<input type="submit" name="cbsearch" id="cbsearch" value="Search" class="btn btn-primary pull-right" />
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{/foreach}
|
|
|
|
{/if}
|
|
|
|
{/if}
|
|
|
|
{/foreach}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{if $results}
|
|
|
|
{foreach item=result from=$results}
|
|
|
|
{assign var=$template_var value =$result}
|
|
|
|
{include file="$display_template" }
|
|
|
|
{/foreach}
|
|
|
|
{else}
|
|
|
|
<p class="alert alert-large">{lang code='no_results_found'}</p>
|
|
|
|
{/if}
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
{get_template('pagination')}
|