HCE Project DC service web UI  0.2
Hierarchical Cluster Engine DC service web UI
 All Classes Namespaces Files Functions Variables Pages
admin.php
Go to the documentation of this file.
1 <?php
6 ?>
7 <?php
8 echo "<?php\n";
9 $label = $this->pluralize($this->class2name($this->modelClass));
10 echo "\$this->breadcrumbs=array(
11  '$label'=>array('index'),
12  'Manage',
13 );\n";
14 ?>
15 
16 $this->menu=array(
17 array('label'=>'List <?php echo $this->modelClass; ?>','url'=>array('index')),
18 array('label'=>'Create <?php echo $this->modelClass; ?>','url'=>array('create')),
19 );
20 
21 Yii::app()->clientScript->registerScript('search', "
22 $('.search-button').click(function(){
23 $('.search-form').toggle();
24 return false;
25 });
26 $('.search-form form').submit(function(){
27 $.fn.yiiGridView.update('<?php echo $this->class2id($this->modelClass); ?>-grid', {
28 data: $(this).serialize()
29 });
30 return false;
31 });
32 ");
33 ?>
34 
35 <h1>Manage <?php echo $this->pluralize($this->class2name($this->modelClass)); ?></h1>
36 
37 <p>
38  You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>
39  &lt;&gt;</b>
40  or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
41 </p>
42 
43 <?php echo "<?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button btn')); ?>"; ?>
44 
45 <div class="search-form" style="display:none">
46  <?php echo "<?php \$this->renderPartial('_search',array(
47  'model'=>\$model,
48 )); ?>\n"; ?>
49 </div><!-- search-form -->
50 
51 <?php echo "<?php"; ?> $this->widget('booster.widgets.TbGridView',array(
52 'id'=>'<?php echo $this->class2id($this->modelClass); ?>-grid',
53 'dataProvider'=>$model->search(),
54 'filter'=>$model,
55 'columns'=>array(
56 <?php
57 $count = 0;
58 foreach ($this->tableSchema->columns as $column) {
59  if (++$count == 7) {
60  echo "\t\t/*\n";
61  }
62  echo "\t\t'" . $column->name . "',\n";
63 }
64 if ($count >= 7) {
65  echo "\t\t*/\n";
66 }
67 ?>
68 array(
69 'class'=>'booster.widgets.TbButtonColumn',
70 ),
71 ),
72 )); ?>