HCE Project DC service web UI  0.2
Hierarchical Cluster Engine DC service web UI
 All Classes Namespaces Files Functions Variables Pages
index.php
Go to the documentation of this file.
1 <?php
2 $this->breadcrumbs = array(
3  UserModule::t('Users'),
4 );
5 
6 $this->menu = array(
7  array('label' => UserModule::t('Create User'), 'url' => array('create')),
8  array('label' => UserModule::t('Manage Profile Field'), 'url' => array('profileField/admin')),
9  array('label' => UserModule::t('Rights'), 'url' => array('//rights')),
10  array('label' => UserModule::t('Accounts'), 'url' => array('//account/account')),
11  array('label' => UserModule::t('Jobs'), 'url' => array('//job/Jobs')),
12 );
13 
14 Yii::app()->clientScript->registerScript('search', "
15 $('.search-button').click(function(){
16  $('.search-form').toggle();
17  return false;
18 });
19 $('.search-form form').submit(function(){
20  $.fn.yiiGridView.update('user-grid', {
21  data: $(this).serialize()
22  });
23  return false;
24 });
25 ");
26 
27 ?>
28 <h1><?php echo UserModule::t("Manage Users"); ?></h1>
29 
30 <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>
31 
32 <?php echo CHtml::link(UserModule::t('Advanced Search'), '#', array('class' => 'search-button')); ?>
33 <div class="search-form" style="display:none">
34 <?php $this->renderPartial('_search', array(
35  'model' => $model,
36 )); ?>
37 </div><!-- search-form -->
38 
39 <?php $this->widget('zii.widgets.grid.CGridView', array(
40  'id' => 'user-grid',
41  'dataProvider' => $model->search(),
42  'filter' => $model,
43  'columns' => array(
44  array(
45  'name' => 'id',
46  'type' => 'raw',
47  'value' => 'CHtml::link(CHtml::encode($data->id),array("admin/update","id"=>$data->id))',
48  ),
49  array(
50  'name' => 'username',
51  'type' => 'raw',
52  'value' => 'CHtml::link(UHtml::markSearch($data,"username"),array("admin/view","id"=>$data->id))',
53  ),
54  array(
55  'name' => 'email',
56  'type' => 'raw',
57  'value' => 'CHtml::link(UHtml::markSearch($data,"email"), "mailto:".$data->email)',
58  ),
59  'create_at',
60  'lastvisit_at',
61  array(
62  'name' => 'superuser',
63  'value' => 'User::itemAlias("AdminStatus",$data->superuser)',
64  'filter' => User::itemAlias("AdminStatus"),
65  ),
66  array(
67  'name' => 'status',
68  'value' => 'User::itemAlias("UserStatus",$data->status)',
69  'filter' => User::itemAlias("UserStatus"),
70  ),
71  array(
72  'class' => 'CButtonColumn',
73  'template' => '{view}{update}{delete}',
74  'buttons' => array(
75  'delete' => array(
76  'visible' => 'GRI::buttonByUsername($data->username)',
77  ),
78  'update' => array(
79  'visible' => 'GRI::buttonByUsername($data->username)',
80  ),
81  ),
82  ),
83  ),
84 )); ?>