commit
bf52f0b048
@ -31,6 +31,7 @@ class UserCard extends \common\models\UserCard
|
|||||||
['field_id' => $item->field_id,
|
['field_id' => $item->field_id,
|
||||||
'value' => $item->value,
|
'value' => $item->value,
|
||||||
'order' => $item->order,
|
'order' => $item->order,
|
||||||
|
'type_file' => $item->type_file,
|
||||||
'field_name' => $item->field->name]);
|
'field_name' => $item->field->name]);
|
||||||
}
|
}
|
||||||
$this->fields = $array;
|
$this->fields = $array;
|
||||||
@ -42,6 +43,7 @@ class UserCard extends \common\models\UserCard
|
|||||||
'value' => null,
|
'value' => null,
|
||||||
'order' => null,
|
'order' => null,
|
||||||
'field_name' => null,
|
'field_name' => null,
|
||||||
|
'type_file' => null,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -73,8 +73,20 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
'columns' => [
|
'columns' => [
|
||||||
'field.name:text:Поле',
|
'field.name:text:Поле',
|
||||||
'value',
|
'value',
|
||||||
|
[
|
||||||
|
'label' => 'Download',
|
||||||
|
'format' => 'raw',
|
||||||
|
'value' => function($model){
|
||||||
|
if ($model->type_file == 'file'){
|
||||||
|
return Html::a('Скачать', $model->value, ['target' => '_blank']);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
],
|
||||||
],
|
],
|
||||||
]); ?>
|
]); ?>
|
||||||
|
<!-- --><?php //if ($model->fields[0]['type_file'] == 'file'): ?>
|
||||||
|
<!-- --><?//= Html::a('Скачать', $model->fields[0]['value'], ['target' => '_blank']); ?>
|
||||||
|
<!-- --><?php //endif; ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -54,7 +54,7 @@ class FieldsValueNew extends \yii\db\ActiveRecord
|
|||||||
'item_type' => 'Item Type',
|
'item_type' => 'Item Type',
|
||||||
'order' => 'Order',
|
'order' => 'Order',
|
||||||
'value' => 'Value',
|
'value' => 'Value',
|
||||||
'type_file' => 'Приложение'
|
'type_file' => 'Тип файла'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user