You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1019 B
44 lines
1019 B
<?php |
|
|
|
|
|
namespace App\Admin\CustomButton; |
|
|
|
|
|
use App\Admin\Extensions\Exporter\ImportCompletedOnLineStepView; |
|
use Dcat\Admin\Grid\Tools\AbstractTool; |
|
use Dcat\Admin\Traits\HasPermissions; |
|
use Illuminate\Contracts\Auth\Authenticatable; |
|
use Illuminate\Database\Eloquent\Model; |
|
|
|
class CompletedOnLineStepButton extends AbstractTool |
|
{ |
|
public function render() |
|
{ |
|
$id = "reset-completed-on-line-{$this->getKey()}"; |
|
// 返回自定义按钮的HTML代码 |
|
return <<<HTML |
|
<span class="grid-expand" data-toggle="modal" data-target="#{$id}"> |
|
<a href="/api/import/completedOffLineAllStep" target="_blank"><button class="btn btn-warning ">导出已完成线上步骤名单</button></a> |
|
</span> |
|
HTML; |
|
} |
|
|
|
|
|
/** |
|
* @param Model|Authenticatable|HasPermissions|null $user |
|
* |
|
* @return bool |
|
*/ |
|
protected function authorize($user): bool |
|
{ |
|
return true; |
|
} |
|
|
|
/** |
|
* @return array |
|
*/ |
|
protected function parameters() |
|
{ |
|
return []; |
|
} |
|
}
|
|
|