修正分享管理中的逻辑问题

允许查看已经失效的分享详情
This commit is contained in:
Chenx221 2024-04-08 16:14:46 +08:00
parent 5d5c786ab0
commit 69b7bb42d1
Signed by: chenx221
GPG Key ID: D7A9EC07024C3021

View File

@ -62,7 +62,7 @@ $this->params['breadcrumbs'][] = $this->title;
'urlCreator' => function ($action, Share $model, $key, $index, $column) { 'urlCreator' => function ($action, Share $model, $key, $index, $column) {
if ($action === 'view') { if ($action === 'view') {
// 返回查看按钮的链接 // 返回查看按钮的链接
return $model->status != 0 ? Url::toRoute(['share-manage-view', 'share_id' => $model->share_id]): null; return Url::toRoute(['share-manage-view', 'share_id' => $model->share_id]);
} else { } else {
// 如果 status 为 0禁用删除按钮 // 如果 status 为 0禁用删除按钮
return $model->status != 0 ? Url::toRoute(['share-manage-delete', 'share_id' => $model->share_id]) : null; return $model->status != 0 ? Url::toRoute(['share-manage-delete', 'share_id' => $model->share_id]) : null;