示例#1
0
 /**
  * Finds the MovimUf model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return MovimUf the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = MovimUf::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
示例#2
0
}
');
?>
<div class="uf-titularidad-view">

    <h3><?php 
echo Html::encode($this->title);
?>
</h3>

    <p>
		<?php 
if (\Yii::$app->user->can('altaModificarUfTit')) {
    if ($model->ultima) {
        echo Html::a('Modificar', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) . ' ';
        $mu = MovimUf::findOne($model->tipo_movim);
        if ($mu->cesion) {
            echo Html::a('Finalizar cesión', ['fin-cesion', 'uf' => $model->id_uf, 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => 'Procede con la finalización de la cesión?', 'method' => 'post']]) . ' ';
        } else {
            echo Html::a('Nuevo movimiento', ['create', 'uf' => $model->id_uf], ['class' => 'btn btn-danger']) . ' ';
        }
    }
}
?>

    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'options' => ['class' => 'table table-striped table-bordered table-condensed detail-view'], 'attributes' => ['tipoMovim.desc_movim_uf', 'fec_desde:date', 'fec_hasta:date']]);
?>