126 lines
3.4 KiB
Smarty
126 lines
3.4 KiB
Smarty
{extends "../list.tpl"}
|
|
|
|
{block 'table-class'}table table-striped{/block}
|
|
|
|
{block "list-filter" append}
|
|
{if !empty($sold)}
|
|
<div class="panel-heading">
|
|
<div class="row">
|
|
<div class="col-md-3">
|
|
Prodejnost: <strong>Celkem</strong>: {$sold_total}
|
|
</div>
|
|
{foreach $sold as $year}
|
|
<div class="col-md-2">
|
|
<strong>{$year.year}</strong>: {$year.count}ks
|
|
</div>
|
|
{/foreach}
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
{/block}
|
|
|
|
{block content}
|
|
<style>
|
|
{block "list-styles"}
|
|
/* Delivery type statuses */
|
|
{foreach $styles as $id => $style}
|
|
{if $style.value}
|
|
.badge-{$id} {
|
|
background-color: {$style.value};
|
|
border-color: {$style.value};
|
|
}
|
|
{else}
|
|
.badge-{$id} {
|
|
background: transparent;
|
|
border-color: transparent;
|
|
padding: 0;
|
|
border-radius: 0;
|
|
}
|
|
{/if}
|
|
{/foreach}
|
|
|
|
/* Order statuses */
|
|
{foreach getOrderStatuses() as $id => $status}
|
|
{if $dbcfg.highlight_order_rows == "Y"}
|
|
{if $status.color}
|
|
.status{$id}, .status{$id} td {
|
|
background-color: {$status.color|color_lighter:13};
|
|
}
|
|
|
|
.status{$id}:hover, .status{$id}:hover td {
|
|
background-color: {$status.color|color_lighter:10};
|
|
}
|
|
{/if}
|
|
tr.storno, tr.storno td {
|
|
background-color: #f3cacb;
|
|
}
|
|
|
|
tr.storno:hover, tr.storno:hover td {
|
|
background-color: {'#f3cacb'|color_lighter:-5};
|
|
}
|
|
{/if}
|
|
{if $status.color and $id != 0}
|
|
.badge.status-{$id} {
|
|
background-color: #{$status.color};
|
|
border-color: #{$status.color};
|
|
}
|
|
{/if}
|
|
{/foreach}
|
|
{/block}
|
|
</style>
|
|
{$smarty.block.parent}
|
|
{/block}
|
|
|
|
{block buttons prepend}
|
|
{$sum = $view->getTotalPriceSum()}
|
|
{if $sum}
|
|
<div class="well well-sm m-b-0">
|
|
Cena celkem: {$sum|format_price}
|
|
</div>
|
|
{/if}
|
|
{/block}
|
|
|
|
|
|
<script type="text/javascript">
|
|
{block onready append}
|
|
{block js_autoreload}
|
|
{if !$dbcfg.autoreload_orders_list || $dbcfg.autoreload_orders_list == "Y"}
|
|
var minute_timeout = false;
|
|
var second_timeout = false;
|
|
|
|
setTimeout(function()
|
|
{
|
|
minute_timeout = true;
|
|
if (minute_timeout && second_timeout)
|
|
{
|
|
customRefresh();
|
|
window.location.reload();
|
|
}
|
|
}, 60000);
|
|
|
|
reloader();
|
|
|
|
function reloader()
|
|
{
|
|
resetTimer('orderList', 20000, function()
|
|
{
|
|
second_timeout = true;
|
|
if (minute_timeout && second_timeout)
|
|
{
|
|
customRefresh();
|
|
window.location.reload();
|
|
}
|
|
})
|
|
}
|
|
|
|
$(document).mousedown(function(){
|
|
reloader();
|
|
});
|
|
$(document).keydown(function(){
|
|
reloader();
|
|
});
|
|
{/if}
|
|
{/block}
|
|
{/block}
|
|
</script>
|