Files
kupshop/admin/templates/window/search.tpl
2025-08-02 16:30:27 +02:00

276 lines
14 KiB
Smarty

{extends "../window.tpl"}
{block title}
{$body.page_title}
{/block}
{block windowContent}
<div class="container-fluid box">
<div class="panel box">
<div class="tab-content boxFlex box">
<div class="tab-pane fade active in boxFlex box">
<div class="row">
<div class="col-md-5">
<h3>
<span class="glyphicon glyphicon-search"></span>
{$body.page_title}
</h3>
</div>
<div class="col-md-7">
{if $body.type=="user"}
<form target="searchFrame" method="get" action="launch.php" class="form-horizontal">
<input type="hidden" name="s" value="list.php">
<input type="hidden" name="type" value="users" />
<input type="hidden" name="searchWnd" value="1">
<div class="form-group">
<div class="col-md-5 control-label">
<label>E-mail / Jméno / Firma:</label>
</div>
<div class="col-md-5">
<input type="text" class="form-control input-sm" name="search_fulltext" maxlength="20" size="15" value="" />
</div>
<div class="col-md-2">
<button class="btn btn-primary btn-sm">Vyhledat</button>
</div>
</div>
<div class="form-group">
<div class="col-md-5 control-label">
<label>IČO/DIČ:</label>
</div>
<div class="col-md-5">
<input type="text" class="form-control input-sm" name="ico" maxlength="20" size="15" value="" />
</div>
</div>
</form>
{elseif $body.type=="product"}
<form target="searchFrame" method="get" action="launch.php" class="form-horizontal">
<div class="form-group">
<div class="col-md-2 control-label">
<label>Kód:</label>
</div>
<div class="col-md-5">
<input type="hidden" name="type" value="products" />
<input type="hidden" name="s" value="list.php">
<input type="hidden" name="searchWnd" value="1">
<input type="hidden" name="showOld" value="1">
<div class="input-group">
<input type="text" class="form-control input-sm" name="code" maxlength="20" value="" />
<span class="input-group-btn">
<button class="btn btn-primary btn-sm">Vyhledat</button>
</span>
</div>
</div>
</div>
</form>
<form target="searchFrame" method="get" action="launch.php" class="form-horizontal">
<div class="form-group">
<div class="col-md-2 control-label">
<label>Název:</label>
</div>
<div class="col-md-8">
<input type="hidden" name="type" value="products" />
<input type="hidden" name="s" value="list.php">
<input type="hidden" name="searchWnd" value="1">
<input type="hidden" name="showOld" value="1">
<div class="input-group">
<input type="text" class="form-control input-sm" size="20" name="title" maxlength="100" value="" />
<span class="input-group-btn">
<button class="btn btn-primary btn-sm">Vyhledat</button>
</span>
</div>
</div>
</div>
</form>
{elseif $body.type=="storesProducts"}
{$storeID = getVal('storeID')}
{$inStore = getVal('inStore', null, 'inStore')}
{block name="css" append}
<style type="text/css">
body.window {
padding: 0;
}
</style>
{/block}
<form target="searchFrame" method="get" action="launch.php" class="form-horizontal">
<div class="form-group">
<div class="col-md-2 control-label">
<label>Kód:</label>
</div>
<div class="col-md-5">
<input type="hidden" name="type" value="storesProducts" />
<input type="hidden" name="s" value="list.php">
<input type="hidden" name="searchWnd" value="0">
<input type="hidden" name="showOld" value="1">
<input type="hidden" name="storeID" value="{$storeID}">
<input type="hidden" name="inStore" value="{$inStore}">
<div class="input-group">
<input type="text" class="form-control input-sm" name="code" maxlength="50" value="" />
<span class="input-group-btn">
<button class="btn btn-primary btn-sm">Vyhledat</button>
</span>
</div>
</div>
</div>
</form>
<form target="searchFrame" method="get" action="launch.php" class="form-horizontal">
<div class="form-group">
<div class="col-md-2 control-label">
<label>EAN:</label>
</div>
<div class="col-md-5">
<input type="hidden" name="type" value="storesProducts" />
<input type="hidden" name="s" value="list.php">
<input type="hidden" name="searchWnd" value="0">
<input type="hidden" name="showOld" value="1">
<input type="hidden" name="storeID" value="{$storeID}">
<input type="hidden" name="inStore" value="{$inStore}">
<div class="input-group">
<input type="text" class="form-control input-sm" name="ean" maxlength="20" value="" />
<span class="input-group-btn">
<button class="btn btn-primary btn-sm">Vyhledat</button>
</span>
</div>
</div>
</div>
</form>
<form target="searchFrame" method="get" action="launch.php" class="form-horizontal">
<div class="form-group">
<div class="col-md-2 control-label">
<label>Název:</label>
</div>
<div class="col-md-8">
<input type="hidden" name="type" value="storesProducts" />
<input type="hidden" name="s" value="list.php">
<input type="hidden" name="searchWnd" value="0">
<input type="hidden" name="showOld" value="1">
<input type="hidden" name="storeID" value="{$storeID}">
<input type="hidden" name="inStore" value="{$inStore}">
<div class="input-group">
<input type="text" class="form-control input-sm" size="20" name="title" maxlength="100" value="" />
<span class="input-group-btn">
<button class="btn btn-primary btn-sm">Vyhledat</button>
</span>
</div>
</div>
</div>
</form>
{elseif $body.type=="photo"}
<form target="searchFrame" method="get" action="launch.php" class="form-horizontal">
<input type="hidden" name="type" value="photos" />
<input type="hidden" name="s" value="list.php">
<input type="hidden" name="searchWnd" value="1">
<div class="form-group">
<div class="col-md-2 control-label">
<label>Název:</label>
</div>
<div class="col-md-5">
<input type="text" class="form-control input-sm" name="name" maxlength="20" value="" />
</div>
<div class="col-md-2 control-label">
<label>ID:</label>
</div>
<div class="col-md-2">
<input type="text" class="form-control input-sm" name="ID" maxlength="20" value="" />
</div>
</div>
<div class="form-group">
<div class="col-md-2 control-label">
<label>Produkt:</label>
</div>
<div class="col-md-5">
<input type="text" class="form-control input-sm" name="IDp" id="id_product" maxlength="20" value="" />
</div>
<script type="text/javascript">
var $autocomplete = new $.wpjAutoComplete({ input:'#id_product' });
</script>
<div class="col-md-2 col-md-offset-2">
<button class="btn btn-primary btn-sm">Vyhledat</button>
</div>
</div>
</form>
{elseif $body.type=="link"}
<div class="row">
<div class="col-md-5">
<input type="button" onclick="transferValues(top.frames['searchFrame'].location)" value="ULOŽIT AKTUÁLNÍ ADRESU" class="btn btn-primary btn-block">
</div>
</div>
{elseif $body.type=="orders"}
<form target="searchFrame" method="get" action="launch.php" class="form-horizontal">
<input type="hidden" name="s" value="list.php">
<input type="hidden" name="type" value="orders">
<input type="hidden" name="searchWnd" value="1">
{if $filters = getVal('filters')}
{foreach $filters as $key => $filter}
<input type="hidden" name="{$key}" value="{$filter}">
{/foreach}
{/if}
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td>Zákazník:</td>
<td><input type="text" class="input" size="20" name="customer" maxlength="20" value="{$body.customer}" /> <input type="submit" title="Vyhledat" value="Vyhledat" /></td>
</tr>
</table>
</form>
{/if}
</div>
</div>
<div class="row boxFlex box">
<iframe class="boxFlex" name="searchFrame" src="{$body.iframe_url nofilter}"></iframe>
</div>
</div>
</div>
</div>
</div>
{/block}
<script type="text/javascript">
{block onready append}
resizePopup(window, 1220, 800);
function transferValues(val, data)
{
if(val == null)
return;
var selector = "{$body.selector}",
homeWin = window.opener;
if(homeWin != null)
{
{if $body.function}
var callback = homeWin.searchWndCallbacks[selector];
if (callback)
{
if (data)
data = JSON.parse(atob(data));
callback(val, data);
delete homeWin.searchWndCallbacks[selector];
}
{else}
var $input = homeWin.$(selector);
$input.val(val);
{/if}
homeWin.focus();
this.window.close();
}
}
{/block}
</script>
{block buttonsLeft}
{/block}
{block buttonsRight}
{/block}