修正一处固定死的a路径

This commit is contained in:
Chenx221 2024-04-08 16:13:55 +08:00
parent d73882afeb
commit 5d5c786ab0
Signed by: chenx221
GPG Key ID: D7A9EC07024C3021

View File

@ -2,6 +2,7 @@
use yii\grid\GridView;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\web\JqueryAsset;
use yii\web\View;
use yii\web\YiiAsset;
@ -58,7 +59,10 @@ $dataProvider->query->andWhere(['task_id' => $model->id]);
'attribute' => 'subfolder_name',
'format' => 'raw',
'value' => function ($model) {
$url = "https://devs.chenx221.cyou:8081/index.php?r=home%2Findex&directory=" . urlencode($model->task->folder_path.'/'.$model->subfolder_name);
$url = Url::to([
'home/index',
'directory' => $model->task->folder_path . '/' . $model->subfolder_name,
], true);
return Html::a($model->subfolder_name, $url, ['target' => '_blank']);
},
],