{extends file="admin-layout.tpl"} {block name="no-return-functions"} {$admin_current_location = 'order-status'} {/block} {block name="page-title"}{intl l='Order status'}{/block} {block name="check-resource"}admin.order-status{/block} {block name="check-access"}view{/block} {block name="main-content"}
{hook name="order-status.top"}
{if ! empty($general_error) }
{$general_error}
{/if}

{intl l='Orders status'}
{intl l='ID'} | {intl l='Code'} | {intl l='Title'} | {intl l='Orders'} | {intl l='Position'} {hook name="order-status.table-header"} | {intl l="Actions"}
--- | --- | --- | --- | --- | ---
{loop type="order-status" name="order-status-list" backend_context="1"}
{$ID} | {$CODE} | {$TITLE} | {count type="order" name="order" customer="*" backend_context="1" status=$ID} | {admin_position_block resource="admin.order-status" access="UPDATE" path={url path='admin/configuration/order-status/update-position' order_status_id=$ID} url_parameter="order_status_id" in_place_edit_class="orderStatusPositionChange" position=$POSITION id=$ID } {hook name="order-status.table-row" order_status_id={$ID} } | {loop type="auth" name="can_change" role="ADMIN" resource="admin.order-status" access="UPDATE"} {if !$DELETABLE} {/if} {/loop}
{/loop}

{hook name="order-status.bottom"}
{form name="thelia.admin.order-status.creation"} {* Capture the dialog body, to pass it to the generic dialog *} {capture "creation_dialog"} {form_hidden_fields exclude="locale"} {render_form_field field="success_url" value={url path='/admin/configuration/order-status/update/_ID_'}} {custom_render_form_field field="title"} {loop type="lang" name="default-lang" default_only="1"} {* Switch edition to the current locale *} {render_form_field field="locale" value=$LOCALE}
{/loop} {/custom_render_form_field}
{custom_render_form_field field="code"}
{/custom_render_form_field}
{custom_render_form_field field="color"}
{/custom_render_form_field}
{hook name='brand.create-form' location='brand_create_form'} {/capture} {include file = "includes/generic-create-dialog.html" dialog_id = "creation_dialog" dialog_title = {intl l="Create a new order status"} dialog_body = {$smarty.capture.creation_dialog nofilter} dialog_ok_label = {intl l="Create this order status"} form_action = {url path="/admin/configuration/order-status/create"} form_enctype = {form_enctype} form_error_message = $form_error_message } {/form} {* Cancel order confirmation dialog *} {capture "cancel_order_status_dialog"} {/capture} {include file = "includes/generic-confirm-dialog.html" dialog_id = "cancel_order-status_dialog" dialog_title = {intl l="Delete an order status"} dialog_message = {intl l="Do you really want to delete this order status ?"} form_action = {token_url path='/admin/configuration/order-status/delete'} form_content = {$smarty.capture.cancel_order_status_dialog nofilter} form_id = "cancel-order-status-form" } {/block} {block name="javascript-initialization"} {javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'}
{/javascripts}
{/block} {block name="javascript-last-call"} {hook name="order-status.js"} {/block}