diff --git a/Admin/Routes/Web/Api.php b/Admin/Routes/Web/Api.php index d9bd5e1..427d05d 100755 --- a/Admin/Routes/Web/Api.php +++ b/Admin/Routes/Web/Api.php @@ -18,7 +18,7 @@ use phpOMS\Account\PermissionType; use phpOMS\Router\RouteVerb; return [ - '^.*/tag$' => [ + '^.*/tag(\?.*|$)$' => [ [ 'dest' => '\Modules\Tag\Controller\ApiController:apiTagCreate', 'verb' => RouteVerb::PUT, @@ -66,7 +66,7 @@ return [ ], ], ], - '^.*/tag/l11n$' => [ + '^.*/tag/l11n(\?.*|$)$' => [ [ 'dest' => '\Modules\Tag\Controller\ApiController:apiTagL11nCreate', 'verb' => RouteVerb::PUT, @@ -74,7 +74,7 @@ return [ 'active' => true, 'permission' => [ 'module' => ApiController::NAME, - 'type' => PermissionType::READ, + 'type' => PermissionType::CREATE, 'state' => PermissionCategory::TAG, ], ], @@ -85,7 +85,18 @@ return [ 'active' => true, 'permission' => [ 'module' => ApiController::NAME, - 'type' => PermissionType::READ, + 'type' => PermissionType::MODIFY, + 'state' => PermissionCategory::TAG, + ], + ], + [ + 'dest' => '\Modules\Tag\Controller\ApiController:apiTagL11nDelete', + 'verb' => RouteVerb::DELETE, + 'csrf' => true, + 'active' => true, + 'permission' => [ + 'module' => ApiController::NAME, + 'type' => PermissionType::DELETE, 'state' => PermissionCategory::TAG, ], ], diff --git a/Theme/Backend/tag-view.tpl.php b/Theme/Backend/tag-view.tpl.php index f9c9bad..673f609 100644 --- a/Theme/Backend/tag-view.tpl.php +++ b/Theme/Backend/tag-view.tpl.php @@ -53,10 +53,13 @@ echo $this->data['nav']->render(); ?>
-
+ data-add-tpl="#tagTable tbody .oms-add-tpl-tag" + >
getHtml('Tag'); ?>