Compare commits

..

No commits in common. "9cb82deaf8c1c3c154a73e7e6f096e26bf156a0a" and "0bfeabce33cead33338f7636db2dd401e0973711" have entirely different histories.

25 changed files with 120 additions and 338 deletions

View File

@ -13,7 +13,7 @@
<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700,800,900" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="<?=$resources?>/css/style.css">
</head>
<body>

View File

@ -5,4 +5,9 @@ namespace app\modules\tag\controllers;
class TagController extends \kernel\app_modules\tag\controllers\TagController
{
public function actionByEntity()
{
// TODO
}
}

View File

@ -13,7 +13,7 @@
<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700,800,900" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="<?=$resources?>/css/style.css">
</head>
<body>

View File

@ -3,6 +3,9 @@
* @var $json string
*/
use kernel\models\Option;
use kernel\widgets\ActionButtonWidget;
$table = new \Itguild\Tables\ListJsonTable($json);
$table->columns([
@ -11,15 +14,19 @@ $table->columns([
}
]);
$table->addAction(function ($row, $url){
$path = $row['path'];
$active_admin_theme = \kernel\modules\option\service\OptionService::getItem('active_admin_theme');
$btn = ActionButtonWidget::create([
'btn_type' => "primary",
'label' => "Активировать",
'url' => "$url/activate/?p=$path",
])->run();
if ($row['path'] === $active_admin_theme){
return "Активна";
} else {
$url = "$url/activate/?p=" . $row['path'];
return \kernel\widgets\IconBtn\IconBtnActivateWidget::create(['url' => $url])->run();
if ($path === $active_admin_theme){
$btn = "Активна";
}
return $btn;
});
$table->create();
$table->render();

View File

@ -23,7 +23,8 @@ $table->rows([
}
]);
$table->beforePrint(function () {
return \kernel\widgets\IconBtn\IconBtnListWidget::create(['url' => '/admin/settings/admin-themes'])->run();
$btn = PrimaryBtn::create("Список", "/admin/settings/admin-themes")->fetch();
return $btn;
});
$table->create();
$table->render();

View File

@ -6,11 +6,11 @@
use Itguild\EloquentTable\EloquentDataProvider;
use Itguild\EloquentTable\ListEloquentTable;
use kernel\IGTabel\action_column\DeleteActionColumn;
use kernel\IGTabel\action_column\EditActionColumn;
use kernel\IGTabel\action_column\ViewActionColumn;
use kernel\IGTabel\btn\PrimaryBtn;
use kernel\models\Menu;
use kernel\widgets\IconBtn\IconBtnCreateWidget;
use kernel\widgets\IconBtn\IconBtnDeleteWidget;
use kernel\widgets\IconBtn\IconBtnEditWidget;
use kernel\widgets\IconBtn\IconBtnViewWidget;
$table = new ListEloquentTable(new EloquentDataProvider(Menu::class, [
'currentPage' => $page_number,
@ -25,17 +25,11 @@ $table->columns([
}),
]);
$table->beforePrint(function () {
return IconBtnCreateWidget::create(['url' => '/admin/settings/menu/create'])->run();
});
$table->addAction(function($row) {
return IconBtnViewWidget::create(['url' => '/admin/settings/menu/view/' . $row['id']])->run();
});
$table->addAction(function($row) {
return IconBtnEditWidget::create(['url' => '/admin/settings/menu/update/' . $row['id']])->run();
});
$table->addAction(function($row) {
return IconBtnDeleteWidget::create(['url' => '/admin/settings/menu/delete/' . $row['id']])->run();
return PrimaryBtn::create("Создать", "/admin/settings/menu/create")->fetch();
//return (new PrimaryBtn("Создать", "/admin/user/create"))->fetch();
});
$table->addAction(ViewActionColumn::class);
$table->addAction(EditActionColumn::class);
$table->addAction(DeleteActionColumn::class);
$table->create();
$table->render();

View File

@ -6,10 +6,10 @@
use Itguild\EloquentTable\ViewEloquentTable;
use Itguild\EloquentTable\ViewJsonTableEloquentModel;
use kernel\IGTabel\btn\DangerBtn;
use kernel\IGTabel\btn\PrimaryBtn;
use kernel\IGTabel\btn\SuccessBtn;
use kernel\models\Menu;
use kernel\widgets\IconBtn\IconBtnDeleteWidget;
use kernel\widgets\IconBtn\IconBtnEditWidget;
use kernel\widgets\IconBtn\IconBtnListWidget;
$table = new ViewEloquentTable(new ViewJsonTableEloquentModel($menu, [
'params' => ["class" => "table table-bordered", "border" => "2"],
@ -17,9 +17,9 @@ $table = new ViewEloquentTable(new ViewJsonTableEloquentModel($menu, [
]));
$table->beforePrint(function () use ($menu) {
$btn = IconBtnListWidget::create(['url' => '/admin/settings/menu'])->run();
$btn .= IconBtnEditWidget::create(['url' => '/admin/settings/menu/update/' . $menu->id])->run();
$btn .= IconBtnDeleteWidget::create(['url' => '/admin/settings/menu/delete/' . $menu->id])->run();
$btn = PrimaryBtn::create("Список", "/admin/settings/menu")->fetch();
$btn .= SuccessBtn::create("Редактировать", "/admin/settings/menu/update/" . $menu->id)->fetch();
$btn .= DangerBtn::create("Удалить", "/admin/settings/menu/delete/" . $menu->id)->fetch();
return $btn;
});
$table->rows([

View File

@ -31,21 +31,31 @@ $info_to_table['data'] = $modules_info;
$table = new ListJsonTable(json_encode($info_to_table, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
$table->addAction(function ($row, $url) use ($moduleService) {
$url = "$url/view/" . $row['id'];
$id = $row['id'];
return \kernel\widgets\IconBtn\IconBtnViewWidget::create(['url' => $url])->run();
return ActionButtonWidget::create([
'btn_type' => "primary",
'label' => "<i class='fa-regular fa-eye'></i>",
'url' => "$url/view/$id",
])->run();
});
$table->addAction(function ($row, $url) use ($moduleService){
if ($moduleService->isInstall($row['slug'])){
$url = "$url/delete/?slug=" . $row['slug'];
return \kernel\widgets\IconBtn\IconBtnDeleteWidget::create(['url' => $url])->run();
$slug = $row['slug'];
$id = $row['id'];
if ($moduleService->isInstall($slug)){
return ActionButtonWidget::create([
'btn_type' => "danger",
'label' => "<i class='fa-regular fa-trash-can'></i>",
'url' => "$url/delete/?slug=$slug",
])->run();
}
else {
$url = "$url/install/?id=" . $row['id'];
return \kernel\widgets\IconBtn\IconBtnInstallWidget::create(['url' => $url])->run();
return ActionButtonWidget::create([
'btn_type' => "success",
'label' => "<i class='fa-solid fa-download'></i>",
'url' => "$url/install/?id=$id",
])->run();
}
});
@ -53,16 +63,19 @@ $table->addAction(function ($row, $url) use ($moduleService){
$slug = $row['slug'];
if ($moduleService->isInstall($slug)){
if (!$moduleService->isLastVersion($slug)) {
$url = "$url/update/?slug=" . $slug;
return \kernel\widgets\IconBtn\IconBtnUpdateWidget::create(['url' => $url])->run();
return ActionButtonWidget::create([
'btn_type' => "info",
'label' => "<i class='fa-regular fa-pen-to-square'></i>",
'url' => "$url/update/?slug=$slug",
])->run();
}
}
return false;
});
\kernel\widgets\ModuleTabsWidget::create()->run();
$table->create();
\kernel\widgets\ModuleTabsWidget::create()->run();
$table->render();

View File

@ -25,7 +25,8 @@ $table_info = [
$table = new \Itguild\Tables\ViewJsonTable(json_encode($table_info, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
$table->beforePrint(function () {
return \kernel\widgets\IconBtn\IconBtnListWidget::create(['url' => '/admin/module_shop_client'])->run();
$btn = PrimaryBtn::create("Список", "/admin/module_shop_client")->fetch();
return $btn;
});
$table->create();
$table->render();

View File

@ -11,10 +11,6 @@ use kernel\IGTabel\action_column\EditActionColumn;
use kernel\IGTabel\action_column\ViewActionColumn;
use kernel\IGTabel\btn\PrimaryBtn;
use kernel\modules\option\models\Option;
use kernel\widgets\IconBtn\IconBtnCreateWidget;
use kernel\widgets\IconBtn\IconBtnDeleteWidget;
use kernel\widgets\IconBtn\IconBtnEditWidget;
use kernel\widgets\IconBtn\IconBtnViewWidget;
$table = new ListEloquentTable(new EloquentDataProvider(Option::class, [
'current_page' => $page_number,
@ -24,7 +20,8 @@ $table = new ListEloquentTable(new EloquentDataProvider(Option::class, [
]));
$table->beforePrint(function () {
return IconBtnCreateWidget::create(['url' => '/admin/option/create'])->run();
return PrimaryBtn::create("Создать", "/admin/option/create")->fetch();
//return (new PrimaryBtn("Создать", "/admin/user/create"))->fetch();
});
$table->columns([
@ -34,15 +31,8 @@ $table->columns([
}]
]);
$table->addAction(function($row) {
return IconBtnViewWidget::create(['url' => '/admin/option/view/' . $row['id']])->run();
});
$table->addAction(function($row) {
return IconBtnEditWidget::create(['url' => '/admin/option/update/' . $row['id']])->run();
});
$table->addAction(function($row) {
return IconBtnDeleteWidget::create(['url' => '/admin/option/delete/' . $row['id']])->run();
});
$table->addAction(ViewActionColumn::class);
$table->addAction(EditActionColumn::class);
$table->addAction(DeleteActionColumn::class);
$table->create();
$table->render();

View File

@ -8,18 +8,15 @@ use Itguild\EloquentTable\ViewJsonTableEloquentModel;
use kernel\IGTabel\btn\DangerBtn;
use kernel\IGTabel\btn\PrimaryBtn;
use kernel\IGTabel\btn\SuccessBtn;
use kernel\widgets\IconBtn\IconBtnDeleteWidget;
use kernel\widgets\IconBtn\IconBtnEditWidget;
use kernel\widgets\IconBtn\IconBtnListWidget;
$table = new ViewEloquentTable(new ViewJsonTableEloquentModel($option, [
'params' => ["class" => "table table-bordered", "border" => "2"],
'baseUrl' => "/admin/user",
]));
$table->beforePrint(function () use ($option) {
$btn = IconBtnListWidget::create(['url' => '/admin/option'])->run();
$btn .= IconBtnEditWidget::create(['url' => '/admin/option/update/' . $option->id])->run();
$btn .= IconBtnDeleteWidget::create(['url' => '/admin/option/delete/' . $option->id])->run();
$btn = PrimaryBtn::create("Список", "/admin/option")->fetch();
$btn .= SuccessBtn::create("Редактировать", "/admin/option/update/" . $option->id)->fetch();
$btn .= DangerBtn::create("Удалить", "/admin/option/delete/" . $option->id)->fetch();
return $btn;
});

View File

@ -13,10 +13,6 @@ use kernel\modules\user\models\User;
use Itguild\EloquentTable\EloquentDataProvider;
use Itguild\EloquentTable\ListEloquentTable;
use kernel\IGTabel\btn\PrimaryBtn;
use kernel\widgets\IconBtn\IconBtnCreateWidget;
use kernel\widgets\IconBtn\IconBtnDeleteWidget;
use kernel\widgets\IconBtn\IconBtnEditWidget;
use kernel\widgets\IconBtn\IconBtnViewWidget;
$table = new ListEloquentTable(new EloquentDataProvider(Post::class, [
'currentPage' => $page_number,
@ -43,18 +39,12 @@ $table->columns([
return User::find($data)->username;
})
]);
$table->beforePrint(function () {
return IconBtnCreateWidget::create(['url' => '/admin/post/create'])->run();
});
$table->addAction(function($row) {
return IconBtnViewWidget::create(['url' => '/admin/post/view/' . $row['id']])->run();
});
$table->addAction(function($row) {
return IconBtnEditWidget::create(['url' => '/admin/post/update/' . $row['id']])->run();
});
$table->addAction(function($row) {
return IconBtnDeleteWidget::create(['url' => '/admin/post/delete/' . $row['id']])->run();
return PrimaryBtn::create("Создать", "/admin/post/create")->fetch();
//return (new PrimaryBtn("Создать", "/admin/user/create"))->fetch();
});
$table->addAction(ViewActionColumn::class);
$table->addAction(EditActionColumn::class);
$table->addAction(DeleteActionColumn::class);
$table->create();
$table->render();

View File

@ -10,21 +10,17 @@ use Itguild\EloquentTable\ViewJsonTableEloquentModel;
use kernel\IGTabel\btn\DangerBtn;
use kernel\IGTabel\btn\PrimaryBtn;
use kernel\IGTabel\btn\SuccessBtn;
use kernel\widgets\IconBtn\IconBtnDeleteWidget;
use kernel\widgets\IconBtn\IconBtnEditWidget;
use kernel\widgets\IconBtn\IconBtnListWidget;
$table = new ViewEloquentTable(new ViewJsonTableEloquentModel($content, [
'params' => ["class" => "table table-bordered", "border" => "2"],
'baseUrl' => "/admin/post",
]));
$table->beforePrint(function () use ($content) {
$btn = IconBtnListWidget::create(['url' => '/admin/post'])->run();
$btn .= IconBtnEditWidget::create(['url' => '/admin/post/update/' . $content->id])->run();
$btn .= IconBtnDeleteWidget::create(['url' => '/admin/post/delete/' . $content->id])->run();
$btn = PrimaryBtn::create("Список", "/admin/post")->fetch();
$btn .= SuccessBtn::create("Редактировать", "/admin/post/update/" . $content->id)->fetch();
$btn .= DangerBtn::create("Удалить", "/admin/post/delete/" . $content->id)->fetch();
return $btn;
});
$table->rows([
'created_at' => function ($data) {
if (!$data){

View File

@ -12,10 +12,6 @@ use kernel\IGTabel\action_column\EditActionColumn;
use kernel\IGTabel\action_column\ViewActionColumn;
use kernel\IGTabel\btn\PrimaryBtn;
use kernel\modules\user\models\User;
use kernel\widgets\IconBtn\IconBtnCreateWidget;
use kernel\widgets\IconBtn\IconBtnDeleteWidget;
use kernel\widgets\IconBtn\IconBtnEditWidget;
use kernel\widgets\IconBtn\IconBtnViewWidget;
$table = new ListEloquentTable(new EloquentDataProvider(User::class, [
'currentPage' => $page_number,
@ -46,16 +42,11 @@ $table->columns([
}
]);
$table->beforePrint(function () {
return IconBtnCreateWidget::create(['url' => '/admin/user/create'])->run();
});
$table->addAction(function($row) {
return IconBtnViewWidget::create(['url' => '/admin/user/view/' . $row['id']])->run();
});
$table->addAction(function($row) {
return IconBtnEditWidget::create(['url' => '/admin/user/update/' . $row['id']])->run();
});
$table->addAction(function($row) {
return IconBtnDeleteWidget::create(['url' => '/admin/user/delete/' . $row['id']])->run();
return PrimaryBtn::create("Создать", "/admin/user/create")->fetch();
//return (new PrimaryBtn("Создать", "/admin/user/create"))->fetch();
});
$table->addAction(ViewActionColumn::class);
$table->addAction(EditActionColumn::class);
$table->addAction(DeleteActionColumn::class);
$table->create();
$table->render();

View File

@ -10,21 +10,17 @@ use Itguild\EloquentTable\ViewJsonTableEloquentModel;
use kernel\IGTabel\btn\DangerBtn;
use kernel\IGTabel\btn\PrimaryBtn;
use kernel\IGTabel\btn\SuccessBtn;
use kernel\widgets\IconBtn\IconBtnDeleteWidget;
use kernel\widgets\IconBtn\IconBtnEditWidget;
use kernel\widgets\IconBtn\IconBtnListWidget;
$table = new ViewEloquentTable(new ViewJsonTableEloquentModel($user, [
'params' => ["class" => "table table-bordered", "border" => "2"],
'baseUrl' => "/admin/user",
]));
$table->beforePrint(function () use ($user) {
$btn = IconBtnListWidget::create(['url' => '/admin/user'])->run();
$btn .= IconBtnEditWidget::create(['url' => '/admin/user/update/' . $user->id])->run();
$btn .= IconBtnDeleteWidget::create(['url' => '/admin/user/delete/' . $user->id])->run();
$btn = PrimaryBtn::create("Список", "/admin/user")->fetch();
$btn .= SuccessBtn::create("Редактировать", "/admin/user/update/" . $user->id)->fetch();
$btn .= DangerBtn::create("Удалить", "/admin/user/delete/" . $user->id)->fetch();
return $btn;
});
$table->rows([
'created_at' => function ($data) {
if (!$data){

View File

@ -7,10 +7,7 @@
* @var \kernel\services\ModuleService $moduleService
*/
use kernel\widgets\IconBtn\IconBtnActivateWidget;
use kernel\widgets\IconBtn\IconBtnDeactivateWidget;
use kernel\widgets\IconBtn\IconBtnDeleteWidget;
use kernel\widgets\IconBtn\IconBtnUpdateWidget;
use kernel\widgets\ActionButtonWidget;
use kernel\widgets\IconBtn\IconBtnViewWidget;
use kernel\widgets\ModuleTabsWidget;
@ -36,17 +33,22 @@ $table = new \Itguild\Tables\ListJsonTable(json_encode($info_to_table, JSON_PRET
$table->addAction(function ($row, $url) use ($moduleService) {
$slug = $row['slug'];
if ($moduleService->isActive($slug)) {
$url = "$url/deactivate/?slug=". $row['slug'];
return ActionButtonWidget::create([
'btn_type' => "warning",
'label' => "<i class='fa-regular fa-circle-xmark'></i>",
'url' => "$url/deactivate/?slug=$slug",
])->run();
return IconBtnDeactivateWidget::create(['url' => $url])->run();
} else {
$url = "$url/activate/?slug=". $row['slug'];
return IconBtnActivateWidget::create(['url' => $url])->run();
return ActionButtonWidget::create([
'label' => "<i class='fa-regular fa-circle-check'></i>",
'url' => "$url/activate/?slug=$slug",
'btn_type' => "success",
'title' => "Активировать",
])->run();
}
});
$table->addAction(function ($row, $url) use ($moduleService) {
$url = "$url/view/?slug=". $row['slug'];
@ -54,11 +56,14 @@ $table->addAction(function ($row, $url) use ($moduleService) {
});
$table->addAction(function ($row, $url) use ($moduleService){
if (!$moduleService->isKernelModule($row['slug'])){
if (!$moduleService->isLastVersion($row['slug'])) {
$url = "$url/update/?slug=". $row['slug'];
return IconBtnUpdateWidget::create(['url' => $url])->run();
$slug = $row['slug'];
if (!$moduleService->isKernelModule($slug)){
if (!$moduleService->isLastVersion($slug)) {
return ActionButtonWidget::create([
'btn_type' => "info",
'label' => "<i class='fa-regular fa-pen-to-square'></i>",
'url' => "$url/view/?slug=$slug",
])->run();
}
}
@ -68,9 +73,11 @@ $table->addAction(function ($row, $url) use ($moduleService){
$table->addAction(function ($row) use ($moduleService){
$slug = $row['slug'];
if (!$moduleService->isKernelModule($slug)) {
$url = "admin/module_shop_client/delete/?slug=" . $row['slug'];
return IconBtnDeleteWidget::create(['url' => $url])->run();
return ActionButtonWidget::create([
'btn_type' => "danger",
'label' => "<i class='fa-regular fa-trash-can'></i>",
'url' => "admin/module_shop_client/delete/?slug=$slug",
])->run();
}
return false;
});

View File

@ -3,8 +3,9 @@
* @var array $data
*/
use Itguild\Tables\ViewJsonTable;
use kernel\widgets\IconBtn\IconBtnListWidget;
use kernel\IGTabel\btn\DangerBtn;
use kernel\IGTabel\btn\PrimaryBtn;
use kernel\IGTabel\btn\SuccessBtn;
$table_info = [
"meta" => [
@ -19,10 +20,11 @@ $table_info = [
],
"data" => $data
];
$table = new ViewJsonTable(json_encode($table_info, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
$table = new \Itguild\Tables\ViewJsonTable(json_encode($table_info, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
$table->beforePrint(function () {
return IconBtnListWidget::create(['url' => '/admin'])->run();
$btn = PrimaryBtn::create("Список", "/admin")->fetch();
return $btn;
});
$table->create();
$table->render();

View File

@ -1,26 +0,0 @@
<?php
namespace kernel\widgets\IconBtn;
use kernel\Widget;
use kernel\widgets\ActionButtonWidget;
class IconBtnActivateWidget extends Widget
{
public static function create(array $data = []): IconBtnActivateWidget
{
return new static($data);
}
public function run()
{
$url = $this->data['url'];
return ActionButtonWidget::create([
'label' => "<i class='fa-regular fa-circle-check'></i>",
'url' => $url,
'btn_type' => "success",
'title' => "Активировать"
])->run();
}
}

View File

@ -1,26 +0,0 @@
<?php
namespace kernel\widgets\IconBtn;
use kernel\Widget;
use kernel\widgets\ActionButtonWidget;
class IconBtnCreateWidget extends Widget
{
public static function create(array $data = []): IconBtnCreateWidget
{
return new static($data);
}
public function run()
{
$url = $this->data['url'];
return ActionButtonWidget::create([
'label' => "<i class='fa-regular fa-square-plus'></i>",
'url' => $url,
'btn_type' => "success",
'title' => "Создать"
])->run();
}
}

View File

@ -1,26 +0,0 @@
<?php
namespace kernel\widgets\IconBtn;
use kernel\Widget;
use kernel\widgets\ActionButtonWidget;
class IconBtnDeactivateWidget extends Widget
{
public static function create(array $data = []): IconBtnDeactivateWidget
{
return new static($data);
}
public function run()
{
$url = $this->data['url'];
return ActionButtonWidget::create([
'label' => "<i class='fa-regular fa-circle-xmark'></i>",
'url' => $url,
'btn_type' => "warning",
'title' => "Деактивировать"
])->run();
}
}

View File

@ -1,26 +0,0 @@
<?php
namespace kernel\widgets\IconBtn;
use kernel\Widget;
use kernel\widgets\ActionButtonWidget;
class IconBtnDeleteWidget extends Widget
{
public static function create(array $data = []): IconBtnDeleteWidget
{
return new static($data);
}
public function run()
{
$url = $this->data['url'];
return ActionButtonWidget::create([
'label' => "<i class='fa-regular fa-trash-can'></i>",
'url' => $url,
'btn_type' => "danger",
'title' => "Удалить"
])->run();
}
}

View File

@ -1,26 +0,0 @@
<?php
namespace kernel\widgets\IconBtn;
use kernel\Widget;
use kernel\widgets\ActionButtonWidget;
class IconBtnEditWidget extends Widget
{
public static function create(array $data = []): IconBtnEditWidget
{
return new static($data);
}
public function run()
{
$url = $this->data['url'];
return ActionButtonWidget::create([
'label' => "<i class='fa-solid fa-pen'></i>",
'url' => $url,
'btn_type' => "success",
'title' => "Редактировать"
])->run();
}
}

View File

@ -1,26 +0,0 @@
<?php
namespace kernel\widgets\IconBtn;
use kernel\Widget;
use kernel\widgets\ActionButtonWidget;
class IconBtnInstallWidget extends Widget
{
public static function create(array $data = []): IconBtnInstallWidget
{
return new static($data);
}
public function run()
{
$url = $this->data['url'];
return ActionButtonWidget::create([
'label' => "<i class='fa-solid fa-download'></i>",
'url' => $url,
'btn_type' => "success",
'title' => "Установить"
])->run();
}
}

View File

@ -1,26 +0,0 @@
<?php
namespace kernel\widgets\IconBtn;
use kernel\Widget;
use kernel\widgets\ActionButtonWidget;
class IconBtnListWidget extends Widget
{
public static function create(array $data = []): IconBtnListWidget
{
return new static($data);
}
public function run()
{
$url = $this->data['url'];
return ActionButtonWidget::create([
'label' => "<i class='fa-regular fa-rectangle-list'></i>",
'url' => $url,
'btn_type' => "primary",
'title' => "Список"
])->run();
}
}

View File

@ -1,26 +0,0 @@
<?php
namespace kernel\widgets\IconBtn;
use kernel\Widget;
use kernel\widgets\ActionButtonWidget;
class IconBtnUpdateWidget extends Widget
{
public static function create(array $data = []): IconBtnUpdateWidget
{
return new static($data);
}
public function run()
{
$url = $this->data['url'];
return ActionButtonWidget::create([
'label' => "<i class='fa-solid fa-cloud-arrow-down'></i>",
'url' => $url,
'btn_type' => "info",
'title' => "Обновить"
])->run();
}
}