EliteConf
 All Data Structures Namespaces Files Functions Variables Pages
admin.php
Go to the documentation of this file.
1 <?php
2 /* @var $this MessageController */
3 /* @var $model Message */
4 
5 $this->breadcrumbs=array(
6  'Messages'=>array('index'),
7  'Manage',
8 );
9 
10 $this->menu=array(
11  array('label'=>'List Message', 'url'=>array('index')),
12  array('label'=>'Create Message', 'url'=>array('create')),
13 );
14 
15 Yii::app()->clientScript->registerScript('search', "
16 $('.search-button').click(function(){
17  $('.search-form').toggle();
18  return false;
19 });
20 $('.search-form form').submit(function(){
21  $.fn.yiiGridView.update('message-grid', {
22  data: $(this).serialize()
23  });
24  return false;
25 });
26 ");
27 ?>
28 
29 <h1>Manage Messages</h1>
30 
31 <p>
32 You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
33 or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
34 </p>
35 
36 <?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>
37 <div class="search-form" style="display:none">
38 <?php $this->renderPartial('_search',array(
39  'model'=>$model,
40 )); ?>
41 </div><!-- search-form -->
42 
43 <?php $this->widget('zii.widgets.grid.CGridView', array(
44  'id'=>'message-grid',
45  'dataProvider'=>$model->search(),
46  'filter'=>$model,
47  'columns'=>array(
48  'id',
49  'content',
50  array(
51  'class'=>'CButtonColumn',
52  ),
53  ),
54 )); ?>