Esempio n. 1
0
<?php

Util::tsRegisterAssetJs('_form.js');
/** @var ActividadController $this */
/** @var Actividad $model */
/** @var AweActiveForm $form */
?>
<div class="col-md-12">
    <div class="panel panel-primary">
        <div class="panel-heading">
            <h3 class="panel-title"><?php 
echo Yii::t('AweCrud.app', $model->isNewRecord ? 'Create' : 'Update') . ' ' . Actividad::label(1);
?>
</h3>
        </div>
        <div class="panel-body">

            <?php 
$form = $this->beginWidget('ext.AweCrud.components.AweActiveForm', array('type' => 'horizontal', 'id' => 'actividad-form', 'enableAjaxValidation' => true, 'clientOptions' => array('validateOnSubmit' => true, 'validateOnChange' => false), 'enableClientValidation' => false));
?>

            <?php 
echo $form->textFieldGroup($model, 'nombre', array('maxlength' => 45));
?>

            <?php 
if ($model->isNewRecord) {
    $data_sector = CHtml::listData(Sector::model()->activos()->findAll(), 'id', Sector::representingColumn());
    $data_subsector = null;
    $data_ramaActividad = null;
} else {
Esempio n. 2
0
<?php

/** @var ActividadController $this */
/** @var Actividad $model */
$this->menu = array(array('label' => "<div>" . CHtml::image(Yii::app()->baseUrl . "/images/topbar/administrar.png") . "</div>" . Yii::t('AweCrud.app', 'Manage'), 'url' => array('admin')), array('label' => "<div>" . CHtml::image(Yii::app()->baseUrl . "/images/topbar/nuevo.png") . "</div>" . Yii::t('AweCrud.app', 'Create'), 'url' => array('create')));
?>
<fieldset>
    <legend>
        <?php 
echo Yii::t('AweCrud.app', 'List');
?>
 <?php 
echo Actividad::label(2);
?>
    </legend>

<?php 
$this->widget('booster.widgets.TbListView', array('dataProvider' => $dataProvider, 'itemView' => '_view'));
?>
</fieldset>