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('index'),
4  $model->username,
5 );
6 $this->layout = '//layouts/column2';
7 $this->menu = array(
8  array('label' => UserModule::t('List User'), 'url' => array('index')),
9 );
10 ?>
11 <h1><?php echo UserModule::t('View User').' "'.$model->username.'"'; ?></h1>
12 <?php
13 
14 // For all users
15  $attributes = array(
16  'username',
17  );
18 
19  $profileFields = ProfileField::model()->forAll()->sort()->findAll();
20  if ($profileFields) {
21  foreach ($profileFields as $field) {
22  array_push($attributes, array(
23  'label' => UserModule::t($field->title),
24  'name' => $field->varname,
25  '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))),
26 
27  ));
28  }
29  }
30  array_push($attributes,
31  'create_at',
32  array(
33  'name' => 'lastvisit_at',
34  'value' => (($model->lastvisit_at != '0000-00-00 00:00:00') ? $model->lastvisit_at : UserModule::t('Not visited')),
35  )
36  );
37 
38  $this->widget('zii.widgets.CDetailView', array(
39  'data' => $model,
40  'attributes' => $attributes,
41  ));
42 
43 ?>