Merge pull request #16 from apuc/add_holidays

add_download
This commit is contained in:
kavalar 2019-07-26 16:23:00 +03:00 committed by GitHub
commit 9daff7afb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}
],
],
]); ?>
<!-- --><?php //if ($model->fields[0]['type_file'] == 'file'): ?>
<!-- --><?//= Html::a('Скачать', $model->fields[0]['value'], ['target' => '_blank']); ?>
<!-- --><?php //endif; ?>
</div>