public function actionView($id)
{
$offer = null;
if (!Yii::$app->getUser()->getIsGuest()) {
$model = $this->findModel($id);
$offer = new Offer();
$offer->id_project = $model->id;
$offer->performer_id = Yii::$app->getUser()->getId();
$offer->date = date('Y-m-d');
}
return $this->render('view', [
'model' => $model,
'offer' => $offer
]);
}
<?php
$this->render('@app/views/offer/create', ['offer'=>$offer]);
?>
<div class="project-view-data">
Статус задачи: <?= $model->task_status?>
</div>
<div class="project-view-data">
<div>Описание:</div>
<?= $model->description ?>
</div>
<div></div>
.project-view
background-color: #F2F4F6
border: 1px solid #F2F4F6
border-radius: 10px
.project-view-data
padding: 15px 25px
border-bottom: 1px solid #D0D0D0
&:last-child
border-bottom: none