themes add and some fix
This commit is contained in:
0
kernel/modules/module_shop_client/views/enter_code.php
Normal file → Executable file
0
kernel/modules/module_shop_client/views/enter_code.php
Normal file → Executable file
45
kernel/modules/module_shop_client/views/index.php
Normal file → Executable file
45
kernel/modules/module_shop_client/views/index.php
Normal file → Executable file
@ -7,6 +7,7 @@
|
||||
* @var \kernel\services\ModuleService $moduleService
|
||||
* @var \kernel\services\KernelService $kernelService
|
||||
* @var \kernel\services\AdminThemeService $adminThemeService
|
||||
* @var array $filterValues
|
||||
*/
|
||||
|
||||
use Itguild\Tables\ListJsonTable;
|
||||
@ -30,7 +31,6 @@ $meta['total'] = $module_count;
|
||||
|
||||
$info_to_table['meta'] = $meta;
|
||||
$info_to_table['data'] = $modules_info;
|
||||
$info_to_table['filters'] = ['type'];
|
||||
|
||||
$table = new ListJsonTable(json_encode($info_to_table, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
|
||||
|
||||
@ -40,8 +40,24 @@ $table->addAction(function ($row, $url) use ($moduleService) {
|
||||
return \kernel\widgets\IconBtn\IconBtnViewWidget::create(['url' => $url])->run();
|
||||
});
|
||||
|
||||
$table->addAction(function ($row, $url) use ($moduleService){
|
||||
if ($row['slug'] !== 'kernel') {
|
||||
$table->columns([
|
||||
'type' => [
|
||||
'filter' => [
|
||||
'class' => \kernel\filters\BootstrapSelectFilter::class,
|
||||
'params' => [
|
||||
'options' => [
|
||||
'kernel' => 'kernel',
|
||||
'entity' => 'entity',
|
||||
],
|
||||
'prompt' => 'Не выбрано'
|
||||
],
|
||||
'value' => $filterValues['type'] ?? ''
|
||||
],
|
||||
]
|
||||
]);
|
||||
|
||||
$table->addAction(function ($row, $url) use ($moduleService) {
|
||||
if ($row['type'] === 'entity' || $row['type'] === 'additional_property') {
|
||||
if ($moduleService->isInstall($row['slug'])) {
|
||||
$url = "$url/delete/?slug=" . $row['slug'];
|
||||
|
||||
@ -52,16 +68,19 @@ $table->addAction(function ($row, $url) use ($moduleService){
|
||||
return \kernel\widgets\IconBtn\IconBtnInstallWidget::create(['url' => $url])->run();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$table->addAction(function ($row, $url) use ($moduleService) {
|
||||
$slug = $row['slug'];
|
||||
if ($moduleService->isInstall($slug)) {
|
||||
if (!$moduleService->isLastVersion($slug)) {
|
||||
$url = "$url/update/?slug=" . $slug;
|
||||
if ($row['type'] === 'entity' || $row['type'] === 'additional_property') {
|
||||
$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 \kernel\widgets\IconBtn\IconBtnUpdateWidget::create(['url' => $url])->run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -69,8 +88,7 @@ $table->addAction(function ($row, $url) use ($moduleService) {
|
||||
});
|
||||
|
||||
$table->addAction(function ($row, $url) use ($kernelService) {
|
||||
$slug = $row['slug'];
|
||||
if ($slug === 'kernel') {
|
||||
if ($row['type'] === 'kernel') {
|
||||
if (!$kernelService->isLastVersion()) {
|
||||
$url = "$url/kernel/update_form/";
|
||||
|
||||
@ -82,9 +100,8 @@ $table->addAction(function ($row, $url) use ($kernelService) {
|
||||
});
|
||||
|
||||
$table->addAction(function ($row, $url) use ($adminThemeService) {
|
||||
$type = $row['type'];
|
||||
$slug = $row['slug'];
|
||||
if ($type === 'admin_theme') {
|
||||
if ($row['type'] === 'admin_theme') {
|
||||
$slug = $row['slug'];
|
||||
if ($adminThemeService->isInstall($slug)) {
|
||||
if (!$adminThemeService->isLastVersion($slug)) {
|
||||
$url = "$url/admin_theme/update/";
|
||||
|
0
kernel/modules/module_shop_client/views/kernel_update.php
Normal file → Executable file
0
kernel/modules/module_shop_client/views/kernel_update.php
Normal file → Executable file
0
kernel/modules/module_shop_client/views/login_at_module_shop.php
Normal file → Executable file
0
kernel/modules/module_shop_client/views/login_at_module_shop.php
Normal file → Executable file
0
kernel/modules/module_shop_client/views/module_shop_error_connection.php
Normal file → Executable file
0
kernel/modules/module_shop_client/views/module_shop_error_connection.php
Normal file → Executable file
0
kernel/modules/module_shop_client/views/success_login.php
Normal file → Executable file
0
kernel/modules/module_shop_client/views/success_login.php
Normal file → Executable file
0
kernel/modules/module_shop_client/views/view.php
Normal file → Executable file
0
kernel/modules/module_shop_client/views/view.php
Normal file → Executable file
Reference in New Issue
Block a user