$DataProvider=new CActiveDataProvider('SaleInfo', array( 'criteria'=>array( 'condition'=>'user_id IS NULL', ), 'pagination' => array('pageSize' => 50,), ));
Monday, February 24, 2014
DataProvider with condition NULL value
Tuesday, February 18, 2014
Bootstrap TbTabs with with renderPartial
$this->widget('bootstrap.widgets.TbTabs', array( 'type'=>'tabs', 'tabs'=>array( array('label'=>'Personal Information', 'content'=>$this->renderPartial('details', array('model'=>$model),true,true)), array('label'=>'Business Information', 'content'=>$this->renderPartial('//businessprofile/details', array('model'=>$businessmodel,'id'=>$businessmodel->profile),true,true)), array('label'=>'Growthplan Information', 'content'=>$this->renderPartial('//growthplan/details', array('model'=>$growthplanmodel,'id'=>$growthplanmodel->profileid),true,true)), ), ));
CJuiTabs with renderPartial
$this->widget('zii.widgets.jui.CJuiTabs', array( 'tabs'=>array( 'Static tab'=>'Static content', 'Personal Information'=>$this->renderPartial('details', array('model'=>$model),true,true), 'Business Information'=>$this->renderPartial('//businessprofile/details', array('model'=>$businessmodel, 'id'=>$businessmodel->profile),true,true), ), 'options'=>array( 'collapsible'=>true, 'selected'=>1, ), 'htmlOptions'=>array( 'style'=>'width:500px;' ), ));
Sunday, February 16, 2014
CGridView and show detail in CJuiDialog
$this->widget('zii.widgets.grid.CGridView', array( ..... 'columns' => array( .... array( 'class' => 'CButtonColumn', 'buttons' => array( 'view' => array( 'url' => 'url' => 'Yii::app()->createUrl("/path/to/controller/view")', 'options' => array( 'ajax' => array( 'type' => 'POST', 'url' => "js:$(this).attr('href')", 'update' => '#detail-section', ), ), ), // view button ), ), ) ));
$this->beginWidget('zii.widgets.jui.CJuiDialog', array( 'id' => 'dlg-detail', 'options' => array( 'title' => 'Dialog Box Title', 'closeOnEscape' => true, 'autoOpen' => false, 'model' => false, 'width' => 550, 'height' => 450, ), ));<div id="detail-section"></div>
$this->endWidget();
Subscribe to:
Posts (Atom)