{extends file="admin-layout.tpl"} {block name="no-return-functions"} {$admin_current_location = 'configuration'} {/block} {block name="page-title"}{intl l='Thelia Shipping configuration'}{/block} {block name="check-resource"}admin.configuration.shipping-configuration{/block} {block name="check-access"}view{/block} {block name="main-content"}
{module_include location='shipping_configuration_top'}
{module_include location='shipping_configuration_table_header'} {loop name="area-list" type="area" backend_context="1"} {module_include location='shipping_configuration_table_row'} {/loop}
{intl l='Shipping zones management'} {loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.shipping-configuration" access="CREATE"} {/loop}
{intl l="Zone name"} {intl l="Associated countries"}{intl l="Actions"}
{$NAME} {loop name="country-area" type="country" area=$ID backend_context="1" limit="6"} {$TITLE}{if $LOOP_COUNT < $LOOP_TOTAL},{/if} {/loop} {ifloop rel="country-area-more"} {$countries = ''} {loop name="country-area-more" type="country" area=$ID backend_context="1" offset="6"} {$countries = "$countries, $TITLE"} {$ctry_count=$LOOP_COUNT} {/loop} {$countries = ltrim($countries, ', ')} {intl l="%count more..." count={$ctry_count}} {/ifloop}
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.shipping-configuration" access="UPDATE"} {/loop} {loop type="auth" name="can_delete" role="ADMIN" resource="admin.configuration.shipping-configuration" access="DELETE"} {/loop}
{module_include location='shipping_configuration_bottom'}
{* Adding a new Shipping zone *} {* Capture the dialog body, to pass it to the generic dialog *} {capture "creation_dialog"} {form name="thelia.admin.area.create"} {form_hidden_fields form=$form} {form_field form=$form field='success_url'} {* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *} {/form_field} {form_field form=$form field="name"}
{/form_field} {module_include location='shipping_configuration_create_form'} {/form} {/capture} {include file = "includes/generic-create-dialog.html" dialog_id = "creation_dialog" dialog_title = {intl l="Create a new shipping zone"} dialog_body = {$smarty.capture.creation_dialog nofilter} dialog_ok_label = {intl l="Create this shipping zone"} dialog_cancel_label = {intl l="Cancel"} form_action = {url path='/admin/configuration/shipping_configuration/create'} form_enctype = '' form_error_message = $form_error_message } {* Delete confirmation dialog *} {capture "delete_dialog"} {module_include location='shipping_configuration_delete_form'} {/capture} {include file = "includes/generic-confirm-dialog.html" dialog_id = "delete_dialog" dialog_title = {intl l="Delete shipping zone"} dialog_message = {intl l="Do you really want to delete this shipping zone ?"} form_action = {url path='/admin/configuration/shipping_configuration/delete'} form_content = {$smarty.capture.delete_dialog nofilter} } {/block} {block name="javascript-initialization"} {/block} {block name="javascript-last-call"} {module_include location='shipping-configuration-js'} {/block}