diff --git a/core/lib/Thelia/Config/Resources/routing/admin.xml b/core/lib/Thelia/Config/Resources/routing/admin.xml index 18cb81abe..50b622451 100755 --- a/core/lib/Thelia/Config/Resources/routing/admin.xml +++ b/core/lib/Thelia/Config/Resources/routing/admin.xml @@ -401,7 +401,25 @@ \d+ - + + + + + + Thelia\Controller\Admin\ShippingZoneController::indexAction + + + + Thelia\Controller\Admin\ShippingZoneController::createAction + + + + Thelia\Controller\Admin\ShippingZoneController::updateAction + \d+ + + + + diff --git a/core/lib/Thelia/Controller/Admin/ShippingZoneController.php b/core/lib/Thelia/Controller/Admin/ShippingZoneController.php new file mode 100644 index 000000000..8be799a73 --- /dev/null +++ b/core/lib/Thelia/Controller/Admin/ShippingZoneController.php @@ -0,0 +1,46 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Controller\Admin; + +/** + * Class FolderController + * @package Thelia\Controller\Admin + * @author Manuel Raynaud + */ +class ShippingZoneController extends BaseAdminController +{ + public function indexAction() + { + if (null !== $response = $this->checkAuth("admin.shipping-zones.view")) return $response; + return $this->render("shipping-zones", array("display_shipping_zone" => 20)); + } + + public function updateAction($shipping_zones_id) + { + + return $this->render("shipping-zones-edit", array( + "shipping_zones_id" => $shipping_zones_id + )); + } +} \ No newline at end of file diff --git a/templates/admin/default/shipping-zones-edit.html b/templates/admin/default/shipping-zones-edit.html new file mode 100644 index 000000000..cdb9886bf --- /dev/null +++ b/templates/admin/default/shipping-zones-edit.html @@ -0,0 +1,111 @@ +{extends file="admin-layout.tpl"} + +{block name="page-title"}{intl l='Edit a shipping zone'}{/block} + +{block name="check-permissions"}admin.configuration.shipping-zones.edit{/block} + +{block name="main-content"} +
+ +
+ + + +
+
+
+ +
+ {intl l='Edit shipping zone %title' title=$TITLE} +
+ +
+
+ +
+ + +
+ + + + +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + +
{intl l="Zones"}{intl l="Actions"}
France + + + +
Zone 1 + + + +
Zone 2 + + + +
+
+
+ +
+
+
+ +
+
+ + {* Delete related content confirmation dialog *} + + {capture "delete_zone_dialog"} + + {/capture} + + {include + file = "includes/generic-confirm-dialog.html" + + dialog_id = "delete_zone_dialog" + dialog_title = {intl l="Remove zone"} + dialog_message = {intl l="Do you really want to remove this zone ?"} + + form_action = {url path=''} + form_content = {$smarty.capture.delete_zone_dialog nofilter} + } +{/block} \ No newline at end of file diff --git a/templates/admin/default/shipping-zones.html b/templates/admin/default/shipping-zones.html new file mode 100644 index 000000000..7d9af91fe --- /dev/null +++ b/templates/admin/default/shipping-zones.html @@ -0,0 +1,119 @@ +{extends file="admin-layout.tpl"} + +{block name="page-title"}{intl l='Thelia Shipping zones'}{/block} + +{block name="check-permissions"}admin.configuration.shipping-zones.view{/block} + +{block name="main-content"} +
+ +
+ + + + {module_include location='shipping_zones_top'} + +
+
+
+ + + + + + + {module_include location='shipping_zones_table_header'} + + + + + + + + + + {module_include location='shipping_zones_table_row'} + + + + + + + {module_include location='shipping_zones_table_row'} + + + + + + + {module_include location='shipping_zones_table_row'} + + + + +
+ {intl l='Thelia Shipping zones'} +
{intl l="Name"}{intl l="Actions"}
So Colissimo + {if ! $SECURED} +
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"} + + {/loop} +
+ {else} + + {/if} +
Chronopost + {if ! $SECURED} +
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"} + + {/loop} +
+ {else} + + {/if} +
Kiala + {if ! $SECURED} +
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"} + + {/loop} +
+ {else} + + {/if} +
+
+
+
+ + {module_include location='shipping_zones_bottom'} + +
+
+ + {* Delete confirmation dialog *} + + {capture "delete_dialog"} + + + {module_include location='shipping_zones_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-zones/delete'} + form_content = {$smarty.capture.delete_dialog nofilter} + } +{/block} \ No newline at end of file