module shop client fix
This commit is contained in:
@ -26,15 +26,14 @@ $info_to_table['data'] = $modules_info;
|
||||
$table = new \Itguild\Tables\ListJsonTable(json_encode($info_to_table, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
|
||||
|
||||
|
||||
$table->addAction(function ($row, $url) use ($moduleService){
|
||||
$table->addAction(function ($row, $url) use ($moduleService) {
|
||||
$slug = $row['slug'];
|
||||
if ($moduleService->isActive($slug)){
|
||||
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 {
|
||||
} else {
|
||||
$label = "Активировать";
|
||||
$btn_type = "primary";
|
||||
$btn = "<a class='btn btn-$btn_type' href='$url/activate/?slug=$slug' style='margin: 3px; width: 150px;' >$label</a>";
|
||||
@ -43,15 +42,28 @@ $table->addAction(function ($row, $url) use ($moduleService){
|
||||
return $btn;
|
||||
});
|
||||
|
||||
$table->addAction(function ($row, $url) use ($moduleService){
|
||||
$table->addAction(function ($row, $url) use ($moduleService) {
|
||||
$slug = $row['slug'];
|
||||
return "<a class='btn btn-primary' href='$url/view/?slug=$slug' style='margin: 3px; width: 150px;' >Просмотр</a>";
|
||||
});
|
||||
|
||||
$table->addAction(function ($row, $url) use ($moduleService){
|
||||
$table->addAction(function ($row, $url) use ($moduleService) {
|
||||
$slug = $row['slug'];
|
||||
return "<a class='btn btn-primary' href='$url/update/?slug=$slug' style='margin: 3px; width: 150px;' >Обновить</a>";
|
||||
});
|
||||
|
||||
$table->create();
|
||||
|
||||
|
||||
?>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" aria-current="page" href="#">Локальные</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Каталог</a>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<?php
|
||||
$table->render();
|
||||
|
Reference in New Issue
Block a user