diff --git a/core/lib/Thelia/Config/Resources/routing/admin.xml b/core/lib/Thelia/Config/Resources/routing/admin.xml index e6a545297..55dc7b583 100755 --- a/core/lib/Thelia/Config/Resources/routing/admin.xml +++ b/core/lib/Thelia/Config/Resources/routing/admin.xml @@ -551,6 +551,14 @@ Thelia\Controller\Admin\AdminProfileController::defaultAction + + + + + + Thelia\Controller\Admin\TaxRuleController::defaultAction + + diff --git a/core/lib/Thelia/Controller/Admin/TaxRuleController.php b/core/lib/Thelia/Controller/Admin/TaxRuleController.php new file mode 100644 index 000000000..ca51b4ac9 --- /dev/null +++ b/core/lib/Thelia/Controller/Admin/TaxRuleController.php @@ -0,0 +1,39 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Controller\Admin; + +/** + * Class TaxRuleController + * @package Thelia\Controller\Admin + * @author Manuel Raynaud + */ +class TaxRuleController extends BaseAdminController +{ + public function defaultAction() + { + if (null !== $response = $this->checkAuth("admin.taxes-rules.view")) return $response; + return $this->render("taxes-rules", array("display_taxes_rules" => 20)); + } + +} \ No newline at end of file diff --git a/templates/admin/default/configuration.html b/templates/admin/default/configuration.html index 50e9296ac..85d72e821 100644 --- a/templates/admin/default/configuration.html +++ b/templates/admin/default/configuration.html @@ -58,6 +58,13 @@ {/loop} + {loop type="auth" name="pcc6" roles="ADMIN" permissions="admin.configuration.taxe-rules"} + + {intl l='Taxes rules'} + + + {/loop} + {module_include location='catalog_configuration_bottom'} diff --git a/templates/admin/default/taxes-rules.html b/templates/admin/default/taxes-rules.html new file mode 100644 index 000000000..a0284d107 --- /dev/null +++ b/templates/admin/default/taxes-rules.html @@ -0,0 +1,90 @@ +{extends file="admin-layout.tpl"} + +{block name="page-title"}{intl l='Taxes rules'}{/block} + +{block name="check-permissions"}admin.taxes-rules.view{/block} + +{block name="main-content"} + + + + + + + {intl l="Home"} + {intl l="Configuration"} + {intl l="Taxes rules"} + + + + {module_include location='taxes_rules_top'} + + + + + + + + {intl l="Taxes rules"} + {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.taxes-rules.create"} + + + + {/loop} + + + + {intl l="Name"} + {intl l="Description"} + {intl l="Actions"} + + + + + Eco taxe + Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consequatur, aperiam, voluptatibus odio numquam adipisci! + + + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.taxes-rules.change"} + + {/loop} + + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.taxes-rules.delete"} + + {/loop} + + + + + + + + + + + {module_include location='taxes_rules_bottom'} + + + + +{* -- Delete category confirmation dialog ----------------------------------- *} + +{capture "tax_rule_delete_dialog"} + + + {module_include location='tax_rule_delete_form'} + +{/capture} + +{include + file = "includes/generic-confirm-dialog.html" + + dialog_id = "tax_rule_delete_dialog" + dialog_title = {intl l="Delete tax rule"} + dialog_message = {intl l="Do you really want to delete this tax rule ?"} + + form_action = {url path='/admin/configuration/taxes_rules/delete'} + form_content = {$smarty.capture.tax_rule_delete_dialog nofilter} +} + +{/block} \ No newline at end of file