HCE Project DC service web UI  0.2
Hierarchical Cluster Engine DC service web UI
 All Classes Namespaces Files Functions Variables Pages
view.php
Go to the documentation of this file.
1 <?php
2 $this->breadcrumbs = array(
3  UserModule::t('Users') => array('admin'),
4  $model->username,
5 );
6 
7 $this->menu = array(
8  array('label' => UserModule::t('Create User'), 'url' => array('create')),
9  array('label' => UserModule::t('Update User'), 'url' => array('update','id' => $model->id)),
10  array('label' => UserModule::t('Delete User'), 'url' => '#','linkOptions' => array('submit' => array('delete','id' => $model->id),'confirm' => UserModule::t('Are you sure to delete this item?'))),
11  array('label' => UserModule::t('Manage Profile Field'), 'url' => array('profileField/admin')),
12 );
13 ?>
14 <h1><?php echo UserModule::t('View User').' "'.$model->username.'"'; ?></h1>
15 
16 <?php
17 
18  $attributes = array(
19  'id',
20  'username',
21  );
22 
23  $profileFields = ProfileField::model()->forOwner()->sort()->findAll();
24  if ($profileFields) {
25  foreach ($profileFields as $field) {
26  array_push($attributes, array(
27  'label' => UserModule::t($field->title),
28  'name' => $field->varname,
29  'type' => 'raw',
30  'value' => (($field->widgetView($model->profile)) ? $field->widgetView($model->profile) : (($field->range) ? Profile::range($field->range, $model->profile->getAttribute($field->varname)) : $model->profile->getAttribute($field->varname))),
31  ));
32  }
33  }
34 
35  array_push($attributes,
36  'password',
37  'email',
38  'activkey',
39  'create_at',
40  'lastvisit_at',
41  array(
42  'name' => 'superuser',
43  'value' => User::itemAlias("AdminStatus", $model->superuser),
44  ),
45  array(
46  'name' => 'status',
47  'value' => User::itemAlias("UserStatus", $model->status),
48  )
49  );
50 
51  $this->widget('zii.widgets.CDetailView', array(
52  'data' => $model,
53  'attributes' => $attributes,
54  ));
55 
56 ?>