Last active
August 29, 2015 14:12
-
-
Save mrios/df87d2922c21d1b691c4 to your computer and use it in GitHub Desktop.
Controlador de listados de turnos de Enfermería
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class turnoenfermeria_list extends generic_controller_list_lite { | |
public function __construct() { | |
parent::__construct(); | |
//Se setean los parametros basicos del listado a mostrar | |
$this->setTitle("Turnos Enfermeria"); | |
$this->setModel('turnoEnfermeria'); | |
$this->setModule('admin'); | |
$this->setHeading('Turno Enfermeria'); | |
$this->setFieldFilterBy(array('nombre')); | |
$this->setEsBorradoLogico(true); | |
$this->setOrderBy('nombre'); | |
$fieldsList = array( | |
'inicio' => array( | |
'field' => 'inicio', | |
'model' => 'turnoEnfermeria', | |
'header' => 'Fecha Inicio', | |
'class' => 'date_format' | |
), | |
'fin' => array( | |
'field' => 'fin', | |
'model' => 'turnoEnfermeria', | |
'header' => 'Fecha Fin', | |
'class' =>'date_format' | |
), | |
'codigo' => array( | |
'field' => 'codigo', | |
'model' => 'turnoEnfermeria', | |
'header' => 'Código', | |
'class'=>'td_center' | |
), | |
); | |
$this->setFieldsList($fieldsList); | |
$fieldsActionList = array( | |
'codigo' => array( | |
'action' => 'js', | |
'nameFunction' => 'openDialogForm', | |
'module' => 'farmacia', | |
'params' => array(PREFIX_MODEL.'turnoEnfermeria','id', $this->getHeightForm(), $this->getWidthForm()), | |
'title' => 'Editar Farmacia', | |
) | |
, 'inicio' => array( | |
'action' => 'applyfnc', | |
'virtual'=> false, | |
'parseFnc' => | |
function ($valor,$registro) { | |
return $registro->getInicio()->format("H:i"); | |
} | |
) | |
, 'fin' => array( | |
'action' => 'applyfnc', | |
'virtual'=> false, | |
'parseFnc' => | |
function ($valor,$registro) { | |
return $registro->getFin()->format("H:i"); | |
} | |
) | |
); | |
$this->setFieldsActionList($fieldsActionList); | |
$this->setDesactivableByRelation(true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment