// Merge Dev + Bootstrap

This commit is contained in:
Jerome Nadaud committed 2013-08-21 15:27:14 +02:00
1 parent 3005ca39f2
commit d6b50a7f0c
1 file changed
+144 -165
@@ -24,51 +24,48 @@
*} *}
{if !$simple_header} {if !$simple_header}
<script type="text/javascript">
$(document).ready(function() {
$('table.{$list_id} .filter').keypress(function(event){
formSubmit(event, 'submitFilterButton{$list_id}')
})
});
</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"> <script type="text/javascript">
$(document).ready(function() { var token = '{$token}';
$('table.{$list_id} .filter').keypress(function(event){ var come_from = '{$list_id}';
formSubmit(event, 'submitFilterButton{$list_id}') var alternate = {if $order_way == 'DESC'}'1'{else}'0'{/if};
})
});
</script> </script>
{* Display column names and arrows for ordering (ASC, DESC) *} <script type="text/javascript" src="../js/admin-dnd.js"></script>
{if $is_order_position} {/if}
<script type="text/javascript" src="../js/jquery/plugins/jquery.tablednd.js"></script> <script type="text/javascript">
<script type="text/javascript"> $(function() {
var token = '{$token}'; if ($("table.{$list_id} .datepicker").length > 0)
var come_from = '{$list_id}'; $("table.{$list_id} .datepicker").datepicker({
var alternate = {if $order_way == 'DESC'}'1'{else}'0'{/if}; prevText: '',
</script> nextText: '',
<script type="text/javascript" src="../js/admin-dnd.js"></script> dateFormat: 'yy-mm-dd'
{/if} });
});
<script type="text/javascript"> </script>
$(function() { {/if}
if ($("table.{$list_id} .datepicker").length > 0)
$("table.{$list_id} .datepicker").datepicker({
prevText: '',
nextText: '',
dateFormat: 'yy-mm-dd'
});
});
</script>
{/if}{* End if simple_header *}
{if $show_toolbar} {if $show_toolbar}
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} {include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
{/if} {/if}
{if !$simple_header} {if !$simple_header}
<div class="leadin">{block name="leadin"}{/block}</div> <div class="leadin">{block name="leadin"}{/block}</div>
{/if} {/if}
{block name="override_header"}{/block} {block name="override_header"}{/block}
{hook h='displayAdminListBefore'} {hook h='displayAdminListBefore'}
{if isset($name_controller)} {if isset($name_controller)}
{capture name=hookName assign=hookName}display{$name_controller|ucfirst}ListBefore{/capture} {capture name=hookName assign=hookName}display{$name_controller|ucfirst}ListBefore{/capture}
{hook h=$hookName} {hook h=$hookName}
@@ -77,147 +74,129 @@
{hook h=$hookName} {hook h=$hookName}
{/if} {/if}
{if !$simple_header} {if !$simple_header}
<form method="post" action="{$action}" class="form"> <form method="post" action="{$action}" class="form-horizontal">
{block name="override_form_extra"}{/block} {block name="override_form_extra"}{/block}
<fieldset class="col-lg-12">
<input type="hidden" id="submitFilter{$list_id}" name="submitFilter{$list_id}" value="0"/> {if $show_filters}
{/if} <input type="hidden" id="submitFilter{$list_id}" name="submitFilter{$list_id}" value="0"/>
<table class="table_grid" name="list_table"> <span class="pull-right">
{if !$simple_header} <button type="submit" name="submitReset{$list_id}" class="btn {if !$filters_has_value}btn-default{else}btn-primary{/if} btn-small"{if !$filters_has_value} disabled="disabled"{/if}>
<tr> <i class="icon-eraser"></i> {l s='Reset'}
<td style="vertical-align: bottom;"> </button>
<span style="float: left;"> <button type="submit" id="submitFilterButton{$list_id}" name="submitFilter" class="btn btn-default btn-small" />
{if $page > 1} <i class="icon-filter"></i> {l s='Filter'}
<input type="image" src="../img/admin/list-prev2.gif" onclick="getE('submitFilter{$list_id}').value=1"/>&nbsp; </button>
<input type="image" src="../img/admin/list-prev.gif" onclick="getE('submitFilter{$list_id}').value={$page - 1}"/> </span>
{/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{$list_id}').value={$page + 1}"/>&nbsp;
<input type="image" src="../img/admin/list-next2.gif" onclick="getE('submitFilter{$list_id}').value={$total_pages}"/>
{/if}
| {l s='Display'}
<select name="{$list_id}_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>
/ {$list_total} {l s='result(s)'}
</span>
<span style="float: right;">
<input type="submit" name="submitReset{$list_id}" value="{l s='Reset'}" class="button" />
<input type="submit" id="submitFilterButton{$list_id}" name="submitFilter" value="{l s='Filter'}" class="button" />
</span>
<span class="clear"></span>
</td>
</tr>
{/if} {/if}
<tr> {/if}
<td{if $simple_header} style="border:none;"{/if}> <table
<table class="table table-hover"
{if $table_id} id={$table_id}{/if} name="list_table"
class="table {if $table_dnd}tableDnD{/if} {$list_id}" {if $table_id} id={$table_id}{/if}
cellpadding="0" cellspacing="0" class="table {if $table_dnd}tableDnD{/if} {$table}"
style="width: 100%; margin-bottom:10px;"> >
<col width="10px" /> <thead>
<tr class="nodrag nodrop">
<th class="center">
</th>
{foreach $fields_display AS $key => $params} {foreach $fields_display AS $key => $params}
<col {if isset($params.width) && $params.width != 'auto'}width="{$params.width}px"{/if}/> <th {if isset($params.align)} class="{$params.align}"{/if}>
<span class="title_box {if isset($order_by) && ($key == $order_by)} active{/if}">
{if isset($params.hint)}
<span class="label-tooltip" data-toggle="tooltip"
title="
{if is_array($params.hint)}
{foreach $params.hint as $hint}
{if is_array($hint)}
{$hint.text}
{else}
{$hint}
{/if}
{/foreach}
{else}
{$params.hint}
{/if}
">
{$params.title}
</span>
{else}
{$params.title}
{/if}
{if (!isset($params.orderby) || $params.orderby) && !$simple_header}
<a {if isset($order_by) && ($key == $order_by) && ($order_way == 'DESC')}class="active"{/if} href="{$currentIndex}&{$list_id}Orderby={$key|urlencode}&{$list_id}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}&{$list_id}Orderby={$key|urlencode}&{$list_id}Orderway=asc&token={$token}{if isset($smarty.get.$identifier)}&{$identifier}={$smarty.get.$identifier|intval}{/if}">
<i class="icon-caret-up"></i>
</a>
</span>
{/if}
</th>
{/foreach} {/foreach}
{if $shop_link_type} {if $shop_link_type}
<col width="80px" /> <th>
{if $shop_link_type == 'shop'}
{l s='Shop'}
{else}
{l s='Group shop'}
{/if}
</th>
{/if} {/if}
{if $has_actions} {if $has_actions}
<col width="52px" /> <th>{l s='Actions'}{if !$simple_header}{/if}</th>
{/if} {/if}
<thead> </tr>
<tr class="nodrag nodrop" style="height: 40px"> {if !$simple_header && $show_filters}
<th class="center"> <tr class="nodrag nodrop filter {if $row_hover}row_hover{/if}">
{if $has_bulk_actions} <td class="center">
<input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, '{$list_id}Box[]', this.checked)" /> {if $has_bulk_actions}
{/if} --
</th>
{foreach $fields_display AS $key => $params}
<th {if isset($params.align)} class="{$params.align}"{/if}>
{if isset($params.hint)}<span class="hint" name="help_box">{$params.hint}<span class="hint-pointer">&nbsp;</span></span>{/if}
<span class="title_box">
{$params.title}
</span>
{if (!isset($params.orderby) || $params.orderby) && !$simple_header}
<br />
<a href="{$currentIndex}&{$list_id}Orderby={$key|urlencode}&{$list_id}Orderway=desc&token={$token}{if isset($smarty.get.$identifier)}&{$identifier}={$smarty.get.$identifier|intval}{/if}">
<img border="0" src="../img/admin/down{if isset($order_by) && ($key == $order_by) && ($order_way == 'DESC')}_d{/if}.gif" /></a>
<a href="{$currentIndex}&{$list_id}Orderby={$key|urlencode}&{$list_id}Orderway=asc&token={$token}{if isset($smarty.get.$identifier)}&{$identifier}={$smarty.get.$identifier|intval}{/if}">
<img border="0" src="../img/admin/up{if isset($order_by) && ($key == $order_by) && ($order_way == 'ASC')}_d{/if}.gif" /></a>
{elseif !$simple_header}
<br />&nbsp;
{/if}
</th>
{/foreach}
{if $shop_link_type}
<th>
{if $shop_link_type == 'shop'}
{l s='Shop'}
{else}
{l s='Group shop'}
{/if}
<br />&nbsp;
</th>
{/if}
{if $has_actions}
<th class="center">{l s='Actions'}{if !$simple_header}<br />&nbsp;{/if}</th>
{/if}
</tr>
{if !$simple_header}
<tr class="nodrag nodrop filter {if $row_hover}row_hover{/if}" style="height: 35px;">
<td class="center">
{if $has_bulk_actions}
--
{/if}
</td>
{* 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 onchange="$('#submitFilterButton{$list_id}').focus();$('#submitFilterButton{$list_id}').click();" name="{$list_id}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}/><br />
{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 onchange="$('#submitFilterButton{$list_id}').focus();$('#submitFilterButton{$list_id}').click();" name="{$list_id}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="{$list_id}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"{else}style="width:95%"{/if} />
{/if}
{/if}
</td>
{/foreach}
{if $shop_link_type}
<td>--</td>
{/if}
{if $has_actions}
<td class="center">--</td>
{/if}
</tr>
{/if} {/if}
</thead> </td>
{* 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{$list_id}').focus();$('#submitFilterButton{$list_id}').click();" name="{$list_id}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{$list_id}').focus();$('#submitFilterButton{$list_id}').click();" name="{$list_id}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="{$list_id}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}
{/if}
</td>
{/foreach}
{if $shop_link_type}
<td>--</td>
{/if}
{if $has_actions}
<td class="center">--</td>
{/if}
</tr>
{/if}
</thead>