This repository has been archived on 2024-12-01. You can view files and clone it, but cannot push or open issues or pull requests.
factuges_web/www/protected/modules/yii-user-master/views/profile/profile.php
david e93adbdd4e - Importación inicial
- Registro, activación y entrada de usuarios


git-svn-id: https://192.168.0.254/svn/Rodax.factuges_web/trunk@2 e455b18d-f7fe-5245-9c43-e2c35af70a32
2013-06-13 16:04:48 +00:00

57 lines
2.2 KiB
PHP

<?php $this->pageTitle=Yii::app()->name . ' - '.UserModule::t("Profile");
$this->breadcrumbs=array(
UserModule::t("Profile"),
);
$this->menu=array(
((UserModule::isAdmin())
?array('label'=>UserModule::t('Manage Users'), 'url'=>array('/user/admin'))
:array()),
array('label'=>UserModule::t('List User'), 'url'=>array('/user')),
array('label'=>UserModule::t('Edit'), 'url'=>array('edit')),
array('label'=>UserModule::t('Change password'), 'url'=>array('changepassword')),
array('label'=>UserModule::t('Logout'), 'url'=>array('/user/logout')),
);
?><h1><?php echo UserModule::t('Your profile'); ?></h1>
<?php if(Yii::app()->user->hasFlash('profileMessage')): ?>
<div class="success">
<?php echo Yii::app()->user->getFlash('profileMessage'); ?>
</div>
<?php endif; ?>
<table class="dataGrid">
<tr>
<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('username')); ?></th>
<td><?php echo CHtml::encode($model->username); ?></td>
</tr>
<?php
$profileFields=ProfileField::model()->forOwner()->sort()->findAll();
if ($profileFields) {
foreach($profileFields as $field) {
//echo "<pre>"; print_r($profile); die();
?>
<tr>
<th class="label"><?php echo CHtml::encode(UserModule::t($field->title)); ?></th>
<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)))); ?></td>
</tr>
<?php
}//$profile->getAttribute($field->varname)
}
?>
<tr>
<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('email')); ?></th>
<td><?php echo CHtml::encode($model->email); ?></td>
</tr>
<tr>
<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('create_at')); ?></th>
<td><?php echo $model->create_at; ?></td>
</tr>
<tr>
<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('lastvisit_at')); ?></th>
<td><?php echo $model->lastvisit_at; ?></td>
</tr>
<tr>
<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('status')); ?></th>
<td><?php echo CHtml::encode(User::itemAlias("UserStatus",$model->status)); ?></td>
</tr>
</table>