commit
9daff7afb3
@ -72,21 +72,16 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
'layout'=>"{items}",
|
'layout'=>"{items}",
|
||||||
'columns' => [
|
'columns' => [
|
||||||
'field.name:text:Поле',
|
'field.name:text:Поле',
|
||||||
'value',
|
|
||||||
[
|
[
|
||||||
'label' => 'Download',
|
'attribute' => 'value',
|
||||||
'format' => 'raw',
|
'format' => 'raw',
|
||||||
'value' => function($model){
|
'value' => function($model){
|
||||||
if ($model->type_file == 'file'){
|
if ($model->type_file == 'file'){
|
||||||
return Html::a('Скачать', $model->value, ['target' => '_blank']);
|
return $model->value . ' (' . Html::a('Скачать', $model->value, ['target' => '_blank', 'download' => 'download']) . ')';
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
return $model->value;
|
||||||
|
}
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
]); ?>
|
]); ?>
|
||||||
<!-- --><?php //if ($model->fields[0]['type_file'] == 'file'): ?>
|
|
||||||
<!-- --><?//= Html::a('Скачать', $model->fields[0]['value'], ['target' => '_blank']); ?>
|
|
||||||
<!-- --><?php //endif; ?>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user