Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
view.php
1 <?php
2 $this->breadcrumbs=array(
3  UserModule::t('Users')=>array('index'),
4  $model->username,
5 );
6 ?>
7 <h1><?php echo UserModule::t('View User').' "'.$model->username.'"'; ?></h1>
8 
9 <ul class="actions">
10  <li><?php echo CHtml::link(UserModule::t('List User'),array('index')); ?></li>
11 </ul><!-- actions -->
12 
13 <?php
14 
15 // For all users
16  $attributes = array(
17  'username',
18  );
19 
20  $profileFields=ProfileField::model()->forAll()->sort()->findAll();
21  if ($profileFields) {
22  foreach($profileFields as $field) {
23  array_push($attributes,array(
24  'label' => UserModule::t($field->title),
25  'name' => $field->varname,
26  'value' => $model->profile->getAttribute($field->varname),
27  ));
28  }
29  }
30  array_push($attributes,
31  array(
32  'name' => 'createtime',
33  'value' => $model->createtime,
34  ),
35  array(
36  'name' => 'lastvisit',
37  'value' => (($model->lastvisit)? $model->lastvisit : UserModule::t('Not visited')),
38  )
39  );
40 
41  $this->widget('zii.widgets.CDetailView', array(
42  'data'=>$model,
43  'attributes'=>$attributes,
44  ));
45 
46 ?>