/**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return SistemaOperativo the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = SistemaOperativo::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
示例#2
0
        <div class="panel panel-default">

            <div class="panel-heading">
                <h4 class="panel-title">
                    <a data-toggle="collapse" data-parent="#accordion" href="#collapse5">
                        Sistema Operativo
                    </a>
                </h4>
            </div>

            <div id="collapse5" class="panel-collapse collapse">
                <div class="panel-body">
                    <div class="col-md-6">
                        <?php 
    echo $form->dropDownListGroup($model, 'sistema_operativo_id', array('wrapperHtmlOptions' => array('class' => 'col-sm-5'), 'widgetOptions' => array('data' => CHtml::listData(SistemaOperativo::model()->findAll(), 'id', 'version'), 'htmlOptions' => array('prompt' => 'Seleccione Sistema Opertivo'))));
    ?>
                    </div>
                </div>
            </div>
        </div>
        <!-- FIN IMPRESORAS-->

        <!-- FOTO-->
        <?php 
    if ($model->localidad->proyecto->configuracions[0]->foto == 1) {
        ?>
        <div class="panel panel-default">

            <div class="panel-heading">
                <h4 class="panel-title">