From 093b04c2c98df05bcbe66f1547201f118d0cfef5 Mon Sep 17 00:00:00 2001 From: Kavalar Date: Thu, 19 Dec 2024 15:10:29 +0300 Subject: [PATCH] module filters --- kernel/modules/module_shop_client/views/index.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/kernel/modules/module_shop_client/views/index.php b/kernel/modules/module_shop_client/views/index.php index f5c5b79..930793c 100644 --- a/kernel/modules/module_shop_client/views/index.php +++ b/kernel/modules/module_shop_client/views/index.php @@ -30,7 +30,6 @@ $meta['total'] = $module_count; $info_to_table['meta'] = $meta; $info_to_table['data'] = $modules_info; -$info_to_table['filters'] = ['type'/*, 'author'*/]; $table = new ListJsonTable(json_encode($info_to_table, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)); @@ -40,6 +39,16 @@ $table->addAction(function ($row, $url) use ($moduleService) { return \kernel\widgets\IconBtn\IconBtnViewWidget::create(['url' => $url])->run(); }); +$table->columns([ + 'type' => [ + 'filter' => [ + 'class' => \Itguild\Tables\Filter\SelectFilter::class, + 'param' => ['kernel', 'entity'], + 'value' => "kernel" + ], + ] +]); + $table->addAction(function ($row, $url) use ($moduleService){ if ($row['slug'] !== 'kernel') { if ($moduleService->isInstall($row['slug'])) {