<?php echo $form->field($model, 'description')->textarea(['rows' => 3]); ?> <?php echo $form->field($model, 'extras')->textarea(['rows' => 3]); ?> <?php echo $form->field($model, 'price'); ?> <?php echo $form->field($model, 'image_id', ['inputTemplate' => '<div class="input-group">{input}<span class="input-group-btn">' . '<button class="btn btn-success" onClick="refreshIds(' . $model->id . '); return false;" >Refresh</button></span></div>'])->dropDownList($model->imagesList); ?> <?php echo $form->field($model, 'status')->dropDownList(\common\enum\CarStatus::getList()); ?> <div class="form-group"> <div class="col-sm-offset-3 col-sm-10"> <?php echo Html::submitButton('Salvar', ['class' => 'btn btn-primary']); ?> <?php echo Html::a('Voltar', ['index'], ['class' => 'btn btn-info']); ?> </div> </div>
</td> <td class="hidden-xs"> <a class="btn btn-success pull-right" href="<?php echo yii\helpers\Url::toRoute('/car/create'); ?> ">Adicionar</a> </td> </tr> </tbody> </table> </div> <div class="car-index"> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $search, 'layout' => '{items}{pager}', 'columns' => ['id', ['attribute' => 'brand_id', 'format' => 'text', 'content' => function ($data) { return $data->carBrand->name; }], ['attribute' => 'model_id', 'format' => 'text', 'content' => function ($data) { return $data->carModel->name; }], ['attribute' => 'type_id', 'format' => 'text', 'content' => function ($data) { return $data->carType->name; }], ['attribute' => 'fuel_id', 'format' => 'text', 'content' => function ($data) { return $data->carFuel->name; }], 'price', ['attribute' => 'status', 'format' => 'text', 'content' => function ($data) { return \common\enum\CarStatus::toName($data->status); }], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update} {delete}']]]); ?> </div>