<?= DetailView::widget([
'model' => $model,
'mode' => 'view',
'attributes' => [
[
'attribute' => 'srok',
'format' => ['date','d.MM.Y'],
],
[
'attribute' => 'statusName',
'label' => 'Этап',
],
'columns' => [
[
'attribute' => 'oplata',
'valueColOptions' => ['style' => 'width:30%']
],
[
'attribute' => 'fact_oplata',
'valueColOptions' => ['style' => 'width:30%']
],
],
],
]) ?>
<?= DetailView::widget([
'model' => $model,
'mode' => 'view',
'attributes' => [
[
'attribute' => 'srok',
'format' => ['date','d.MM.Y'],
],
[
'attribute' => 'statusName',
'label' => 'Этап',
],
[
'attribute' => oplata,
'columns' => [
[
'attribute' => 'oplata',
'valueColOptions' => ['style' => 'width:30%']
],
[
'attribute' => 'fact_oplata',
'valueColOptions' => ['style' => 'width:30%']
],
],
]
],
]) ?>
attributes - array, the most important part of this widget configuration, this is a list of attributes to be displayed in the detail view. Each array element represents the specification for displaying one particular attribute. All these attribute settings from the yii\widgets\DetailView are supported.