Example #1
0
?>
    </div>
    <div class="span-8 last">
        <?php 
echo $form->label($model, 'account_name');
?>
        <?php 
echo $form->textField($model, 'account_name', array('maxlength' => 60));
?>
    </div>
    <div class="span-8 last">
        <?php 
echo $form->label($model, 'account_type');
?>
        <?php 
echo $form->dropDownList($model, 'account_type', GxHtml::listDataEx(PeChartTypes::model()->findAllAttributes(null, true)), array('prompt' => Yii::t('app', 'All')));
?>
    </div>
    <div class="span-8 last">
        <?php 
echo $form->label($model, 'inactive');
?>
        <?php 
echo $form->textField($model, 'inactive');
?>
    </div>
    <div class="span-8 last">
        <?php 
echo $form->label($model, 'description');
?>
        <?php 
Example #2
0
<?php

$this->breadcrumbs = array('Pe Chart Masters' => array('index'), Yii::t('app', 'Manage'));
$this->menu = array(array('label' => Yii::t('app', 'List') . ' PeChartMaster', 'url' => array('index')), array('label' => Yii::t('app', 'Create') . ' PeChartMaster', 'url' => array('create')));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('pe-chart-master-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<h1><?php 
echo Yii::t('app', 'Manage');
?>
 Pe Chart Masters</h1>

<p style="display:none">
    You may optionally enter a comparison operator (&lt;, &lt;=, &gt;, &gt;=, &lt;&gt; or =) at the beginning of each of
    your search values to specify how the comparison should be done.
</p>

<?php 
//echo GxHtml::link(Yii::t('app', 'Advanced Search'), '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
    <?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'pe-chart-master-grid', 'dataProvider' => $model->search(), 'itemsCssClass' => 'table', 'filter' => $model, 'columns' => array('account_code', 'account_code2', 'account_name', array('name' => 'account_type', 'value' => 'GxHtml::valueEx($data->accountType)', 'filter' => GxHtml::listDataEx(PeChartTypes::model()->findAllAttributes(null, true))), 'inactive', 'description', array('class' => 'CButtonColumn'))));
 public function actionIndex()
 {
     if (isset($_POST['limit'])) {
         $limit = $_POST['limit'];
     } else {
         $limit = 20;
     }
     if (isset($_POST['start'])) {
         $start = $_POST['start'];
     } else {
         $start = 0;
     }
     //$model = new PeChartTypes('search');
     //$model->unsetAttributes();
     $criteria = new CDbCriteria();
     //$criteria->limit = $limit;
     //$criteria->offset = $start;
     $model = PeChartTypes::model()->findAll($criteria);
     $total = PeChartTypes::model()->count($criteria);
     if (isset($_GET['PeChartTypes'])) {
         $model->attributes = $_GET['PeChartTypes'];
     }
     if (isset($_GET['output']) && $_GET['output'] == 'json') {
         $this->renderJson($model, $total);
     } else {
         $model = new PeChartTypes('search');
         $model->unsetAttributes();
         $this->render('admin', array('model' => $model));
     }
 }
Example #4
0
echo $form->labelEx($model, 'account_name');
?>
        <?php 
echo $form->textField($model, 'account_name', array('maxlength' => 60));
?>
        <?php 
echo $form->error($model, 'account_name');
?>
    </div>
    <!-- row -->
    <div class="span-8 last">
        <?php 
echo $form->labelEx($model, 'account_type');
?>
        <?php 
echo $form->dropDownList($model, 'account_type', GxHtml::listDataEx(PeChartTypes::model()->findAllAttributes(null, true)));
?>
        <?php 
echo $form->error($model, 'account_type');
?>
    </div>
    <!-- row -->
    <div class="span-8 last">
        <?php 
echo $form->labelEx($model, 'inactive');
?>
        <?php 
echo $form->textField($model, 'inactive');
?>
        <?php 
echo $form->error($model, 'inactive');