update button add feature - control logs site

This commit is contained in:
2020-12-24 13:57:24 +07:00
parent 492651570e
commit b26814bb97
6 changed files with 120 additions and 8 deletions

View File

@@ -34,12 +34,24 @@ class CaptureLogsGrid {
};
}
public static function image() {
return function($model) {
return Html::img("/data/uploads/face/" . $model->image, [
public static function image($process = false) {
return function($model) use ($process) {
$btn = "";
if ($process)
$btn = Html::button("<i class='fa fa-reply'></i>", [
"class" => "btn btn-info btn-xs",
"style" => "position:absolute;top:0;right:0;visibility: hidden;",
"data" => [
"toggle" => "tooltip",
"href" => Url::to(["/control-logs/use-feature", "id" => $model->id])
],
"title" => "Chuyển làm ảnh mẫu",
"onclick" => "_useFeature(this);"
]);
return "<div class='feature-img'>" . Html::img("/data/uploads/face/" . $model->image, [
"class" => "img-thumbnail",
"style" => "width: 150px;height:150px;"
]);
]) . $btn . "</div>";
};
}