Blame view

protected/modules/admin/gii/bcrud/templates/default/admin.php 925 Bytes
a1684257   Administrator   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
  <?php
  /**
   * The following variables are available in this template:
   * - $this: the CrudCode object
   */
  ?>
  <?php
  echo "<?php\n";
  $label=$this->pluralize($this->class2name($this->modelClass));
  ?>
  
  $this->actionsMenu = array(
      array('label' => 'Добавить <?php echo $this->modelClass; ?>', 'url' => array('create'), 'icon' => 'icon-plus', 'active' => '/'.$this->id.'\/create/'),
  );
  
  ?>
  
  <h1>Управление <?php echo $label; ?></h1>
  <br/>
  <?php echo "<?php"; ?> $this->widget('BGridView', array(
  	'id'=>'<?php echo $this->class2id($this->modelClass); ?>-grid',
  	'dataProvider'=>$model->search(),
  	'filter'=>$model,
  	'columns'=>array(
  <?php
  $count=0;
  foreach($this->tableSchema->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'=>'CButtonColumn',
              'template' => '{update} {delete}',
  		),
  	),
  )); ?>