?> </div> <div style="float: right; margin: 10px;"> <div class="row"> <?php echo $form->labelEx($model, 'superuser'); echo $form->dropDownList($model, 'superuser', YumUser::itemAlias('AdminStatus')); echo $form->error($model, 'superuser'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'status'); echo $form->dropDownList($model, 'status', YumUser::itemAlias('UserStatus')); echo $form->error($model, 'status'); ?> </div> <?php if (Yum::hasModule('role')) { Yii::import('application.modules.role.models.*'); ?> <div class="row roles"> <p> <?php echo Yum::t('User belongs to these roles'); ?> </p> <?php $this->widget('application.modules.user.components.Relation', array('model' => $model, 'relation' => 'roles', 'style' => 'dropdownlist', 'fields' => 'title', 'showAddButton' => false));
} else { $this->title = Yum::t('View user "{username}"', array('{username}' => $model->username)); } $this->breadcrumbs = array(Yum::t('Users') => array('index'), $model->username); echo Yum::renderFlash(); if (Yii::app()->user->isAdmin()) { $attributes = array('id'); if (!Yum::module()->loginType & UserModule::LOGIN_BY_EMAIL) { $attributes[] = 'username'; } if ($profiles && $model->profile) { foreach (YumProfile::getProfileFields() as $field) { array_push($attributes, array('label' => Yum::t($field), 'type' => 'raw', 'value' => $model->profile->getAttribute($field))); } } array_push($attributes, array('name' => 'createtime', 'value' => date(UserModule::$dateFormat, $model->createtime)), array('name' => 'lastvisit', 'value' => date(UserModule::$dateFormat, $model->lastvisit)), array('name' => 'lastpasswordchange', 'value' => date(UserModule::$dateFormat, $model->lastpasswordchange)), array('name' => 'superuser', 'value' => YumUser::itemAlias("AdminStatus", $model->superuser)), array('name' => Yum::t('Activation link'), 'value' => $model->getActivationUrl()), array('name' => 'status', 'value' => YumUser::itemAlias("UserStatus", $model->status))); $this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => $attributes)); } else { // For all users $attributes = array('username'); if ($profiles) { $profileFields = YumProfile::getProfileFields(); if ($profileFields) { foreach ($profileFields as $field) { array_push($attributes, array('label' => Yum::t($field), 'name' => $field, 'value' => $model->profile->getAttribute($field))); } } } array_push($attributes, array('name' => 'createtime', 'value' => date(UserModule::$dateFormat, $model->createtime)), array('name' => 'lastvisit', 'value' => date(UserModule::$dateFormat, $model->lastvisit))); $this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => $attributes)); }
'value' => date(UserModule::$dateFormat,$model->lastvisit), ), array( 'name' => 'lastpasswordchange', 'value' => date(UserModule::$dateFormat,$model->lastpasswordchange), ), array( 'name' => 'superuser', 'value' => YumUser::itemAlias("AdminStatus",$model->superuser), ), array( 'name' => Yum::t('Activation link'), 'value' =>$model->getActivationUrl()), array( 'name' => 'status', 'value' => YumUser::itemAlias("UserStatus",$model->status), ) ); $this->widget('zii.widgets.CDetailView', array( 'data'=>$model, 'attributes'=>$attributes, )); } else { // For all users $attributes = array( 'username', ); if($profiles) {
<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('lastvisit')); ?> </th> <td><?php echo date(UserModule::$dateFormat, $model->lastvisit); ?> </td> </tr> <tr> <th class="label"><?php echo CHtml::encode($model->getAttributeLabel('status')); ?> </th> <td><?php echo CHtml::encode(YumUser::itemAlias("UserStatus", $model->status)); ?> </td> </tr> </table> <div id="friends"> <h2> <?php echo Yum::t('My friends'); ?> </h2> <?php if (Yum::hasModule('friendship') && $model->friends) { foreach ($friends as $friend) { ?> <div id="friend">
<?php echo $form->labelEx($user, 'username'); echo $form->textField($user, 'username'); echo $form->error($user, 'username'); ?> <?php echo $form->labelEx($user, 'status'); echo $form->dropDownList($user, 'status', YumUser::itemAlias('UserStatus')); echo $form->error($user, 'status'); ?> <?php echo $form->labelEx($user, 'superuser'); echo $form->dropDownList($user, 'superuser', YumUser::itemAlias('AdminStatus')); echo $form->error($user, 'superuser'); ?> <p> Leave password <em> empty </em> to <?php echo $user->isNewRecord ? 'generate a random Password' : 'keep it <em> unchanged </em>'; ?> </p> <?php $this->renderPartial('/user/passwordfields', array('form' => $passwordform)); ?> <?php if (Yum::hasModule('role')) {