diff --git a/backend/modules/card/views/user-card/view.php b/backend/modules/card/views/user-card/view.php index 81f87a4..639c63e 100755 --- a/backend/modules/card/views/user-card/view.php +++ b/backend/modules/card/views/user-card/view.php @@ -72,21 +72,16 @@ $this->params['breadcrumbs'][] = $this->title; 'layout'=>"{items}", 'columns' => [ 'field.name:text:Поле', - 'value', [ - 'label' => 'Download', - 'format' => 'raw', - 'value' => function($model){ - if ($model->type_file == 'file'){ - return Html::a('Скачать', $model->value, ['target' => '_blank']); - } - return null; + 'attribute' => 'value', + 'format' => 'raw', + 'value' => function($model){ + if ($model->type_file == 'file'){ + return $model->value . ' (' . Html::a('Скачать', $model->value, ['target' => '_blank', 'download' => 'download']) . ')'; } + return $model->value; + } ], ], ]); ?> -fields[0]['type_file'] == 'file'): ?> -fields[0]['value'], ['target' => '_blank']); ?> - -