Example #1
0
    }
}
?>
<h1><?php 
echo $titulo;
?>
</h1>

<div class="search-form" style="display:none">
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->

		<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'seguimiento-comercial-abiertos-grid', 'dataProvider' => $model->search(), 'afterAjaxUpdate' => 'reinstallDatePickerSeguimiento', 'filter' => $model, 'columns' => array(array('header' => 'ID.', 'name' => 'id', 'value' => '$data->id', 'htmlOptions' => array('width' => '25')), array('header' => 'Fecha de acción', 'name' => 'fecha_accion', 'filter' => $this->widget('zii.widgets.jui.CJuiDatePicker', array('language' => 'es', 'model' => $model, 'attribute' => 'fecha_accion', 'options' => array('showAnim' => 'fold', 'language' => 'es', 'dateFormat' => 'dd-mm-yy', 'changeMonth' => true, 'changeYear' => true, 'yearRange' => '2014:2025'), 'htmlOptions' => array('id' => 'datepicker_for_fecha_accion', 'style' => 'height:20px;width:80px;'), 'defaultOptions' => array('showOn' => 'focus', 'showOtherMonths' => true, 'selectOtherMonths' => true, 'changeMonth' => true, 'changeYear' => true, 'showButtonPanel' => true)), true), 'value' => 'Yii::app()->dateformatter->format("dd-MM-yyyy",$data[\'fecha_accion\']);', 'htmlOptions' => array('width' => '80')), array('header' => 'Paciente', 'name' => 'paciente_id', 'filter' => CHtml::listData(Paciente::model()->findAll(array('order' => 'nombre ASC')), 'id', 'nombreCompleto'), 'value' => '$data->paciente->nombreCompleto', 'htmlOptions' => array('width' => '220')), 'n_identificacion', array('header' => 'Tema', 'name' => 'tema_id', 'filter' => CHtml::listData(SeguimientoTema::model()->findAll(array('order' => 'nombre ASC')), 'id', 'nombre'), 'value' => '$data[\'tema\'][\'nombre\']'), array('header' => 'Observaciones', 'name' => 'observaciones', 'value' => '$data->observaciones'), array('header' => 'Ultimo Seguimiento', 'name' => 'ultimo_seguimiento', 'value' => '$data->ultimo_seguimiento'), array('header' => 'Responsable de Seguimiento', 'name' => 'responsable_id', 'filter' => CHtml::listData(Personal::model()->findAll(array('order' => 'nombres ASC', 'condition' => "activo = 'SI'")), 'id', 'nombreCompleto'), 'value' => '$data[\'responsable\'][\'nombreCompleto\']'), array('header' => 'Registrado por:', 'name' => 'id_personal', 'filter' => CHtml::listData(Personal::model()->findAll(array('order' => 'nombres ASC', 'condition' => "activo = 'SI'")), 'id', 'nombreCompleto'), 'value' => '$data[\'idPersonal\'][\'nombreCompleto\']', 'htmlOptions' => array('width' => '220')))));
?>


	<?php 
Yii::app()->clientScript->registerScript('re-install-date-picker', "\nfunction reinstallDatePickerSeguimiento(id, data) {\n        //use the same parameters that you had set in your widget else the datepicker will be refreshed by default\n    \$('#datepicker_for_fecha_accion').datepicker(jQuery.extend({showMonthAfterYear:false},jQuery.datepicker.regional['es'],{'dateFormat':'dd-mm-yy'}));\n    //\$('#datepicker_for_fecha_accion').datepicker(\$.datepicker.regional[ 'es' ]);\n  //\$('#datepicker_for_fecha_accion').datepicker({dateFormat: 'dd-mm-yy'});\n}\n");
?>

<script>
    $(document).ready(function()
    {
        $('body').on('dblclick', '#seguimiento-comercial-abiertos-grid tbody tr', function(event)
        {
            var
                rowNum = $(this).index(),
                keys = $('#seguimiento-comercial-abiertos-grid > div.keys > span'),
Example #2
0
					<?php 
//$lafecha = '';
$this->widget('zii.widgets.jui.CJuiDatePicker', array('name' => 'fecha_accion', 'language' => 'es', 'model' => $tabla_seguimiento, 'attribute' => 'fecha_accion', 'value' => $lasfecha, 'options' => array('showAnim' => 'fold', 'language' => 'es', 'dateFormat' => 'dd-mm-yy'), 'htmlOptions' => array('style' => 'height:20px;width:80px;z-index:1151 !important;')));
?>
					</div>
					<?php 
echo $form->error($tabla_seguimiento, 'fecha_accion');
?>
				</div>

				<div class='span7'>
					<?php 
echo $form->labelEx($tabla_seguimiento, 'tema_id');
?>
					<?php 
echo $form->dropDownList($tabla_seguimiento, 'tema_id', CHtml::listData(SeguimientoTema::model()->findAll("estado = 'Activo' order by 'nombre'"), 'id', 'nombre'), array('class' => 'input-xlarge'));
?>
					<?php 
echo $form->error($tabla_seguimiento, 'tema_id');
?>
				</div>

				<div class = 'span7'>
					<?php 
echo $form->labelEx($tabla_seguimiento, 'responsable_id');
?>
					<?php 
echo $form->dropDownList($tabla_seguimiento, 'responsable_id', CHtml::listData(Personal::model()->findAll("activo = 'SI' order by 'nombreCompleto'"), 'id', 'nombreCompleto'), array('class' => 'input-xlarge'));
?>
					<?php 
echo $form->error($tabla_seguimiento, 'responsable_id');
 /**
  * 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 SeguimientoTema the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = SeguimientoTema::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }