From a3f97456bc6fd313bca7bb89b20698c54cc52f35 Mon Sep 17 00:00:00 2001 From: Kavalar Date: Wed, 20 Nov 2024 13:41:31 +0300 Subject: [PATCH] show img at menu --- kernel/modules/menu/views/index.php | 3 +++ kernel/modules/menu/views/view.php | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/kernel/modules/menu/views/index.php b/kernel/modules/menu/views/index.php index 35db706..0cad83d 100644 --- a/kernel/modules/menu/views/index.php +++ b/kernel/modules/menu/views/index.php @@ -23,6 +23,9 @@ $table->columns([ if ($data == 0) return null; return Menu::find($data)->label; }), + 'icon_file' => function ($data) { + return $data ? "" : ""; + } ]); $table->beforePrint(function () { return IconBtnCreateWidget::create(['url' => '/admin/settings/menu/create'])->run(); diff --git a/kernel/modules/menu/views/view.php b/kernel/modules/menu/views/view.php index 00c404c..ecd3104 100644 --- a/kernel/modules/menu/views/view.php +++ b/kernel/modules/menu/views/view.php @@ -26,7 +26,10 @@ $table->rows([ 'parent_id' => (function ($data) { if ($data == 0) return null; return Menu::find($data)->label; - }) + }), + 'icon_file' => function ($data) { + return $data ? "" : ""; + } ]); $table->create(); $table->render(); \ No newline at end of file