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
2 $this->breadcrumbs = array(
3  UserModule::t('Users') => array('//user/admin/admin'),
4  UserModule::t('Profile Fields'),
5 );
6 $this->menu = array(
7  array('label' => UserModule::t('Create Profile Field'), 'url' => array('create')),
8  array('label' => UserModule::t('Manage Profile Field'), 'url' => array('admin')),
9 );
10 
11 Yii::app()->clientScript->registerScript('search', "
12 $('.search-button').click(function(){
13  $('.search-form').toggle();
14  return false;
15 });
16 $('.search-form form').submit(function(){
17  $.fn.yiiGridView.update('profile-field-grid', {
18  data: $(this).serialize()
19  });
20  return false;
21 });
22 ");
23 
24 ?>
25 <h1><?php echo UserModule::t('Manage Profile Fields'); ?></h1>
26 
27 <p><?php echo UserModule::t("You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b> or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done."); ?></p>
28 
29 <?php echo CHtml::link(UserModule::t('Advanced Search'), '#', array('class' => 'search-button')); ?>
30 <div class="search-form" style="display:none">
31 <?php $this->renderPartial('_search', array(
32  'model' => $model,
33 )); ?>
34 </div><!-- search-form -->
35 
36 <?php $this->widget('zii.widgets.grid.CGridView', array(
37  'dataProvider' => $model->search(),
38  'filter' => $model,
39  'columns' => array(
40  'id',
41  array(
42  'name' => 'varname',
43  'type' => 'raw',
44  'value' => 'UHtml::markSearch($data,"varname")',
45  ),
46  array(
47  'name' => 'title',
48  'value' => 'UserModule::t($data->title)',
49  ),
50  array(
51  'name' => 'field_type',
52  'value' => '$data->field_type',
53  'filter' => ProfileField::itemAlias("field_type"),
54  ),
55  'field_size',
56  //'field_size_min',
57  array(
58  'name' => 'required',
59  'value' => 'ProfileField::itemAlias("required",$data->required)',
60  'filter' => ProfileField::itemAlias("required"),
61  ),
62  //'match',
63  //'range',
64  //'error_message',
65  //'other_validator',
66  //'default',
67  'position',
68  array(
69  'name' => 'visible',
70  'value' => 'ProfileField::itemAlias("visible",$data->visible)',
71  'filter' => ProfileField::itemAlias("visible"),
72  ),
73  //*/
74  array(
75  'class' => 'CButtonColumn',
76  ),
77  ),
78 )); ?>