Exemplo n.º 1
0
            <!-- widget header -->
            <div class="widget-header bg-cyan">
                <!-- widget title -->
                <h4 class="widget-title"><i class="aweso-exchange"></i> <?php 
echo Yii::t('AweCrud.app', 'Manage');
?>
 <?php 
echo RegistroDiario::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 
//$this->widget('bootstrap.widgets.TbGridView',array(
$this->widget('ext.selgridview.BootSelGridView', array('id' => 'registro-diario-grid', 'type' => 'striped bordered hover advance ', 'template' => '{summary}{items}{pager}', 'dataProvider' => $model->search(), 'pagerCssClass' => 'pagination text-center', 'selectableRows' => 2, 'columns' => array('fecha', array('header' => 'inicio jornada', 'name' => 'hora_inicio_jornada', 'value' => 'Util::formatTime($data->hora_inicio_jornada)'), array('header' => 'inicio receso', 'name' => 'hora_inicio_reseso', 'value' => 'Util::formatTime($data->hora_inicio_jornada)'), array('header' => 'fin receso', 'name' => 'hora_fin_reseso', 'value' => 'Util::formatTime($data->hora_inicio_jornada)'), array('header' => 'fin receso', 'name' => 'hora_fin_jornada', 'value' => 'Util::formatTime($data->hora_inicio_jornada)'), array('name' => 'empleado_id', 'value' => 'isset($data->empleado) ? $data->empleado->nombre_completo : null'), array('name' => 'turno_id', 'value' => 'isset($data->turno) ? $data->turno : null', 'filter' => CHtml::listData(Turno::model()->findAll(), 'id', Turno::representingColumn())), array('class' => 'CButtonColumn', 'template' => '{update}', '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' => '40px')))));
?>
                </div>
            </div>
        </div>
    </div>
</div>
<!--</fieldset>-->
Exemplo n.º 2
0
 /**
  * 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 the ID of the model to be loaded
  */
 public function loadModel($id, $modelClass = __CLASS__)
 {
     $model = Turno::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Exemplo n.º 3
0
                        <?php 
echo $form->timepickerRow($model, 'hora_fin_jornada', array('options' => array('showMeridian' => false, 'defaultTime' => false, 'noAppend' => true), 'htmlOptions' => array('class' => 'span6')));
?>
                    </div>
                    <div class="span12">
                        <?php 
echo $form->textAreaRow($model, 'observaciones', array('rows' => 3, 'cols' => 50));
?>
                    </div>
                    <div class="span12">

                        <?php 
// echo $form->textFieldRow($model, 'horario_id')
?>
                        <?php 
echo $form->dropDownListRow($model, 'turno_id', array('' => ' -- Seleccione -- ') + CHtml::listData(Turno::model()->findAll(), 'id', Turno::representingColumn()), array('placeholder' => null));
?>
                    </div>
                </div>
                <div class="form-actions bg-silver">
                    <div class="form-actions-float">
                        <?php 
$this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => $model->isNewRecord ? Yii::t('AweCrud.app', 'Create') : Yii::t('AweCrud.app', 'Save')));
?>
                        <?php 
$this->widget('bootstrap.widgets.TbButton', array('label' => Yii::t('AweCrud.app', 'Cancel'), 'htmlOptions' => array('onclick' => 'javascript:history.go(-1)')));
?>
                    </div>
                </div>                
            </div>
        </div>