update, delete module from shop on local page
This commit is contained in:
@ -41,7 +41,7 @@ $table->addAction(function ($row, $url) use ($moduleService){
|
||||
}
|
||||
else {
|
||||
$label = "Установить";
|
||||
$btn_type = "warning";
|
||||
$btn_type = "success";
|
||||
$btn = "<a class='btn btn-$btn_type' href='$url/install/?id=$id' style='margin: 3px; width: 150px;' >$label</a>";
|
||||
}
|
||||
|
||||
@ -50,16 +50,15 @@ $table->addAction(function ($row, $url) use ($moduleService){
|
||||
|
||||
$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>";
|
||||
$btn_type = "info";
|
||||
return "<a class='btn btn-$btn_type' href='$url/update/?slug=$slug' style='margin: 3px; width: 150px;' >$label</a>";
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user