add_download
This commit is contained in:
parent
e8adc409c0
commit
53eea4d130
@ -72,21 +72,16 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'layout'=>"{items}",
|
||||
'columns' => [
|
||||
'field.name:text:Поле',
|
||||
'value',
|
||||
[
|
||||
'label' => 'Download',
|
||||
'attribute' => 'value',
|
||||
'format' => 'raw',
|
||||
'value' => function($model){
|
||||
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>
|
||||
|
Loading…
Reference in New Issue
Block a user