MicroFrameWork/kernel/modules/admin_themes/views/view.php

29 lines
868 B
PHP
Raw Permalink Normal View History

2024-09-03 16:29:44 +03:00
<?php
/**
* @var array $data
*/
use kernel\IGTabel\btn\DangerBtn;
use kernel\IGTabel\btn\PrimaryBtn;
use kernel\IGTabel\btn\SuccessBtn;
$table_info = [
"meta" => [
"rows" => ["preview" => "Превью", "name" => "Название", "version" => "Версия", "description" => "Описание"],
"params" => ["class" => "table table-bordered"],
"baseUrl" => "/admin/settings/admin-themes",
],
"data" => $data
];
$table = new \Itguild\Tables\ViewJsonTable(json_encode($table_info, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
$table->rows([
'preview' => function ($data) {
return "<img src='$data' width='500px'>";
}
]);
$table->beforePrint(function () {
2024-11-20 12:45:02 +03:00
return \kernel\widgets\IconBtn\IconBtnListWidget::create(['url' => '/admin/settings/admin-themes'])->run();
2024-09-03 16:29:44 +03:00
});
$table->create();
$table->render();