Restored previous version

This commit is contained in:
Franck Allimant
2014-04-18 20:18:16 +02:00
parent 5195e5a16a
commit e6ec8f18ed

View File

@@ -1,211 +1,231 @@
{extends file="admin-layout.tpl"} {extends file="admin-layout.tpl"}
{block name="page-title"}{intl l='Orders'}{/block} {block name="page-title"}{intl l='Orders'}{/block}
{block name="check-resource"}admin.order{/block} {block name="check-resource"}admin.order{/block}
{block name="check-access"}view{/block} {block name="check-access"}view{/block}
{block name="main-content"} {block name="main-content"}
{assign order_page {$smarty.get.page|default:1}} {assign order_page {$smarty.get.page|default:1}}
{assign status_filter {$smarty.get.status|assertType:'IntListType'}} {assign status_filter {$smarty.get.status|assertType:'IntListType'}}
<div class="orders"> <div class="orders">
<div id="wrapper" class="container"> <div id="wrapper" class="container">
<ul class="breadcrumb"> <ul class="breadcrumb">
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li> <li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li><a href="#">{intl l="Orders"}</a></li> <li><a href="#">{intl l="Orders"}</a></li>
</ul> </ul>
{module_include location='orders_top'} {module_include location='orders_top'}
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="general-block-decorator"> <div class="general-block-decorator">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned"> <table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix"> <caption class="clearfix">
{intl l='Orders'} {intl l='Orders'}
</caption> </caption>
{ifloop rel="order-list"} {ifloop rel="order-list"}
<thead> <thead>
<tr> <tr>
<th class="object-title"> <th class="object-title">
{admin_sortable_header {admin_sortable_header
current_order=$orders_order current_order=$orders_order
order='id' order='id'
reverse_order='id-reverse' reverse_order='id-reverse'
path={url path='/admin/orders'} path={url path='/admin/orders'}
request_parameter_name='orders_order' request_parameter_name='orders_order'
label="{intl l='ID'}" label="{intl l='ID'}"
} </th> } </th>
<th class="object-title"> <th class="object-title">
{admin_sortable_header {admin_sortable_header
current_order=$orders_order current_order=$orders_order
order='reference' order='reference'
reverse_order='reference-reverse' reverse_order='reference-reverse'
path={url path='/admin/orders'} path={url path='/admin/orders'}
request_parameter_name='orders_order' request_parameter_name='orders_order'
label="{intl l='Reference'}" label="{intl l='Reference'}"
} </th> } </th>
<th class="object-title"> <th class="object-title">
{admin_sortable_header {admin_sortable_header
current_order=$orders_order current_order=$orders_order
order='create-date' order='create-date'
reverse_order='create-date-reverse' reverse_order='create-date-reverse'
path={url path='/admin/orders'} path={url path='/admin/orders'}
request_parameter_name='orders_order' request_parameter_name='orders_order'
label="{intl l='Date & Hour'}" label="{intl l='Date & Hour'}"
} </th> } </th>
<th class="object-title"> <th class="object-title">
{admin_sortable_header {admin_sortable_header
current_order=$orders_order current_order=$orders_order
order='company' order='company'
reverse_order='company-reverse' reverse_order='company-reverse'
path={url path='/admin/orders'} path={url path='/admin/orders'}
request_parameter_name='orders_order' request_parameter_name='orders_order'
label="{intl l='Company'}" label="{intl l='Company'}"
} </th> } </th>
<th class="object-title"> <th class="object-title">
{admin_sortable_header {admin_sortable_header
current_order=$orders_order current_order=$orders_order
order='customer-name' order='customer-name'
reverse_order='customer-name-reverse' reverse_order='customer-name-reverse'
path={url path='/admin/orders'} path={url path='/admin/orders'}
request_parameter_name='orders_order' request_parameter_name='orders_order'
label="{intl l='Cutomer Name'}" label="{intl l='Cutomer Name'}"
} </th> } </th>
<th class="object-title text-right">{intl l='Amount'}</th> <th class="object-title text-right">{intl l='Amount'}</th>
<th class="object-title text-center"> <th class="object-title text-center">
{admin_sortable_header {admin_sortable_header
current_order=$orders_order current_order=$orders_order
order='status' order='status'
reverse_order='status-reverse' reverse_order='status-reverse'
path={url path='/admin/orders'} path={url path='/admin/orders'}
request_parameter_name='orders_order' request_parameter_name='orders_order'
label="{intl l='Status'}" label="{intl l='Status'}"
} </th> } </th>
{module_include location='orders_table_header'} {module_include location='orders_table_header'}
<th class="actions">{intl l="Actions"}</th> <th class="actions">{intl l="Actions"}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{loop type="order" name="order-list" customer="*" order=$orders_order backend_context="1" page={$order_page} limit={#max_displayed_orders#} status=$status_filter|default:'*'} {loop type="order" name="order-list" customer="*" order=$orders_order backend_context="1" page={$order_page} limit={#max_displayed_orders#} status=$status_filter|default:'*'}
{loop type="currency" name="order-currency" id=$CURRENCY} {loop type="currency" name="order-currency" id=$CURRENCY}
{$orderCurrency=$SYMBOL} {$orderCurrency=$SYMBOL}
{/loop} {/loop}
{loop type="order_address" name="order-invoice-address" id=$INVOICE_ADDRESS} {loop type="order_address" name="order-invoice-address" id=$INVOICE_ADDRESS}
{assign "orderInvoiceFirstName" $FIRSTNAME} {assign "orderInvoiceFirstName" $FIRSTNAME}
{assign "orderInvoiceLastName" $LASTNAME} {assign "orderInvoiceLastName" $LASTNAME}
{assign "orderInvoiceCompany" $COMPANY} {assign "orderInvoiceCompany" $COMPANY}
{/loop} {/loop}
{loop type="order-status" name="order-status" id=$STATUS} {loop type="order-status" name="order-status" id=$STATUS}
{assign "orderStatus" $TITLE} {assign "orderStatus" $TITLE}
{assign "orderStatusLabel" "order_$CODE"} {assign "orderStatusLabel" "order_$CODE"}
{/loop} {/loop}
<tr> <tr>
<td><a href="{url path="/admin/order/update/$ID"}">{$ID}</a></td> <td><a href="{url path="/admin/order/update/$ID"}">{$ID}</a></td>
<td><a href="{url path="/admin/order/update/$ID"}">{$REF}</a></td> <td><a href="{url path="/admin/order/update/$ID"}">{$REF}</a></td>
<td>{format_date date=$CREATE_DATE}</td> <td>{format_date date=$CREATE_DATE}</td>
<td>{$orderInvoiceCompany}</td> <td>{$orderInvoiceCompany}</td>
<td><a href="{url path='/admin/customer/update' customer_id=$CUSTOMER}">{$orderInvoiceFirstName|ucwords} {$orderInvoiceLastName|upper}</a></td> <td><a href="{url path='/admin/customer/update' customer_id=$CUSTOMER}">{$orderInvoiceFirstName|ucwords} {$orderInvoiceLastName|upper}</a></td>
<td class="text-right">{format_money number=$TOTAL_TAXED_AMOUNT symbol=$orderCurrency}</td> <td class="text-right">{format_money number=$TOTAL_TAXED_AMOUNT symbol=$orderCurrency}</td>
<td class="text-center"><span class="label label-{#$orderStatusLabel#}">{$orderStatus}</span></td> <td class="text-center"><span class="label label-{#$orderStatusLabel#}">{$orderStatus}</span></td>
{module_include location='orders_table_row'} {module_include location='orders_table_row'}
<td> <td>
<div class="btn-group"> <div class="btn-group">
{loop type="auth" name="can_change" role="ADMIN" resource="admin.order" access="UPDATE"} {loop type="auth" name="can_change" role="ADMIN" resource="admin.order" access="UPDATE"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a> <a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{if $STATUS !== 5} {if $STATUS !== 5}
<a class="btn btn-default btn-xs order-cancel" title="{intl l='Cancel this order'}" href="#cancel_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-remove-sign"></span></a> <a class="btn btn-default btn-xs order-cancel" title="{intl l='Cancel this order'}" href="#cancel_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-remove-sign"></span></a>
{/if} {/if}
{/loop} {/loop}
</div> </div>
</td> </td>
</tr> </tr>
{/loop} {/loop}
</tbody> </tbody>
<tfoot> <tfoot>
<tr> <tr>
<td colspan="7"> <td colspan="7">
{include
file = "includes/pagination.html" <div class="text-center">
<ul class="pagination pagination-centered">
loop_ref = "order-list" {if $order_page != 1}
max_page_count = 10 <li><a href="{url path="/admin/orders" page=1 orders_order=$orders_order}">&laquo;</a></li>
page_url = "{url path="/admin/orders" orders_order=$orders_order}" {else}
} <li class="disabled"><a href="#">&laquo;</a></li>
</td> {/if}
</tr>
</tfoot> {pageloop rel="order-list"}
{if $PAGE != $CURRENT}
{/ifloop} <li><a href="{url path="/admin/orders" page=$PAGE orders_order=$orders_order}">{$PAGE}</a></li>
</table> {else}
</div> <li class="active"><a href="#">{$PAGE}</a></li>
</div> {/if}
</div>
</div>
{/pageloop}
{module_include location='orders_bottom'} {if $PAGE == $LAST && $LAST != $CURRENT}
<li><a href="{url path="/admin/orders" page=$PAGE orders_order=$orders_order}">&raquo;</a></li>
</div> {else}
</div> <li class="disabled"><a href="#">&raquo;</a></li>
{/if}
{* Cancel order confirmation dialog *} </ul>
</div>
{capture "cancel_order_dialog"}
<input type="hidden" name="order_page" value="{$order_page}"> </td>
<input type="hidden" name="order_id" id="cancel_order_id" /> </tr>
<input type="hidden" name="status_id" value="5" /> </tfoot>
{/capture}
{/ifloop}
{include
file = "includes/generic-confirm-dialog.html" </table>
</div>
dialog_id = "cancel_order_dialog" </div>
dialog_title = {intl l="Delete an order"} </div>
dialog_message = {intl l="Do you really want to cancel this order ?"} </div>
form_action = {url path='/admin/order/update/status'} {module_include location='orders_bottom'}
form_content = {$smarty.capture.cancel_order_dialog nofilter}
form_id = "cancel-order-form" </div>
} </div>
{/block} {* Cancel order confirmation dialog *}
{block name="javascript-initialization"} {capture "cancel_order_dialog"}
<input type="hidden" name="order_page" value="{$order_page}">
<script type="text/javascript"> <input type="hidden" name="order_id" id="cancel_order_id" />
$(".order-cancel").click(function(){ <input type="hidden" name="status_id" value="5" />
$("#cancel_order_id").val($(this).attr("data-id")); {/capture}
});
</script> {include
file = "includes/generic-confirm-dialog.html"
{/block}
dialog_id = "cancel_order_dialog"
{block name="javascript-last-call"} dialog_title = {intl l="Delete an order"}
{module_include location='orders-js'} dialog_message = {intl l="Do you really want to cancel this order ?"}
form_action = {url path='/admin/order/update/status'}
form_content = {$smarty.capture.cancel_order_dialog nofilter}
form_id = "cancel-order-form"
}
{/block}
{block name="javascript-initialization"}
<script type="text/javascript">
$(".order-cancel").click(function(){
$("#cancel_order_id").val($(this).attr("data-id"));
});
</script>
{/block}
{block name="javascript-last-call"}
{module_include location='orders-js'}
{/block} {/block}