Example #1
0
/** @var ContactoTelefonico $model */
/** @var AweActiveForm $form */
$form = $this->beginWidget('ext.AweCrud.components.AweActiveForm', array('id' => 'contacto-telefonico-form', 'type' => 'horizontal', 'enableAjaxValidation' => true, 'clientOptions' => array('validateOnSubmit' => TRUE, 'validateOnChange' => true), 'enableClientValidation' => false));
?>

<div class = "modal-header">
    <button type = "button" class = "close" data-dismiss = "modal" aria-hidden = "true">&times;
    </button>
    <h3 id = "sampleModal1" >
        <i class="aweso-phone"> 
            <?php 
echo $model->isNewRecord ? Yii::t('AweCrud.app', 'Create') : Yii::t('AweCrud.app', 'Update');
?>
 
            <?php 
echo ' ' . ContactoTelefonico::label();
?>
        </i>
    </h3>
</div>
<div class = "modal-body">
    <p class="note">
        <?php 
echo Yii::t('AweCrud.app', 'Fields with');
?>
 <span class="required">*</span>
        <?php 
echo Yii::t('AweCrud.app', 'are required');
?>
.                </p>
 /**
  * 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 = ContactoTelefonico::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Example #3
0
<?php

/** @var ContactoTelefonicoController $this */
/** @var ContactoTelefonico $model */
$this->breadcrumbs = array($model->label(2) => array('index'), Yii::t('app', $model->id) => array('view', 'id' => $model->id), Yii::t('AweCrud.app', 'Update'));
$this->header = '<i class="aweso-pencil aweso-2x"></i> ' . Yii::t('AweCrud.app', 'Update') . ' ' . ContactoTelefonico::label();
$this->menu = array(array('label' => Yii::t('AweCrud.app', 'Delete'), 'icon' => 'trash', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => Yii::t('AweCrud.app', 'Are you sure you want to delete this item?'))), array('label' => Yii::t('AweCrud.app', 'Manage'), 'icon' => 'list-alt', 'url' => array('admin')));
?>

<fieldset>    
    <?php 
echo $this->renderPartial('_form', array('model' => $model));
?>
</fieldset>
Example #4
0
<?php

/** @var ContactoTelefonicoController $this */
/** @var ContactoTelefonico $model */
$this->breadcrumbs = array('Contacto Telefonicos');
$this->menu = array(array('label' => Yii::t('AweCrud.app', 'Create') . ' ' . ContactoTelefonico::label(), 'icon' => 'plus', 'url' => array('create')), array('label' => Yii::t('AweCrud.app', 'Manage'), 'icon' => 'list-alt', 'url' => array('admin')));
?>

<fieldset>
    <legend>
        <?php 
echo Yii::t('AweCrud.app', 'List');
?>
 <?php 
echo ContactoTelefonico::label(2);
?>
    </legend>

<?php 
$this->widget('bootstrap.widgets.TbListView', array('dataProvider' => $dataProvider, 'itemView' => '_view'));
?>
</fieldset>
Example #5
0
<?php

/** @var ContactoTelefonicoController $this */
/** @var ContactoTelefonico $model */
$this->breadcrumbs = array($model->label(2) => array('index'), Yii::t('AweCrud.app', 'Create'));
$this->header = '<i class="aweso-paper-clip aweso-2x"></i> ' . Yii::t('AweCrud.app', 'Create') . ' ' . ContactoTelefonico::label();
$this->menu = array(array('label' => Yii::t('AweCrud.app', 'Manage'), 'icon' => 'list-alt', 'url' => array('admin')));
?>

<fieldset>
    
    <?php 
echo $this->renderPartial('_form', array('model' => $model));
?>
</fieldset>
Example #6
0
<div class="row-fluid">
    <div class="span12">
        <!-- widget button -->
        <div class="widget border-cyan" id="widget-button">

            <!-- widget header -->
            <div class="widget-header bg-cyan">
                <!-- widget title -->
                <h4 class="widget-title"><i class="aweso-user"></i> <?php 
echo Yii::t('AweCrud.app', $model->isNewRecord ? 'Create' : 'Update') . ' ' . ContactoTelefonico::label();
?>
</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 -->
            <div class="widget-content form bg-white">
                <?php 
/** @var ContactoTelefonicoController $this */
/** @var ContactoTelefonico $model */
/** @var AweActiveForm $form */
$form = $this->beginWidget('ext.AweCrud.components.AweActiveForm', array('id' => 'contacto-telefonico-form', 'type' => 'horizontal', 'enableAjaxValidation' => true, 'clientOptions' => array('validateOnSubmit' => false, 'validateOnChange' => true), 'enableClientValidation' => false));
?>

                <p class="note">
                    <?php 
echo Yii::t('AweCrud.app', 'Fields with');
Example #7
0
<?php

/** @var ContactoTelefonicoController $this */
/** @var ContactoTelefonico $model */
$this->breadcrumbs = array('Contacto Telefonicos' => array('index'), $model->id);
$this->header = '<i class="aweso-info-sign aweso-2x"></i> ' . Yii::t('AweCrud.app', 'View') . ' ' . ContactoTelefonico::label() . ' ' . CHtml::encode($model);
$this->menu = array(array('label' => Yii::t('AweCrud.app', 'Manage'), 'icon' => 'list-alt', 'url' => array('admin')));
?>

<fieldset>
    <div class="row-fluid">
        <div class="span5">
            <!-- widget button -->
            <div class="widget border-cyan" id="widget-button">

                <!-- widget header -->
                <div class="widget-header bg-cyan">
                    <!-- widget title -->
                    <h4 class="widget-title"><i class="aweso-info"></i> Informacion General</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">

                    <?php 
$this->widget('bootstrap.widgets.TbDetailView', array('data' => $model, 'attributes' => array('id', 'numero', 'tipo', 'principlal', 'estado', array('name' => 'empleado_id', 'value' => $model->empleado !== null ? CHtml::link($model->empleado, array('/empleado/view', 'id' => $model->empleado->id)) . ' ' : null, 'type' => 'html'))));
                <!-- widget title -->
                <h4 class="widget-title"><i class="aweso-phone"></i> <?php 
echo 'Telefono';
?>
</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-telefono" class="btn">
                        <i class="aweso-chevron-up color-amber" data-toggle-icon="aweso-chevron-down  aweso-chevron-up"></i>
                    </button>
                </div>
            </div><!-- /widget header -->
            <div class="widget-content form bg-white">
                <div style='overflow:auto'> 
                    <?php 
$modelTelefono = new ContactoTelefonico();
$telefeno = $modelTelefono->model()->activos()->de_empleado($model->id)->count();
?>
                    <div id="div-contacto-telefonico-grid" style="<?php 
echo !$telefeno ? 'display: none;' : '';
?>
">

                        <?php 
//$this->widget('bootstrap.widgets.TbGridView',array(
$this->widget('ext.selgridview.BootSelGridView', array('id' => 'contacto-telefonico-grid', 'type' => 'striped bordered hover advance condensed', 'template' => '{summary}{items}{pager}', 'dataProvider' => $modelTelefono->model()->activos()->de_empleado($model->id)->search(), 'pagerCssClass' => 'pagination text-center', 'selectableRows' => 2, 'columns' => array('numero', array('name' => 'tipo', 'filter' => array('FIJO' => 'FIJO', 'CELULAR' => 'CELULAR')), array('name' => 'principlal', 'filter' => array('SI' => 'SI', 'NO' => 'NO')), array('name' => 'estado', 'filter' => array('ACTIVO' => 'ACTIVO', 'INACTIVO' => 'INACTIVO')), 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')), 'url' => '"personal/contactoTelefonico/update/id/".$data->id', 'click' => 'function(e){e.preventDefault(); viewModal($(this).attr("href"),false,function() {maskAttributes();});  return false; }', 'imageUrl' => false), 'delete' => array('label' => '<button class="btn btn-danger"><i class="aweso-trash"></i></button>', 'options' => array('title' => Yii::t('AweCrud.app', 'Delete')), 'url' => 'array("contactoTelefonico/delete","id"=>$data->getPrimaryKey())', 'imageUrl' => false)), 'htmlOptions' => array('width' => '80px')))));
?>
                    </div>
                    <?php 
$this->widget('bootstrap.widgets.TbButton', array('id' => 'add-Telefonos', 'label' => $telefeno ? 'Teléfonos' : '<h3>Teléfonos</h3>', 'encodeLabel' => false, 'icon' => $telefeno ? 'plus-sign' : 'phone', 'htmlOptions' => array('onClick' => 'viewModal("personal/contactoTelefonico/create/idEmpleado/' . $model->id . '",false,function(){' . 'maskAttributes();})', 'class' => $telefeno ? '' : 'empty-portlet')));
?>