?> <?php echo Empleado::label(2); ?> </h4> <!-- widget action, you can also use btn, btn-group, nav-tabs or nav-pills (also support dropdown). enjoy! --> <div class="widget-action"> <button data-toggle="collapse" data-collapse="#widget-button" class="btn"> <i class="aweso-chevron-up color-cyan" data-toggle-icon="aweso-chevron-down aweso-chevron-up"></i> </button> </div> </div><!-- /widget header --> <!-- widget content --> <div class="widget-content bg-white"> <div style='overflow:auto'> <?php $dataProvider = ''; if (Util::getRolUser(Yii::app()->user->id) == 'OPERADOR') { $dataProvider = $model->activos()->searchSubAlterno(Empleado::model()->find('userid=:idUser', array(':idUser' => Yii::app()->user->id))->id, true); } else { $dataProvider = $model->noUser()->activos()->search(); } //$this->widget('bootstrap.widgets.TbGridView',array( $this->widget('ext.selgridview.BootSelGridView', array('id' => 'empleado-grid', 'type' => 'striped bordered hover advance ', 'template' => '{summary}{items}{pager}', 'dataProvider' => $dataProvider, 'pagerCssClass' => 'pagination text-center', 'selectableRows' => 2, 'filter' => $model, 'columns' => array(array('id' => 'check_id', 'class' => 'CCheckBoxColumn', 'value' => '$data->id'), array('name' => 'documento', 'value' => 'CHtml::link($data->documento, Yii::app()->createUrl("/personal/empleado/view", array("id"=>$data->id)))', 'type' => 'html'), array('name' => 'nombre_completo', 'value' => 'CHtml::link($data->nombre_completo, Yii::app()->createUrl("/personal/empleado/view", array("id"=>$data->id)))', 'type' => 'html'), array('name' => 'fecha_contratacion', 'value' => 'Util::FormatDate($data->fecha_contratacion, "Y/m/d")'), array('name' => 'usuario_creacion_id', 'value' => 'Yii::app()->user->um->loadUserById($data->usuario_creacion_id)->username'), array('name' => 'empleo_cargo_id', 'value' => 'isset($data->empleoCargo) ? $data->empleoCargo : null', 'filter' => CHtml::listData(EmpleoCargo::model()->findAll(), 'id', EmpleoCargo::representingColumn())), array('name' => 'horario_id', 'value' => 'isset($data->horario) ? $data->horario : null', 'filter' => CHtml::listData(Horario::model()->findAll(), 'id', Horario::representingColumn())), array('class' => 'CButtonColumn', 'template' => '{update} {delete}', 'deleteConfirmation' => CrugeTranslator::t('admin', 'Are you sure you want to delete this user'), 'buttons' => array('update' => array('label' => '<button class="btn btn-info"><i class="aweso-pencil"></i></button>', 'options' => array('title' => Yii::t('AweCrud.app', 'Update')), 'imageUrl' => false), 'delete' => array('label' => '<button class="btn btn-danger"><i class="aweso-trash"></i></button>', 'options' => array('title' => Yii::t('AweCrud.app', 'Delete')), 'imageUrl' => false)), 'htmlOptions' => array('width' => '80px'))))); ?> </div> </div> </div> </div> </div> <!--</fieldset>-->
echo $form->textFieldRow($model, 'curriculum', array('maxlength' => 200)); ?> <?php echo $form->textFieldRow($model, 'foto', array('maxlength' => 200)); ?> <?php echo $form->dropDownListRow($model, 'empleo_cargo_id', array('' => ' -- Seleccione -- ') + CHtml::listData(EmpleoCargo::model()->findAll(), 'id', EmpleoCargo::representingColumn())); ?> <?php echo $form->dropDownListRow($model, 'estado_empleo_id', array('' => ' -- Seleccione -- ') + CHtml::listData(EstadoEmpleo::model()->findAll(), 'id', EstadoEmpleo::representingColumn()), array('prompt' => Yii::t('AweApp', 'None'))); ?> <?php echo $form->dropDownListRow($model, 'direccion_id', array('' => ' -- Seleccione -- ') + CHtml::listData(Direccion::model()->findAll(), 'id', Direccion::representingColumn()), array('prompt' => Yii::t('AweApp', 'None'))); ?> <?php echo $form->dropDownListRow($model, 'horario_id', array('' => ' -- Seleccione -- ') + CHtml::listData(Horario::model()->findAll(), 'id', Horario::representingColumn()), array('prompt' => Yii::t('AweApp', 'None'))); ?> <div class="form-actions"> <?php $this->widget('bootstrap.widgets.TbButton', array('type' => 'primary', 'label' => Yii::t('AweCrud.app', 'Search'))); ?> </div> <?php $this->endWidget();
<div class="controls"> <?php // echo $form->textField($model, 'nombre', array('maxlength' => 64)) ?> <?php // echo $form->error($model, 'nombre') ?> </div> </div>--> <?php echo $form->textFieldRow($model, 'nombre', array('maxlength' => 45)); ?> <?php echo $form->dropDownListRow($model, 'horario_tipo_id', array('' => ' -- Seleccione -- ') + CHtml::listData(HorarioTipo::model()->findAll(), 'id', Horario::representingColumn()), array('placeholder' => null)); ?> <?php echo $form->timepickerRow($model, 'hora_inicio_jornada', array('options' => array('showMeridian' => false, 'defaultTime' => false, 'noAppend' => true), 'htmlOptions' => array('class' => 'span6'))); ?> <?php echo $form->timepickerRow($model, 'hora_inicio_reseso', array('options' => array('showMeridian' => false, 'defaultTime' => false, 'noAppend' => true), 'htmlOptions' => array('class' => 'span6'))); ?> <?php echo $form->timepickerRow($model, 'hora_fin_reseso', array('options' => array('showMeridian' => false, 'defaultTime' => false, 'noAppend' => true), 'htmlOptions' => array('class' => 'span6'))); ?> <?php echo $form->timepickerRow($model, 'hora_fin_jornada', array('options' => array('showMeridian' => false, 'defaultTime' => false, 'noAppend' => true), 'htmlOptions' => array('class' => 'span6'))); ?> <?php echo $form->textAreaRow($model, 'Descripcion', array('rows' => 3, 'cols' => 50));
</button> </div> </div><!-- /widget header --> <div class="widget-content form bg-white"> <div style='overflow:auto'> <?php $empleadosSubAlternos = $model->activos()->searchSubAlterno($model->id, true)->getData(); // var_dump($empleadosSubAlternos); ?> <div id="div-empleado-grid" style="<?php echo !$empleadosSubAlternos ? 'display: none;' : ''; ?> "> <?php //$this->widget('bootstrap.widgets.TbGridView',array( $this->widget('ext.selgridview.BootSelGridView', array('id' => 'empleado-grid', 'type' => 'striped bordered hover advance condensed', 'template' => '{summary}{items}{pager}', 'dataProvider' => $model->activos()->searchSubAlterno($model->id, true), 'pagerCssClass' => 'pagination text-center', 'selectableRows' => 2, 'columns' => array(array('name' => 'nombre_completo', 'value' => 'CHtml::link($data->nombre_completo, Yii::app()->createUrl("/personal/empleado/view", array("id"=>$data->id)))', 'type' => 'html'), array('name' => 'empleo_cargo_id', 'value' => 'isset($data->empleoCargo) ? $data->empleoCargo : null', 'filter' => CHtml::listData(EmpleoCargo::model()->findAll(), 'id', EmpleoCargo::representingColumn())), array('name' => 'horario_id', 'value' => 'isset($data->horario) ? $data->horario : null', 'filter' => CHtml::listData(Horario::model()->findAll(), 'id', Horario::representingColumn()))))); ?> </div> <?php if (Util::checkAccess(array('action_empleado_SubAlternos'))) { ?> <?php $this->widget('bootstrap.widgets.TbButton', array('id' => 'add-EmpleadoSubalterno', 'label' => !empty($empleadosSubAlternos) ? 'Agregar' : '<h3>Empleados A Cargo</h3>', 'encodeLabel' => false, 'icon' => !empty($empleadosSubAlternos) ? 'plus-sign' : 'group', 'htmlOptions' => array('onClick' => 'viewModal("personal/empleado/SubAlternos/id/' . $model->id . '",false,function(){' . 'maskAttributes();})', 'class' => !empty($empleadosSubAlternos) ? '' : 'empty-portlet'))); ?> <?php } else { ?> <?php $this->widget('bootstrap.widgets.TbButton', array('id' => 'add-EmpleadoSubalterno', 'label' => !empty($empleadosSubAlternos) ? 'Agregar' : '<h3>Empleados A Cargo</h3>', 'encodeLabel' => false, 'icon' => !empty($empleadosSubAlternos) ? 'plus-sign' : 'group', 'htmlOptions' => array('class' => !Util::checkAccess(array('action_empleado_SubAlternos')) && !empty($empleadosSubAlternos) ? 'hidden' : 'empty-portlet'))); ?>