module set and unset, dependencies

This commit is contained in:
2024-10-11 15:44:15 +03:00
parent d9c4cecd48
commit 5b9386f970
6 changed files with 92 additions and 5 deletions

View File

@ -30,12 +30,14 @@ $table->addAction(function ($row, $url) use ($moduleService){
if ($moduleService->isActive($slug)){
$label = "Деактивировать";
$btn_type = "warning";
$btn = "<a class='btn btn-$btn_type' href='$url/deactivate/?slug=$slug' style='margin: 3px; width: 150px;' >$label</a>";
}
else {
$label = "Активировать";
$btn_type = "primary";
$btn = "<a class='btn btn-$btn_type' href='$url/activate/?slug=$slug' style='margin: 3px; width: 150px;' >$label</a>";
}
$btn = "<a class='btn btn-$btn_type' href='$url/activate/?slug=$slug' style='margin: 3px; width: 150px;' >$label</a>";
return $btn;
});