Files
yii/framework/cli/views/shell/crud/admin.php
2009-12-26 05:31:32 +00:00

35 lines
848 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
foreach($columns as $i=>$column)
{
if($i==6)
echo "\t\t/*\n";
echo "\t\t'".$column->name."',\n";
}
if($i>=6)
echo "\t\t*/\n";
?>
array(
'class'=>'CRudColumn',
),
),
)); ?>