mirror of
https://github.com/yiisoft/yii.git
synced 2026-03-10 18:16:53 +01:00
36 lines
864 B
PHP
36 lines
864 B
PHP
<?php
|
|
/**
|
|
* This is the template for generating the admin view for crud.
|
|
* The following variables are available in this template:
|
|
* - $ID: the primary key name
|
|
* - $modelClass: the model class name
|
|
* - $columns: a list of column schema objects
|
|
*/
|
|
?>
|
|
<h2>Managing <?php echo $modelClass; ?></h2>
|
|
|
|
<ul class="actions">
|
|
<li><?php echo "<?php echo CHtml::link('List {$modelClass}',array('index')); ?>"; ?></li>
|
|
<li><?php echo "<?php echo CHtml::link('Create {$modelClass}',array('create')); ?>"; ?></li>
|
|
</ul><!-- actions -->
|
|
|
|
<?php echo "<?php"; ?> $this->widget('zii.widgets.grid.CGridView', array(
|
|
'dataProvider'=>$dataProvider,
|
|
'columns'=>array(
|
|
<?php
|
|
$count=0;
|
|
foreach($columns as $column)
|
|
{
|
|
if(++$count==7)
|
|
echo "\t\t/*\n";
|
|
echo "\t\t'".$column->name."',\n";
|
|
}
|
|
if($count>=7)
|
|
echo "\t\t*/\n";
|
|
?>
|
|
array(
|
|
'class'=>'CRudColumn',
|
|
),
|
|
),
|
|
)); ?>
|