/** * Implements support for getting URLs, Tables and Views * @param string $name */ public function __get($name) { if (substr($name, -3) === 'Url') { if (isset($this->_urls[substr($name, 0, -3)])) { return Yum::route($this->_urls[substr($name, 0, -3)]); } } if (substr($name, -4) === 'View') { if (isset($this->_views[substr($name, 0, -4)])) { return $this->_views[substr($name, 0, -4)]; } } if (substr($name, -5) === 'Table') { if (isset($this->_tables[substr($name, 0, -5)])) { return $this->_tables[substr($name, 0, -5)]; } } return parent::__get($name); }
<? $this->pageTitle=Yii::app()->name . ' - '.Yii::t("UserModule.user", "Activate"); $this->breadcrumbs=array( Yii::t("UserModule.user", "Login") => array(Yum::route('{user}/login')), Yii::t("UserModule.user", "Activate")); $this->title = Yii::t("UserModule.user", "Activate"); ?> <? if(Yii::app()->user->hasFlash('registration')) { ?> <div class="success"> <? echo Yii::app()->user->getFlash('registration'); ?> </div> <? } ?> <? if($activateFromWeb): ?> <div class="form"> <? echo CHtml::beginForm(array('registration/activation'),'GET',array()); ?> <div id="activatiion_code"> <div class="row"> <? echo Yii::t("UserModule.user", "Enter the activation code you recieved below."); ?> </div> <div class="row"> <? if(isset($form->email)){
<?php $this->pageTitle = Yii::app()->name . ' - ' . Yii::t("UserModule.user", "Activate"); $this->breadcrumbs = array(Yii::t("UserModule.user", "Login") => array(Yum::route('{user}/login')), Yii::t("UserModule.user", "Activate")); $this->title = Yii::t("UserModule.user", "Activate"); ?> <?php if (Yii::app()->user->hasFlash('registration')) { ?> <div class="success"> <?php echo Yii::app()->user->getFlash('registration'); ?> </div> <?php } ?> <?php if ($activateFromWeb) { ?> <div class="form"> <?php echo CHtml::beginForm(array('registration/activation'), 'GET', array()); ?> <div id="activatiion_code"> <div class="row"> <?php
$this->widget('zii.widgets.CDetailView', array( 'data'=>$model, 'attributes'=>$attributes, )); } if(Yum::hasModule('role') && Yii::app()->user->isAdmin()) { Yii::import('application.modules.role.models.*'); echo '<h2>'.Yum::t('This user belongs to these roles:') .'</h2>'; if($model->roles) { echo "<ul>"; foreach($model->roles as $role) { echo CHtml::tag('li',array(),CHtml::link( $role->title,array(Yum::route('role/view'),'id'=>$role->id)),true); } echo "</ul>"; } else { printf('<p>%s</p>', Yum::t('None')); } } if(Yii::app()->user->isAdmin()) echo CHtml::Button( Yum::t('Update User'), array( 'submit' => array('user/update', 'id' => $model->id))); if(Yum::hasModule('profile')) echo CHtml::Button( Yum::t('Visit profile'), array(
$attributes = array('username'); if ($profiles) { $profileFields = YumProfileField::model()->forAll()->findAll(); if ($profileFields) { foreach ($profileFields as $field) { array_push($attributes, array('label' => Yii::t('UserModule.user', $field->title), 'name' => $field->varname, 'value' => $model->profile->getAttribute($field->varname))); } } } 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)); } if (Yum::hasModule('role') && Yii::app()->user->isAdmin()) { Yii::import('application.modules.role.models.*'); echo '<h2>' . Yum::t('This user belongs to these roles:') . '</h2>'; if ($model->roles) { echo "<ul>"; foreach ($model->roles as $role) { echo CHtml::tag('li', array(), CHtml::link($role->title, array(Yum::route('role/view'), 'id' => $role->id)), true); } echo "</ul>"; } else { printf('<p>%s</p>', Yum::t('None')); } } if (Yii::app()->user->isAdmin()) { echo CHtml::Button(Yum::t('Update User'), array('submit' => array('user/update', 'id' => $model->id))); } if (Yum::hasModule('profile')) { echo CHtml::Button(Yum::t('Visit profile'), array('submit' => array('//profile/profile/view', 'id' => $model->id))); }