Fixed and improved shipping zones management
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration/shipping_configuration'}">{intl l="Shipping configuration"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration/shipping_configuration'}">{intl l="Shipping zones management"}</a></li>
|
||||
</ul>
|
||||
|
||||
{module_include location='shipping_configuration_top'}
|
||||
@@ -24,37 +24,54 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l='Thelia Shipping configuration'}
|
||||
{intl l='Shipping zones management'}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.shipping-configuration" access="CREATE"}
|
||||
<a class="btn btn-default btn-primary pull-right" title="{intl l='Add a new shipping configuration'}" href="#creation_dialog" data-toggle="modal">
|
||||
<a class="btn btn-default btn-primary pull-right" title="{intl l='Add a new shipping zone'}" href="#creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l="Description"}</th>
|
||||
<th>{intl l="Zone name"}</th>
|
||||
<th>{intl l="Associated countries"}</th>
|
||||
|
||||
{module_include location='shipping_configuration_table_header'}
|
||||
|
||||
<th>{intl l="Actions"}</th>
|
||||
<th class="text-center">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="area-list" type="area" backend_context="1"}
|
||||
<tr>
|
||||
<td><a href="{url path="/admin/configuration/shipping_configuration/update/$ID"}">{$NAME}</a></td>
|
||||
<td><a href="{url path="/admin/configuration/shipping_configuration/update/$ID"}">{$NAME}</a></td>
|
||||
<td>
|
||||
{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, ', ')}
|
||||
|
||||
<span class="badge" title="{$countries}">{intl l="%count more..." count=$ctry_count}</span>
|
||||
{/ifloop}
|
||||
</td>
|
||||
|
||||
{module_include location='shipping_configuration_table_row'}
|
||||
|
||||
<td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.shipping-configuration" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs area-configuration-change" title="{intl l='Change this shipping configuration'}" href="{url path="/admin/configuration/shipping_configuration/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
<a class="btn btn-default btn-xs area-configuration-change" title="{intl l='Change this shipping zone'}" href="{url path="/admin/configuration/shipping_configuration/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
{loop type="auth" name="can_delete" role="ADMIN" resource="admin.configuration.shipping-configuration" access="DELETE"}
|
||||
<a class="btn btn-default btn-xs area-configuration-delete" title="{intl l='Delete this shipping configuration'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
<a class="btn btn-default btn-xs area-configuration-delete" title="{intl l='Delete this shipping zone'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
@@ -72,7 +89,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* Adding a new Shipping configuration *}
|
||||
{* Adding a new Shipping zone *}
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{capture "creation_dialog"}
|
||||
@@ -86,7 +103,7 @@
|
||||
{form_field form=$form field="name"}
|
||||
<div class="form-group">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="Name"}" placeholder="{intl l='Shipping configuration name'}">
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="Name"}" placeholder="{intl l='Shipping zone name'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
@@ -99,10 +116,10 @@
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "creation_dialog"
|
||||
dialog_title = {intl l="Create a new shipping configuration"}
|
||||
dialog_title = {intl l="Create a new shipping zone"}
|
||||
dialog_body = {$smarty.capture.creation_dialog nofilter}
|
||||
|
||||
dialog_ok_label = {intl l="Create this shipping configuration"}
|
||||
dialog_ok_label = {intl l="Create this shipping zone"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
|
||||
form_action = {url path='/admin/configuration/shipping_configuration/create'}
|
||||
@@ -123,8 +140,8 @@
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "delete_dialog"
|
||||
dialog_title = {intl l="Delete shipping configuration"}
|
||||
dialog_message = {intl l="Do you really want to delete this shipping configuration ?"}
|
||||
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}
|
||||
|
||||
Reference in New Issue
Block a user