{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}
{hook name="order-status.table-header"} {loop type="order-status" name="order-status-list" backend_context="1"} {hook name="order-status.table-row" order_status_id={$ID} } {/loop}
{intl l='Orders status'} {include file='renderer/buttons.html' btn_group=false buttons=[ [ 'type' => 'create', 'class' => 'action-btn', 'title' => {intl l='Add a new order status'}, 'href' => '#creation_dialog', 'auth' => ['resource' => 'admin.order-status'], 'data' => [ 'toggle' => 'modal' ] ] ]}
{intl l='ID'} {intl l='Code'} {intl l='Title'} {intl l='Orders'} {intl l='Position'} {intl l="Actions"}
{$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 } {$buttons = [ [ 'type' => 'edit', 'title' => {intl l='Edit this order status'}, 'href' => {url path="/admin/configuration/order-status/update/%id" id=$ID}, 'auth' => ['resource' => 'admin.order-status'] ] ]} {if !$DELETABLE|default:null} {$buttons[] = [ 'type' => 'delete', 'class' => 'order-status-cancel', 'title' => {intl l='Delete this order status'}, 'href' => '#cancel_order-status_dialog', 'data' => [ 'id' => $ID, 'toggle' => 'modal' ], 'auth' => ['resource' => 'admin.order-status'] ]} {/if} {include file='renderer/buttons.html' buttons=$buttons}
{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}
{$TITLE}
{/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}