admin theme pack
This commit is contained in:
@ -42,15 +42,15 @@ $table->addAction(function ($row, $url) use ($moduleService) {
|
||||
$table->columns([
|
||||
'type' => [
|
||||
'filter' => [
|
||||
'class' => \Itguild\Tables\Filter\SelectFilter::class,
|
||||
'class' => \kernel\filters\CustomSelectFilter::class,
|
||||
'param' => ['kernel', 'entity'],
|
||||
'value' => "kernel"
|
||||
],
|
||||
]
|
||||
]);
|
||||
|
||||
$table->addAction(function ($row, $url) use ($moduleService){
|
||||
if ($row['slug'] !== 'kernel') {
|
||||
$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'];
|
||||
|
||||
@ -61,16 +61,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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -78,8 +81,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/";
|
||||
|
||||
@ -91,9 +93,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/";
|
||||
|
Reference in New Issue
Block a user