public function actionAdmin()
 {
     $model = new IguVoucher('search');
     $model->unsetAttributes();
     if (isset($_GET['IguVoucher'])) {
         $model->setAttributes($_GET['IguVoucher']);
     }
     $this->render('admin', array('model' => $model));
 }
Example #2
0
	<div class="row">
		<?php 
echo $form->label($model, 'idagent');
?>
		<?php 
echo $form->dropDownList($model, 'idagent', GxHtml::listDataEx(IguAgents::model()->findAllAttributes(null, true)), array('prompt' => Yii::t('app', 'All')));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'idvoucher');
?>
		<?php 
echo $form->dropDownList($model, 'idvoucher', GxHtml::listDataEx(IguVoucher::model()->findAllAttributes(null, true)), array('prompt' => Yii::t('app', 'All')));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'useddate');
?>
		<?php 
echo $form->textField($model, 'useddate');
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'givendate');
Example #3
0
<?php

$this->breadcrumbs = array(IguVoucher::label(2), Yii::t('app', 'Index'));
$this->menu = array(array('label' => Yii::t('app', 'Manage') . ' ' . IguVoucher::label(2), 'url' => array('admin')));
$this->beginWidget('zii.widgets.CPortlet', array('htmlOptions' => array('class' => '')));
$this->widget('bootstrap.widgets.TbMenu', array('type' => 'pills', 'items' => array(array('label' => 'Create', 'icon' => 'icon-plus', 'url' => Yii::app()->controller->createUrl('create'), 'linkOptions' => array()), array('label' => 'List', 'icon' => 'icon-th-list', 'url' => Yii::app()->controller->createUrl('index'), 'active' => true, 'linkOptions' => array()), array('label' => 'Manage', 'icon' => 'icon-search', 'url' => Yii::app()->controller->createUrl('admin'), 'linkOptions' => array('class' => 'search-button')))));
$this->endWidget();
?>

<h3><?php 
echo GxHtml::encode(IguVoucher::label(2));
?>
</h3>

<?php 
$this->widget('zii.widgets.CListView', array('dataProvider' => $dataProvider, 'itemView' => '_view'));
Example #4
0
<?php

$this->breadcrumbs = array($model->label(2) => array('index'), Yii::t('app', 'Manage'));
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('igu-voucher-management-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
$this->beginWidget('zii.widgets.CPortlet', array('htmlOptions' => array('class' => '')));
$this->widget('bootstrap.widgets.TbMenu', array('type' => 'pills', 'items' => array(array('label' => 'Create', 'icon' => 'icon-plus', 'url' => Yii::app()->controller->createUrl('create'), 'linkOptions' => array()), array('label' => 'List', 'icon' => 'icon-th-list', 'url' => Yii::app()->controller->createUrl('index'), 'linkOptions' => array()), array('label' => 'Manage', 'icon' => 'icon-search', 'url' => Yii::app()->controller->createUrl('admin'), 'active' => true, 'linkOptions' => array()))));
$this->endWidget();
?>

<h3><?php 
echo Yii::t('app', 'Manage') . ' ' . GxHtml::encode($model->label(2));
?>
</h3>


<?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' => 'igu-voucher-management-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('name' => 'idagent', 'value' => 'GxHtml::valueEx($data->idagent0)', 'filter' => GxHtml::listDataEx(IguAgents::model()->findAllAttributes(null, true))), array('name' => 'idvoucher', 'value' => 'GxHtml::valueEx($data->idvoucher0)', 'filter' => GxHtml::listDataEx(IguVoucher::model()->findAllAttributes(null, true))), 'useddate', 'givendate')));