Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="span-11">
- <?php
- $this->widget('zii.widgets.grid.CGridView', array(
- 'id' => 'item-grid',
- 'dataProvider' => $modelA->search(),
- 'filter' => $modelA,
- 'columns' => array(
- array(
- 'name' => 'name',
- 'type' => 'raw',
- 'value' => '$data->name',
- 'filter' => CHtml::activeTextField($modelA, 'name'),
- ),
- ...
- array
- (
- 'class' => 'CButtonColumn',
- 'template' => '{add}',
- 'buttons' => array
- (
- 'add' => array
- (
- 'label' => 'Add',
- 'url' => 'Yii::app()->controller->createUrl("insertItem", array("id"=>$data->primaryKey))',
- ),
- ),
- ),
- ),
- ));
- ?>
- </div>
- <div class="span-12">
- <?php
- $this->widget('zii.widgets.grid.CGridView', array(
- 'id' => 'trn-grid',
- 'dataProvider' => $modelB->search(),
- 'columns' => array(
- array(
- 'name' => 'No.',
- 'value' => '$row + 1', //count rows
- 'htmlOptions' => array('style' => 'text-align: right',),
- ),
- ...
- array
- (
- 'class' => 'CButtonColumn',
- 'template' => '{delete}',
- 'buttons' => array
- (
- 'delete' => array
- (
- 'label' => 'Delete',
- 'imageUrl' => Yii::app()->request->baseUrl . '/images/delete.png',
- 'url' => 'Yii::app()->controller->createUrl("delete", array("id"=>$data->primaryKey))',
- ),
- ),
- ),
- ),
- ));
- ?>
- </div>
Add Comment
Please, Sign In to add comment