module manager
This commit is contained in:
14
kernel/modules/admin_themes/AdminThemesModule.php
Normal file
14
kernel/modules/admin_themes/AdminThemesModule.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace kernel\modules\admin_themes;
|
||||
|
||||
use kernel\Module;
|
||||
|
||||
class AdminThemesModule extends Module
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
// TODO: Implement init() method.
|
||||
}
|
||||
}
|
@ -30,7 +30,13 @@ class AdminThemeController extends AdminController
|
||||
|
||||
$info_to_table = [];
|
||||
$meta = [];
|
||||
$meta['columns'] = ["preview" => "Превью", "name" => "Название", "version" => "Версия", "description" => "Описание"];
|
||||
$meta['columns'] = [
|
||||
"preview" => "Превью",
|
||||
"name" => "Название",
|
||||
"author" => "Автор",
|
||||
"version" => "Версия",
|
||||
"description" => "Описание"
|
||||
];
|
||||
$meta['params'] = ["class" => "table table-bordered"];
|
||||
$meta['perPage'] = 10;
|
||||
$meta['baseUrl'] = "/admin/settings/admin-themes";
|
||||
|
8
kernel/modules/admin_themes/manifest.json
Normal file
8
kernel/modules/admin_themes/manifest.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "Admin themes",
|
||||
"version": "0.1",
|
||||
"author": "ITGuild",
|
||||
"slug": "admin_themes",
|
||||
"description": "Admin themes module",
|
||||
"module_class": "AdminThemesModule"
|
||||
}
|
@ -15,7 +15,7 @@ $table->columns([
|
||||
$table->addAction(function ($row, $url){
|
||||
$path = $row['path'];
|
||||
$active_admin_theme = Option::where("key", "active_admin_theme")->first();
|
||||
$btn = "<a class='btn btn-primary' href='$url/activate/?p=$path' style='margin: 3px; width: 150px;' >Активировать</a>";;
|
||||
$btn = "<a class='btn btn-primary' href='$url/activate/?p=$path' style='margin: 3px; width: 150px;' >Активировать</a>";
|
||||
if ($path === $active_admin_theme->value){
|
||||
$btn = "Активна";
|
||||
}
|
||||
|
Reference in New Issue
Block a user