kernel v0.1.4
This commit is contained in:
25
kernel/modules/themes/views/index.php
Normal file
25
kernel/modules/themes/views/index.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* @var $json string
|
||||
*/
|
||||
|
||||
|
||||
$table = new \Itguild\Tables\ListJsonTable($json);
|
||||
$table->columns([
|
||||
'preview' => function ($data) {
|
||||
return "<img src='$data' width='200px'>";
|
||||
}
|
||||
]);
|
||||
$table->addAction(function ($row, $url){
|
||||
$active_admin_theme = \kernel\modules\option\service\OptionService::getItem('active_theme');
|
||||
|
||||
if ($row['path'] === $active_admin_theme){
|
||||
return "Активна";
|
||||
} else {
|
||||
$url = "$url/activate/?p=" . $row['path'];
|
||||
|
||||
return \kernel\widgets\IconBtn\IconBtnActivateWidget::create(['url' => $url])->run();
|
||||
}
|
||||
});
|
||||
$table->create();
|
||||
$table->render();
|
Reference in New Issue
Block a user