title = $model->name; $this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Feedbacks'), 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; ?>

title) ?>

$model->id], ['class' => 'btn btn-primary']) ?> $model->id], [ 'class' => 'btn btn-danger', 'data' => [ 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), 'method' => 'post', ], ]) ?>

$model, 'attributes' => [ 'id', 'name', 'email:email', 'phone', 'message:ntext', 'created_at', 'ip', 'url:url', 'status:boolean', 'topic', [ 'attribute' => 'calc_json_info', 'label' => 'calculation info', 'value' => function(\common\models\Feedback $model, $widget) { return json_decode($model->calc_json_info, true); }, ], ], 'template' => function ($attribute, $index, $widget){ if( $attribute['attribute'] === 'calc_json_info' && !is_null($attribute['value']) ){ $result = ''; foreach ($attribute['value'] as $attr => $value){ $result .= ""; $result .= "".Feedback::translate_attributes[$attr].""; $result .= "{$value}"; $result .= ""; } return $result; } elseif ($attribute['attribute'] === 'created_at'){ return "{$attribute['label']}".\yii::$app->formatter->asDatetime($attribute['value'], 'php:d.m.Y H:i').""; } else{ return "{$attribute['label']}{$attribute['value']}"; } }, ]) ?>