Files
sterivein/templates/backOffice/default/orders.html
2014-05-30 11:26:32 +02:00

216 lines
9.8 KiB
HTML

{extends file="admin-layout.tpl"}
{block name="no-return-functions"}
{$admin_current_location = 'order'}
{/block}
{block name="page-title"}{intl l='Orders'}{/block}
{block name="check-resource"}admin.order{/block}
{block name="check-access"}view{/block}
{block name="main-content"}
{assign order_page {$smarty.get.page|default:1}}
{assign status_filter {$smarty.get.status|assertType:'IntListType'}}
<div class="orders">
<div id="wrapper" class="container">
<ul class="breadcrumb">
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li><a href="#">{intl l="Orders"}</a></li>
</ul>
{module_include location='orders_top'}
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Orders'}
</caption>
{ifloop rel="order-list"}
<thead>
<tr>
<th class="object-title">
{admin_sortable_header
current_order=$orders_order
order='id'
reverse_order='id-reverse'
path={url path='/admin/orders'}
request_parameter_name='orders_order'
label="{intl l='ID'}"
} </th>
<th class="object-title">
{admin_sortable_header
current_order=$orders_order
order='reference'
reverse_order='reference-reverse'
path={url path='/admin/orders'}
request_parameter_name='orders_order'
label="{intl l='Reference'}"
} </th>
<th class="object-title">
{admin_sortable_header
current_order=$orders_order
order='create-date'
reverse_order='create-date-reverse'
path={url path='/admin/orders'}
request_parameter_name='orders_order'
label="{intl l='Date & Hour'}"
} </th>
<th class="object-title">
{admin_sortable_header
current_order=$orders_order
order='company'
reverse_order='company-reverse'
path={url path='/admin/orders'}
request_parameter_name='orders_order'
label="{intl l='Company'}"
} </th>
<th class="object-title">
{admin_sortable_header
current_order=$orders_order
order='customer-name'
reverse_order='customer-name-reverse'
path={url path='/admin/orders'}
request_parameter_name='orders_order'
label="{intl l='Cutomer Name'}"
} </th>
<th class="object-title text-right">{intl l='Amount'}</th>
<th class="object-title text-center">
{admin_sortable_header
current_order=$orders_order
order='status'
reverse_order='status-reverse'
path={url path='/admin/orders'}
request_parameter_name='orders_order'
label="{intl l='Status'}"
} </th>
{module_include location='orders_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<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="currency" name="order-currency" id=$CURRENCY}
{$orderCurrency=$SYMBOL}
{/loop}
{loop type="order_address" name="order-invoice-address" id=$INVOICE_ADDRESS}
{assign "orderInvoiceFirstName" $FIRSTNAME}
{assign "orderInvoiceLastName" $LASTNAME}
{assign "orderInvoiceCompany" $COMPANY}
{/loop}
{loop type="order-status" name="order-status" id=$STATUS}
{assign "orderStatus" $TITLE}
{assign "orderStatusLabel" "order_$CODE"}
{/loop}
<tr>
<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>{format_date date=$CREATE_DATE}</td>
<td>{$orderInvoiceCompany}</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-center"><span class="label label-{#$orderStatusLabel#}">{$orderStatus}</span></td>
{module_include location='orders_table_row'}
<td>
<div class="btn-group">
{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>
{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>
{/if}
{/loop}
</div>
</td>
</tr>
{/loop}
</tbody>
<tfoot>
<tr>
<td colspan="7">
{include
file = "includes/pagination.html"
loop_ref = "order-list"
max_page_count = 10
page_url = "{url path="/admin/orders" orders_order=$orders_order}"
}
</td>
</tr>
</tfoot>
{/ifloop}
</table>
</div>
</div>
</div>
</div>
{module_include location='orders_bottom'}
</div>
</div>
{* Cancel order confirmation dialog *}
{capture "cancel_order_dialog"}
<input type="hidden" name="order_page" value="{$order_page}">
<input type="hidden" name="order_id" id="cancel_order_id" />
<input type="hidden" name="status_id" value="5" />
{/capture}
{include
file = "includes/generic-confirm-dialog.html"
dialog_id = "cancel_order_dialog"
dialog_title = {intl l="Delete an order"}
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}