Beispiel #1
0
echo $form->textFieldRow($model, 'nombre', array('maxlength' => 45));
?>
                <?php 
echo $form->textFieldRow($model, 'sueldo', array('maxlength' => 10));
?>
                <?php 
// echo $form->textFieldRow($model, 'peso')
?>
                <?php 
echo $form->dropDownListRow($model, 'estado', array('VACANTE' => 'VACANTE', 'OCUPADO' => 'OCUPADO'), array('plaseholder' => null));
?>
                <?php 
// echo $form->dropDownListRow($model, 'empleo_departamento_id', array('' => ' -- Seleccione -- ') + CHtml::listData(EmpleoDepartamento::model()->findAll(), 'id', EmpleoDepartamento::representingColumn()), array('prompt' => null))
?>
                <?php 
echo $form->select2Row($model, 'empleo_departamento_id', array('asDropDownList' => true, 'data' => CHtml::listData(EmpleoDepartamento::model()->findAll(), 'id', EmpleoDepartamento::representingColumn()), 'options' => array('placeholder' => '-- Seleccione --')));
?>
                <?php 
echo $form->textAreaRow($model, 'descripcion', array('rows' => 3, 'cols' => 50));
?>
                <div class="form-actions bg-silver">
                    <div class="form-actions-float">
                        <?php 
$this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'success', '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>
Beispiel #2
0
            <!-- widget header -->
            <div class="widget-header bg-cyan">
                <!-- widget title -->
                <h4 class="widget-title"><i class="aweso-briefcase"></i> <?php 
echo Yii::t('AweCrud.app', 'Manage');
?>
 <?php 
echo EmpleoCargo::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.yiiSortableModel.widgets.SortableCGridView', array('id' => 'empleo-cargo-grid', 'type' => 'striped bordered hover advance ', 'template' => '{summary}{items}{pager}', 'dataProvider' => $model->search(), 'orderField' => 'peso', 'pagerCssClass' => 'pagination text-center', 'orderUrl' => 'reordenar', 'columns' => array(array('name' => 'nombre', 'type' => 'html', 'value' => '"<i class=\'icon-move\'></i> ".$data->nombre'), 'sueldo', array('name' => 'estado', 'filter' => array('VACANTE' => 'VACANTE', 'OCUPADO' => 'OCUPADO')), array('name' => 'empleo_departamento_id', 'value' => 'isset($data->empleoDepartamento) ? $data->empleoDepartamento : null', 'filter' => CHtml::listData(EmpleoDepartamento::model()->findAll(), 'id', EmpleoDepartamento::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' => 'Eliminar', 'onClick' => 'js:location.reload();'), 'imageUrl' => false)), 'htmlOptions' => array('width' => '80px')))));
?>
                </div>
            </div>
        </div>
    </div>
</div>
<!--</fieldset>-->