Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
profile.php
1 <?php $this->pageTitle = Yii::app()->name . ' - ' . UserModule::t("Profile");
2 $this->breadcrumbs = array(
3  UserModule::t("Profile"),
4 );
5 ?><h2><?php echo UserModule::t('Your profile'); ?></h2>
6 <?php echo $this->renderPartial('menu'); ?>
7 
8 <?php if (Yii::app()->user->hasFlash('profileMessage')): ?>
9 <div class="success">
10  <?php echo Yii::app()->user->getFlash('profileMessage'); ?>
11 </div>
12 <?php endif; ?>
13 <table class="dataGrid">
14  <tr>
15  <th class="label"><?php echo CHtml::encode($model->getAttributeLabel('username')); ?>
16  </th>
17  <td><?php echo CHtml::encode($model->username); ?>
18  </td>
19  </tr>
20  <tr>
21  <th class="label"><?php echo CHtml::encode($model->getAttributeLabel('email')); ?>
22  </th>
23  <td><?php echo CHtml::encode($model->email); ?>
24  </td>
25  </tr>
26  <?php
27  $profileFields = ProfileField::model()->forOwner()->sort()->findAll();
28  if ($profileFields) {
29  foreach ($profileFields as $field) {
30  //echo "<pre>"; print_r($profile); die();
31  ?>
32  <tr>
33  <th class="label"><?php echo CHtml::encode(UserModule::t($field->title)); ?>
34  </th>
35  <td><?php echo (($field->widgetView($profile)) ? $field->widgetView($profile) : CHtml::encode((($field->range) ? Profile::range($field->range, $profile->getAttribute($field->varname)) : $profile->getAttribute($field->varname)))); ?>
36  </td>
37  </tr>
38  <?php
39  }
40  //$profile->getAttribute($field->varname)
41  }
42  ?>
43  <tr>
44  <th class="label"><?php echo CHtml::encode($model->getAttributeLabel('createtime')); ?>
45  </th>
46  <td><?php echo $model->createtime; ?>
47  </td>
48  </tr>
49  <tr>
50  <th class="label"><?php echo CHtml::encode($model->getAttributeLabel('lastvisit')); ?>
51  </th>
52  <td><?php echo $model->lastvisit; ?>
53  </td>
54  </tr>
55  <tr>
56  <th class="label"><?php echo CHtml::encode($model->getAttributeLabel('status')); ?>
57  </th>
58  <td><?php echo CHtml::encode(User::itemAlias("UserStatus", $model->status));
59  ?>
60  </td>
61  </tr>
62 </table>