This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/themes/default/blocks/core/search.tpl
2011-05-03 09:49:01 +10:00

60 lines
2.4 KiB
Smarty

{assign var=meth value=':'|explode:$VAR._page}
<!-- {$meth.0}:{$meth.1} -->
<!-- The main search engine for OSB -->
<!-- All searchs are performed here, and a redirect to the appropriate result page is called -->
{$method->exe($VAR.module,$meth.1)}
{if ($method->result == false)}
{$block->display('core:method_error')}
{else}
<div style="text-align: center;">
<br/>
{if $results > 0}
<b>{t}Your search has been completed sucessfully.{/t}</b><br/>
<br/>
{t}If this page does not automaticaly refresh within a few seconds, please click below to continue.{/t}<br/>
<br/>
<!-- Only ONE result -->
{if $results == '1' && $VAR._next_page_one != ''}
<a href="?_page={$VAR.module}:{$VAR._next_page_one}&amp;id={$record_id}{if $VAR._escape_next == '1'}&amp;_escape=1&amp;_escape_next=1{/if}">{t}Click here to continue{/t}</a>
<script type="text/javascript">
<!--
var url = '?_page={$VAR.module}:{$VAR._next_page_one}&id={$record_id}{if $VAR._escape_next == "1"}&_escape=1&_escape_next=1{/if}';
document.location = url;
//-->
</script>
{else}
{if $VAR._next_page == ''}
<a href="?_page={$VAR.module}:search_show&amp;search_id={$search_id}&amp;order_by={$order_by}&amp;limit={$limit}&amp;page=1{if $VAR._escape_next == '1'}&amp;_escape=1&amp;_escape_next=1{/if}">{t}Click here to continue{/t}</a><br/>
{else}
<a href="?_page={$VAR.module}:{$VAR._next_page}&amp;search_id={$search_id}&amp;order_by={$order_by}&amp;limit={$limit}&amp;page=1{if $VAR._escape_next == '1'}&amp;_escape=1&amp;_escape_next=1{/if}">{t}Click here to continue{/t}</a><br/>
{/if}
<script type="text/javascript">
<!--
{if $VAR._next_page == ''}
var url = '?_page={$VAR.module}:search_show&search_id={$search_id}&order_by={$order_by}&limit={$limit}&page=1{if $VAR._escape_next == "1"}&_escape=1&_escape_next=1{/if}';
{else}
var url = '?_page={$VAR.module}:{$VAR._next_page}&search_id={$search_id}&order_by={$order_by}&limit={$limit}&page=1{if $VAR._escape_next == "1"}&_escape=1&_escape_next=1{/if}';
{/if}
document.location = url;
//-->
</script>
{/if}
{else}
<b>{t}No results for your search were found.{/t}</b><br/>
<br/>
<input type="button" value="{t}Back{/t}" onclick="history.back()" class="form_button"/>
<input type="button" value="{t}Refresh{/t}" onclick="location.reload()" class="form_button"/>
{/if}
</div>
{/if}