cache : false, url : $(this).attr("href"), success : function(response) { if (response=="notFound") {return false;} $("#divvehiculos").html(response); $("#modalvehiculos").modal("show"); } }); return false;']); echo '</p>'; ?> <div class='container'> <div class='row'> <div class="col-md-9"> <?php echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'apellido', 'nombre', 'nombre2', 'tipoDoc.desc_tipo_doc_abr', 'nro_doc', 'foto', 'userCreatedBy.username', 'created_at:datetime', 'userUpdatedBy.username', 'updated_at:datetime', ['label' => 'Estado', 'value' => Personas::getEstados($model->estado)], 'motivo_baja']]); ?> </div> <div class="col-md-3"> <?php $sinImg = Yii::$app->urlManager->createUrl('images/sinfoto.png'); if (!empty($model->foto)) { $imgFile = Yii::$app->urlManager->createUrl('images/personas/' . $model->foto); echo Html::img($imgFile, ['class' => 'img-thumbnail pull-right', 'onerror' => "this.src='{$sinImg}'"]); } else { echo Html::img($sinImg, ['class' => 'img-thumbnail pull-right']); } ?> </div>
<?php use yii\helpers\Html; use yii\grid\GridView; use frontend\models\Personas; /* @var $this yii\web\View */ /* @var $searchModel frontend\models\VehiculosSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = Yii::t('app', 'Personas'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="personas-index"> <?php $columns = ['id', 'apellido', 'nombre', 'nombre2', ['attribute' => 'tipoDoc', 'value' => 'tipoDoc.desc_tipo_doc_abr'], 'nro_doc', ['attribute' => 'estado', 'value' => function ($data) { return Personas::getEstados($data->estado); }]]; ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => $columns, 'layout' => '{items}{pager}']); ?> </div>