update modules from ms

This commit is contained in:
2024-11-14 01:55:04 +03:00
parent 44c94689c6
commit d2028e926b
6 changed files with 95 additions and 58 deletions

View File

@ -48,6 +48,20 @@ $table->addAction(function ($row, $url) use ($moduleService){
return $btn;
});
$table->addAction(function ($row, $url) use ($moduleService){
$slug = $row['slug'];
$id = $row['id'];
if ($moduleService->isInstall($slug)){
if (!$moduleService->isLastVersion($slug)) {
$label = "Обновить";
$btn_type = "danger";
return "<a class='btn btn-$btn_type' href='$url/update/?id=$id' style='margin: 3px; width: 150px;' >$label</a>";
}
}
return false;
});
$table->create();