update modules from ms
This commit is contained in:
@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user