From 09ecd719b8a0b61dabbe99ce9eea67338ebce097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Cmit=20Tun=C3=A7?= Date: Wed, 29 Apr 2026 06:22:02 +0300 Subject: [PATCH] feat: add types2.blade.php view for module and permission management --- resources/views/admin/new/types2.blade.php | 141 ++++++++++++--------- 1 file changed, 79 insertions(+), 62 deletions(-) diff --git a/resources/views/admin/new/types2.blade.php b/resources/views/admin/new/types2.blade.php index 856afdc..76248c7 100644 --- a/resources/views/admin/new/types2.blade.php +++ b/resources/views/admin/new/types2.blade.php @@ -293,71 +293,78 @@ { caption: "{{__('Permissions')}}", columns: [ - { dataField: "full_control", caption: "Full", cellTemplate: renderPermissionCell }, - { dataField: "write", caption: "Write", cellTemplate: renderPermissionCell }, - { dataField: "read", caption: "Read", cellTemplate: renderPermissionCell }, - { dataField: "modify", caption: "Mod", cellTemplate: renderPermissionCell } + { dataField: "full_control", caption: "Full", width: 100, cellTemplate: renderPermissionCell }, + { dataField: "write", caption: "Write", width: 100, cellTemplate: renderPermissionCell }, + { dataField: "read", caption: "Read", width: 100, cellTemplate: renderPermissionCell }, + { dataField: "modify", caption: "Mod", width: 100, cellTemplate: renderPermissionCell } ] }, { - type: "buttons", - width: 150, - buttons: [ - { - icon: "link", - hint: "Go to Link", - onClick: function(e) { - window.open("{{ url('admin/types') }}/" + e.row.data.slug, "_blank"); - } - }, - { - icon: "key", - hint: "General Permissions", - onClick: function(e) { - const data = e.row.data; - // Default to Full Control modal as a starting point, or we could add a multi-edit modal - window.openLevelEdit(data.id, 'full_control', data.full_control, data.title, data.icon); - } - }, - { - icon: "preferences", - hint: "Specific Permissions", - onClick: function(e) { - const data = e.row.data; - const $btn = $(" + + + `); + + $dropdown.find('.opt-gen-perms').on('click', function() { + window.openLevelEdit(data.id, 'full_control', data.full_control, data.title, data.icon); + }); + + $dropdown.find('.opt-spec-perms').on('click', function() { + const $btn = $("