|
|
|
@@ -24,51 +24,46 @@
|
|
|
|
|
*}
|
|
|
|
|
|
|
|
|
|
{if !$simple_header}
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
$('table.{$table} .filter').keypress(function(event){
|
|
|
|
|
formSubmit(event, 'submitFilterButton{$table}')
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
{* Display column names and arrows for ordering (ASC, DESC) *}
|
|
|
|
|
{if $is_order_position}
|
|
|
|
|
<script type="text/javascript" src="../js/jquery/plugins/jquery.tablednd.js"></script>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
$('table.{$table} .filter').keypress(function(event){
|
|
|
|
|
formSubmit(event, 'submitFilterButton{$table}')
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
var token = '{$token}';
|
|
|
|
|
var come_from = '{$table}';
|
|
|
|
|
var alternate = {if $order_way == 'DESC'}'1'{else}'0'{/if};
|
|
|
|
|
</script>
|
|
|
|
|
{* Display column names and arrows for ordering (ASC, DESC) *}
|
|
|
|
|
{if $is_order_position}
|
|
|
|
|
<script type="text/javascript" src="../js/jquery/plugins/jquery.tablednd.js"></script>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
var token = '{$token}';
|
|
|
|
|
var come_from = '{$table}';
|
|
|
|
|
var alternate = {if $order_way == 'DESC'}'1'{else}'0'{/if};
|
|
|
|
|
</script>
|
|
|
|
|
<script type="text/javascript" src="../js/admin-dnd.js"></script>
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(function() {
|
|
|
|
|
if ($("table.{$table} .datepicker").length > 0)
|
|
|
|
|
$("table.{$table} .datepicker").datepicker({
|
|
|
|
|
prevText: '',
|
|
|
|
|
nextText: '',
|
|
|
|
|
dateFormat: 'yy-mm-dd'
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{/if}{* End if simple_header *}
|
|
|
|
|
<script type="text/javascript" src="../js/admin-dnd.js"></script>
|
|
|
|
|
{/if}
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(function() {
|
|
|
|
|
if ($("table.{$table} .datepicker").length > 0)
|
|
|
|
|
$("table.{$table} .datepicker").datepicker({
|
|
|
|
|
prevText: '',
|
|
|
|
|
nextText: '',
|
|
|
|
|
dateFormat: 'yy-mm-dd'
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
{if $show_toolbar}
|
|
|
|
|
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
{if !$simple_header}
|
|
|
|
|
<div class="leadin">{block name="leadin"}{/block}</div>
|
|
|
|
|
<div class="leadin">{block name="leadin"}{/block}</div>
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{hook h='displayAdminListBefore'}
|
|
|
|
|
|
|
|
|
|
{if isset($name_controller)}
|
|
|
|
|
{capture name=hookName assign=hookName}display{$name_controller|ucfirst}ListBefore{/capture}
|
|
|
|
|
{hook h=$hookName}
|
|
|
|
@@ -77,48 +72,13 @@
|
|
|
|
|
{hook h=$hookName}
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{if !$simple_header}
|
|
|
|
|
<form method="post" action="{$action}" class="form-inline">
|
|
|
|
|
<fieldset class="col-lg-12">
|
|
|
|
|
{block name="override_header"}{/block}
|
|
|
|
|
|
|
|
|
|
{block name="override_header"}{/block}
|
|
|
|
|
|
|
|
|
|
<input type="hidden" id="submitFilter{$table}" name="submitFilter{$table}" value="0"/>
|
|
|
|
|
{/if}
|
|
|
|
|
<input type="hidden" id="submitFilter{$table}" name="submitFilter{$table}" value="0"/>
|
|
|
|
|
|
|
|
|
|
{if !$simple_header}
|
|
|
|
|
|
|
|
|
|
<span>
|
|
|
|
|
{if $page > 1}
|
|
|
|
|
<input type="image" src="../img/admin/list-prev2.gif" onclick="getE('submitFilter{$table}').value=1"/>
|
|
|
|
|
<input type="image" src="../img/admin/list-prev.gif" onclick="getE('submitFilter{$table}').value={$page - 1}"/>
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
{l s='Page'} <b>{$page}</b> / {$total_pages}
|
|
|
|
|
|
|
|
|
|
{if $page < $total_pages}
|
|
|
|
|
<input type="image" src="../img/admin/list-next.gif" onclick="getE('submitFilter{$table}').value={$page + 1}"/>
|
|
|
|
|
<input type="image" src="../img/admin/list-next2.gif" onclick="getE('submitFilter{$table}').value={$total_pages}"/>
|
|
|
|
|
{/if}
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
<span>
|
|
|
|
|
|
|
|
|
|
|
<label >
|
|
|
|
|
{l s='Display'}
|
|
|
|
|
</label>
|
|
|
|
|
|
|
|
|
|
<select class="filter fixed-width-S" name="pagination" onchange="submit()">
|
|
|
|
|
{* Choose number of results per page *}
|
|
|
|
|
{foreach $pagination AS $value}
|
|
|
|
|
<option value="{$value|intval}"{if $selected_pagination == $value} selected="selected" {elseif $selected_pagination == NULL && $value == $pagination[1]} selected="selected2"{/if}>{$value|intval}</option>
|
|
|
|
|
{/foreach}
|
|
|
|
|
</select>
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
<span> / {$list_total} {l s='result(s)'}</span>
|
|
|
|
|
|
|
|
|
|
<span class="pull-right">
|
|
|
|
|
<button type="submit" name="submitReset{$table}" class="btn btn-default btn-small">
|
|
|
|
|
<i class="icon-eraser"></i> {l s='Reset'}
|
|
|
|
@@ -127,64 +87,49 @@
|
|
|
|
|
<i class="icon-filter"></i> {l s='Filter'}
|
|
|
|
|
</button>
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
<table
|
|
|
|
|
class="table table-hover"
|
|
|
|
|
name="list_table"
|
|
|
|
|
{if $table_id} id={$table_id}{/if}
|
|
|
|
|
class="table {if $table_dnd}tableDnD{/if} {$table}"
|
|
|
|
|
cellpadding="0" cellspacing="0">
|
|
|
|
|
{* <col width="10px" />
|
|
|
|
|
{foreach $fields_display AS $key => $params}
|
|
|
|
|
<col {if isset($params.width) && $params.width != 'auto'}width="{$params.width}px"{/if}/>
|
|
|
|
|
{/foreach}
|
|
|
|
|
{if $shop_link_type}
|
|
|
|
|
<col width="80px" />
|
|
|
|
|
{/if}
|
|
|
|
|
{if $has_actions}
|
|
|
|
|
<col width="200px" />
|
|
|
|
|
{/if} *}
|
|
|
|
|
{/if}
|
|
|
|
|
<table
|
|
|
|
|
class="table table-hover"
|
|
|
|
|
name="list_table"
|
|
|
|
|
{if $table_id} id={$table_id}{/if}
|
|
|
|
|
class="table {if $table_dnd}tableDnD{/if} {$table}"
|
|
|
|
|
>
|
|
|
|
|
<thead>
|
|
|
|
|
<tr class="nodrag nodrop">
|
|
|
|
|
<th class="center">
|
|
|
|
|
{if $has_bulk_actions}
|
|
|
|
|
<input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, '{$table}Box[]', this.checked)" />
|
|
|
|
|
{/if}
|
|
|
|
|
{if $has_bulk_actions}
|
|
|
|
|
<input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, '{$table}Box[]', this.checked)" />
|
|
|
|
|
{/if}
|
|
|
|
|
</th>
|
|
|
|
|
{foreach $fields_display AS $key => $params}
|
|
|
|
|
<th {if isset($params.align)} class="{$params.align}"{/if}>
|
|
|
|
|
{if isset($params.hint)}
|
|
|
|
|
<span class="alert alert-info" name="help_box">{$params.hint}<span class="hint-pointer"> </span></span>
|
|
|
|
|
{/if}
|
|
|
|
|
<span class="title_box {if isset($order_by) && ($key == $order_by)} active{/if}">
|
|
|
|
|
{$params.title}
|
|
|
|
|
<th {if isset($params.align)} class="{$params.align}"{/if}>
|
|
|
|
|
{if isset($params.hint)}
|
|
|
|
|
<span class="alert alert-info" name="help_box">{$params.hint}<span class="hint-pointer"> </span></span>
|
|
|
|
|
{/if}
|
|
|
|
|
<span class="title_box {if isset($order_by) && ($key == $order_by)} active{/if}">
|
|
|
|
|
{$params.title}
|
|
|
|
|
{if (!isset($params.orderby) || $params.orderby) && !$simple_header}
|
|
|
|
|
<a {if isset($order_by) && ($key == $order_by) && ($order_way == 'DESC')}class="active"{/if} href="{$currentIndex}&{$table}Orderby={$key|urlencode}&{$table}Orderway=desc&token={$token}{if isset($smarty.get.$identifier)}&{$identifier}={$smarty.get.$identifier|intval}{/if}">
|
|
|
|
|
<a {if isset($order_by) && ($key == $order_by) && ($order_way == 'DESC')}class="active"{/if} href="{$currentIndex}&{$table}Orderby={$key|urlencode}&{$table}Orderway=desc&token={$token}{if isset($smarty.get.$identifier)}&{$identifier}={$smarty.get.$identifier|intval}{/if}">
|
|
|
|
|
<i class="icon-caret-down"></i>
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
<a {if isset($order_by) && ($key == $order_by) && ($order_way == 'ASC')}class="active"{/if} href="{$currentIndex}&{$table}Orderby={$key|urlencode}&{$table}Orderway=asc&token={$token}{if isset($smarty.get.$identifier)}&{$identifier}={$smarty.get.$identifier|intval}{/if}">
|
|
|
|
|
</a>
|
|
|
|
|
<a {if isset($order_by) && ($key == $order_by) && ($order_way == 'ASC')}class="active"{/if} href="{$currentIndex}&{$table}Orderby={$key|urlencode}&{$table}Orderway=asc&token={$token}{if isset($smarty.get.$identifier)}&{$identifier}={$smarty.get.$identifier|intval}{/if}">
|
|
|
|
|
<i class="icon-caret-up"></i>
|
|
|
|
|
</a>
|
|
|
|
|
</span>
|
|
|
|
|
{elseif !$simple_header}
|
|
|
|
|
{/if}
|
|
|
|
|
</th>
|
|
|
|
|
</a>
|
|
|
|
|
</span>
|
|
|
|
|
{/if}
|
|
|
|
|
</th>
|
|
|
|
|
{/foreach}
|
|
|
|
|
{if $shop_link_type}
|
|
|
|
|
<th>
|
|
|
|
|
{if $shop_link_type == 'shop'}
|
|
|
|
|
{l s='Shop'}
|
|
|
|
|
{else}
|
|
|
|
|
{l s='Group shop'}
|
|
|
|
|
{/if}
|
|
|
|
|
<br />
|
|
|
|
|
</th>
|
|
|
|
|
<th>
|
|
|
|
|
{if $shop_link_type == 'shop'}
|
|
|
|
|
{l s='Shop'}
|
|
|
|
|
{else}
|
|
|
|
|
{l s='Group shop'}
|
|
|
|
|
{/if}
|
|
|
|
|
</th>
|
|
|
|
|
{/if}
|
|
|
|
|
{if $has_actions}
|
|
|
|
|
<th>{l s='Actions'}{if !$simple_header}{/if}</th>
|
|
|
|
|
<th>{l s='Actions'}{if !$simple_header}{/if}</th>
|
|
|
|
|
{/if}
|
|
|
|
|
</tr>
|
|
|
|
|
{if !$simple_header}
|
|
|
|
@@ -197,43 +142,43 @@
|
|
|
|
|
|
|
|
|
|
{* Filters (input, select, date or bool) *}
|
|
|
|
|
{foreach $fields_display AS $key => $params}
|
|
|
|
|
<td {if isset($params.align)} class="{$params.align}" {/if}>
|
|
|
|
|
{if isset($params.search) && !$params.search}
|
|
|
|
|
--
|
|
|
|
|
{else}
|
|
|
|
|
{if $params.type == 'bool'}
|
|
|
|
|
<select class="filter" onchange="$('#submitFilterButton{$table}').focus();$('#submitFilterButton{$table}').click();" name="{$table}Filter_{$key}">
|
|
|
|
|
<option value="">--</option>
|
|
|
|
|
<option value="1" {if $params.value == 1} selected="selected" {/if}>{l s='Yes'}</option>
|
|
|
|
|
<option value="0" {if $params.value == 0 && $params.value != ''} selected="selected" {/if}>{l s='No'}</option>
|
|
|
|
|
<td {if isset($params.align)} class="{$params.align}" {/if}>
|
|
|
|
|
{if isset($params.search) && !$params.search}
|
|
|
|
|
--
|
|
|
|
|
{else}
|
|
|
|
|
{if $params.type == 'bool'}
|
|
|
|
|
<select class="filter" onchange="$('#submitFilterButton{$table}').focus();$('#submitFilterButton{$table}').click();" name="{$table}Filter_{$key}">
|
|
|
|
|
<option value="">--</option>
|
|
|
|
|
<option value="1" {if $params.value == 1} selected="selected" {/if}>{l s='Yes'}</option>
|
|
|
|
|
<option value="0" {if $params.value == 0 && $params.value != ''} selected="selected" {/if}>{l s='No'}</option>
|
|
|
|
|
</select>
|
|
|
|
|
{elseif $params.type == 'date' || $params.type == 'datetime'}
|
|
|
|
|
{l s='From'} <input type="text" class="filter datepicker" id="{$params.id_date}_0" name="{$params.name_date}[0]" value="{if isset($params.value.0)}{$params.value.0}{/if}"{if isset($params.width)} style="width:70px"{/if}/>
|
|
|
|
|
{l s='To'} <input type="text" class="filter datepicker" id="{$params.id_date}_1" name="{$params.name_date}[1]" value="{if isset($params.value.1)}{$params.value.1}{/if}"{if isset($params.width)} style="width:70px"{/if}/>
|
|
|
|
|
{elseif $params.type == 'select'}
|
|
|
|
|
{if isset($params.filter_key)}
|
|
|
|
|
<select class="filter" onchange="$('#submitFilterButton{$table}').focus();$('#submitFilterButton{$table}').click();" name="{$table}Filter_{$params.filter_key}" {if isset($params.width)} style="width:{$params.width}px"{/if}>
|
|
|
|
|
<option value="" {if $params.value == ''} selected="selected" {/if}>--</option>
|
|
|
|
|
{if isset($params.list) && is_array($params.list)}
|
|
|
|
|
{foreach $params.list AS $option_value => $option_display}
|
|
|
|
|
<option value="{$option_value}" {if $option_display == $params.value || $option_value == $params.value} selected="selected"{/if}>{$option_display}</option>
|
|
|
|
|
{/foreach}
|
|
|
|
|
{/if}
|
|
|
|
|
</select>
|
|
|
|
|
{elseif $params.type == 'date' || $params.type == 'datetime'}
|
|
|
|
|
{l s='From'} <input type="text" class="filter datepicker" id="{$params.id_date}_0" name="{$params.name_date}[0]" value="{if isset($params.value.0)}{$params.value.0}{/if}"{if isset($params.width)} style="width:70px"{/if}/>
|
|
|
|
|
{l s='To'} <input type="text" class="filter datepicker" id="{$params.id_date}_1" name="{$params.name_date}[1]" value="{if isset($params.value.1)}{$params.value.1}{/if}"{if isset($params.width)} style="width:70px"{/if}/>
|
|
|
|
|
{elseif $params.type == 'select'}
|
|
|
|
|
{if isset($params.filter_key)}
|
|
|
|
|
<select class="filter" onchange="$('#submitFilterButton{$table}').focus();$('#submitFilterButton{$table}').click();" name="{$table}Filter_{$params.filter_key}" {if isset($params.width)} style="width:{$params.width}px"{/if}>
|
|
|
|
|
<option value="" {if $params.value == ''} selected="selected" {/if}>--</option>
|
|
|
|
|
{if isset($params.list) && is_array($params.list)}
|
|
|
|
|
{foreach $params.list AS $option_value => $option_display}
|
|
|
|
|
<option value="{$option_value}" {if $option_display == $params.value || $option_value == $params.value} selected="selected"{/if}>{$option_display}</option>
|
|
|
|
|
{/foreach}
|
|
|
|
|
{/if}
|
|
|
|
|
</select>
|
|
|
|
|
{/if}
|
|
|
|
|
{else}
|
|
|
|
|
<input type="text" class="filter" name="{$table}Filter_{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}" value="{$params.value|escape:'htmlall':'UTF-8'}" {if isset($params.width) && $params.width != 'auto'} style="width:{$params.width}px"{/if} />
|
|
|
|
|
{/if}
|
|
|
|
|
{else}
|
|
|
|
|
<input type="text" class="filter" name="{$table}Filter_{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}" value="{$params.value|escape:'htmlall':'UTF-8'}" {if isset($params.width) && $params.width != 'auto'} style="width:{$params.width}px"{/if} />
|
|
|
|
|
{/if}
|
|
|
|
|
</td>
|
|
|
|
|
{/if}
|
|
|
|
|
</td>
|
|
|
|
|
{/foreach}
|
|
|
|
|
|
|
|
|
|
{if $shop_link_type}
|
|
|
|
|
<td>--</td>
|
|
|
|
|
<td>--</td>
|
|
|
|
|
{/if}
|
|
|
|
|
{if $has_actions}
|
|
|
|
|
<td class="center">--</td>
|
|
|
|
|
<td class="center">--</td>
|
|
|
|
|
{/if}
|
|
|
|
|
</tr>
|
|
|
|
|
{/if}
|
|
|
|
|
</thead>
|
|
|
|
|
</tr>
|
|
|
|
|
{/if}
|
|
|
|
|
</thead>
|