diff --git a/avatar/AvatarModule.php b/avatar/AvatarModule.php index 661a382..41d527b 100644 --- a/avatar/AvatarModule.php +++ b/avatar/AvatarModule.php @@ -1,11 +1,12 @@ - +setImport(array( - 'application.modules.user.controllers.*', - 'application.modules.user.models.*', - 'application.modules.avatar.controllers.*', - 'application.modules.avatar.models.*', + 'YumModulesRoot.user.controllers.*', + 'YumModulesRoot.user.models.*', + 'YumModulesRoot.avatar.controllers.*', + 'YumModulesRoot.avatar.models.*', )); } diff --git a/avatar/controllers/YumAvatarController.php b/avatar/controllers/YumAvatarController.php index 96c236f..2013a39 100644 --- a/avatar/controllers/YumAvatarController.php +++ b/avatar/controllers/YumAvatarController.php @@ -1,9 +1,9 @@ - +avatar = ''; $model->save(); $this->redirect(array( - Yum::module('profile')->profileViewRoute)); + Yum::module('profile')->profileViewRoute)); } public function actionEnableGravatar() { @@ -19,7 +19,7 @@ public function actionEnableGravatar() { $model->avatar = 'gravatar'; $model->save(); $this->redirect(array( - Yum::module('profile')->profileViewRoute)); + Yum::module('profile')->profileViewRoute)); } public function beforeAction($action) { @@ -53,7 +53,7 @@ public function actionEditAvatar() { Yum::log(Yum::t('User {username} uploaded avatar image {filename}', array( '{username}' => $model->username, '{filename}' => $model->avatar))); - $this->redirect(array('//profile/profile/view')); + $this->redirect(array('//profile/profile/view')); } } } diff --git a/avatar/views/avatar/edit_avatar.php b/avatar/views/avatar/edit_avatar.php index db23502..5d7dbc4 100644 --- a/avatar/views/avatar/edit_avatar.php +++ b/avatar/views/avatar/edit_avatar.php @@ -1,5 +1,5 @@
- echo Yii::t('app','Fields with');?> * echo Yii::t('app','are required');?>. + * .
- $form=$this->beginWidget('CActiveForm', array( +beginWidget('CActiveForm', array( 'id'=>'membership-form', 'enableAjaxValidation'=>true, )); echo $form->errorSummary($model); ?>= Yum::t('When the membership expires'); ?>:
- +isActive()) { ?> + +:
+ Yum::t('Automatically extend subscription'), 'cancel' => Yum::t('Cancel Subscription')); @@ -50,6 +50,6 @@ $data->subscribed == -1 ? 'cancel' : $data->subscribed, $options); echo CHtml::submitButton(Yum::t('Save')); ?> - = CHtml::endForm(); ?> - } ?> + +The Membership echo $model; ?> has been successfully created
+The Membership has been successfully created
- echo CHtml::Button(Yii::t('app', 'Back'), array('id' => $relation.'_done')); ?> echo CHtml::Button(Yii::t('app', 'Add another Membership'), array('id' => $relation.'_create')); + $relation.'_done')); ?> $relation.'_create')); diff --git a/membership/views/membership/update.php b/membership/views/membership/update.php index e3e8649..71a9965 100644 --- a/membership/views/membership/update.php +++ b/membership/views/membership/update.php @@ -1,13 +1,10 @@ - +title = Yum::t('Memberships'); $this->breadcrumbs=array( Yum::t('Memberships')=>array('index'), Yum::t('Update'), ); -?> - -- echo Yum::requiredFieldNote(); ?> +
- $form=$this->beginWidget('CActiveForm', array( +beginWidget('CActiveForm', array( 'id'=>'payment-form', 'enableAjaxValidation'=>true, )); echo $form->errorSummary($model); ?>The Payment echo $model; ?> has been successfully created
+The Payment has been successfully created
- echo CHtml::Button(Yii::t('app', 'Back'), array('id' => $relation.'_done')); ?> echo CHtml::Button(Yii::t('app', 'Add another Payment'), array('id' => $relation.'_create')); + $relation.'_done')); ?> $relation.'_create')); diff --git a/membership/views/payment/update.php b/membership/views/payment/update.php index 1cd770d..bd00dca 100644 --- a/membership/views/payment/update.php +++ b/membership/views/payment/update.php @@ -1,14 +1,11 @@ - +title = Yum::t('Update payment type').': '.$model->title; $this->breadcrumbs=array( Yum::t('Payments')=>array('index'), $model->id=>array('view','id'=>$model->id), Yii::t('app', 'Update'), ); -?> -echo CHtml::link(Yum::t('Back to inbox'), array('index')); ?>
+diff --git a/message/views/message/view.php b/message/views/message/view.php index a495ecb..33e1973 100644 --- a/message/views/message/view.php +++ b/message/views/message/view.php @@ -1,21 +1,21 @@ - +title = $model->title; $this->breadcrumbs=array(Yum::t('Messages')=>array('index'),$model->title); ?> -
echo Yum::requiredFieldNote(); ?>
+ - echo CHtml::errorSummary($model); ?> +echo Yum::t('Allowed are lowercase letters and digits.'); ?>
+ + 60,'maxlength'=>50,$model->id!==null?'readonly':'')); ?> + +echo Yum::t('Field name on the language of "sourceLanguage".'); ?>
+ + 60,'maxlength'=>255)); ?> + +echo Yum::t('Hint displayed to user e.g "You can enter more values and separate them using comma".'); ?>
+ + 60)); ?> + +echo Yum::t('Column field type in the database'); ?>
+ +echo Yum::t('Field size in the database.'); ?>
+ + id!==null?'readonly':'')); ?> + +echo Yum::t('The minimum value of the field (form validator).'); ?>
+ + + +echo Yum::t('Required field (form validator).'); ?>
+ + + +echo Yum::t("Regular expression (example: '/^[A-Za-z0-9\s,]+$/u')."); ?>
+ + 60,'maxlength'=>255)); ?> + +echo Yum::t('Predefined values (example: 1, 2, 3, 4, 5;).'); ?>
+ + 60,'maxlength'=>255)); ?> + +echo Yum::t('Error message when validation fails.'); ?>
+ + 60,'maxlength'=>255)); ?> + +echo Yum::t('The value of the default field (database).'); ?>
+ + 60,'maxlength'=>255,$model->id!==null?'readonly':''));?> + +echo Yii::t("UserModule.user",'Display order of fields.'); ?>
+ + + +- Yum::requiredFieldNote(); ?> +
- $form=$this->beginWidget('CActiveForm', array( +beginWidget('CActiveForm', array( 'id'=>'privacysetting-form', 'enableAjaxValidation'=>true, )); @@ -23,7 +23,7 @@ ?>' . Yum::t('Select the fields that should be public') . ':
'; $i = 1; @@ -51,29 +51,29 @@echo Yum::t('Separate usernames with comma to ignore specified users'); ?>
+
echo CHtml::encode($model->getAttributeLabel('username')); ?> + | getAttributeLabel('username')); ?> | -echo CHtml::encode($model->username); ?> + | username); ?> |
---|---|---|---|
echo CHtml::encode(Yum::t($field->title)); ?> + | title)); ?> | -+ | profile->{ucfirst($field->varname)})) echo CHtml::encode($model->profile->{ucfirst($field->varname)}->{$field->related_field_name}); ?> |
echo CHtml::encode(Yum::t($field->title)); ?> + | title)); ?> | -echo CHtml::encode($model->profile->getAttribute($field->varname)); ?> + | profile->getAttribute($field->varname)); ?> |
echo CHtml::encode($model->getAttributeLabel('password')); ?> + | getAttributeLabel('password')); ?> | -echo CHtml::link(Yum::t('Change password'),array( + | |
echo CHtml::encode($model->getAttributeLabel('createtime')); ?> + | getAttributeLabel('createtime')); ?> | -echo date(UserModule::$dateFormat,$model->createtime); ?> + | createtime); ?> |
echo CHtml::encode($model->getAttributeLabel('lastvisit')); ?> + | getAttributeLabel('lastvisit')); ?> | -echo date(UserModule::$dateFormat,$model->lastvisit); ?> + | lastvisit); ?> |
echo CHtml::encode($model->getAttributeLabel('status')); ?> + | getAttributeLabel('status')); ?> | -echo CHtml::encode(YumUser::itemAlias("UserStatus",$model->status)); + | status)); ?> |
echo Yum::t($field->title); ?> | -echo $profile->{$field->varname}; ?> | +title); ?> | +{$field->varname}; ?> |
---|
If you have changed some of the default values, you now only need to modify your config/main.php file to reflect the changes below in user module configuration:
'modules'=> array(
-
+ $config) {
echo "'$module' => array(";
if ($module == 'user') echo "'debug' => false,";
@@ -31,6 +31,6 @@
Please change the Administrator Password to something better than
the default password.
-
+
diff --git a/user/views/layouts/install.php b/user/views/layouts/install.php
index ace649c..a82a83c 100644
--- a/user/views/layouts/install.php
+++ b/user/views/layouts/install.php
@@ -1,5 +1,5 @@
-
+
- echo $content; ?>
+
diff --git a/user/views/layouts/yum.php b/user/views/layouts/yum.php
index c01395a..9d4d55e 100644
--- a/user/views/layouts/yum.php
+++ b/user/views/layouts/yum.php
@@ -1,32 +1,32 @@
-
+clientScript->registerCssFile(
Yii::app()->getAssetManager()->publish(
- Yii::getPathOfAlias('YumModule.assets.css').'/yum.css'));
+ Yii::getPathOfAlias('YumAssets.css').'/yum.css'));
$module = Yum::module();
$this->beginContent($module->baseLayout); ?>
-
+debug) {
echo CHtml::openTag('div', array(
'style' => 'background-color: red;color:white;padding:5px;'));
- echo Yum::t(
- 'You are running the Yii User Management Module {version} in Debug Mode!', array(
+ echo Yum::t('You are running the Yii User Management Module {version} in Debug Mode!', array(
'{version}' => Yum::module()->version));
echo CHtml::closeTag('div');
}
?>
-
+title)
printf(' %s
', $this->title); ?>
- echo $content; ?>
+
- $this->endContent(); ?>
+endContent(); ?>
diff --git a/user/views/statistics/statistics.php b/user/views/statistics/statistics.php
index 9e10d39..b48953a 100644
--- a/user/views/statistics/statistics.php
+++ b/user/views/statistics/statistics.php
@@ -1,4 +1,4 @@
-
+title = Yum::t('Statistics');
$this->breadcrumbs = array(
diff --git a/user/views/translation/_form.php b/user/views/translation/_form.php
index fa1ba34..36a7955 100644
--- a/user/views/translation/_form.php
+++ b/user/views/translation/_form.php
@@ -1,46 +1,46 @@
- $form=$this->beginWidget('CActiveForm', array(
+beginWidget('CActiveForm', array(
'id'=>'translation-form',
'enableAjaxValidation'=>true,
'enableClientValidation'=>true,
)); ?>
- echo Yum::requiredFieldNote(); ?>
+
- echo $form->errorSummary($models); ?>
+ errorSummary($models); ?>
- echo $form->labelEx($models[0],'message'); ?>
- echo $form->textField($models[0],'message'); ?>
- echo $form->error($models[0],'message'); ?>
+ labelEx($models[0],'message'); ?>
+ textField($models[0],'message'); ?>
+ error($models[0],'message'); ?>
- echo $form->labelEx($models[0],'category'); ?>
- echo $form->textField($models[0],'category'); ?>
- echo $form->error($models[0],'category'); ?>
+ labelEx($models[0],'category'); ?>
+ textField($models[0],'category'); ?>
+ error($models[0],'category'); ?>
- foreach($models as $model) { ?>
+
- echo CHtml::label($model->language, 'translation_'.$model->language); ?>
- echo CHtml::textField('translation_'.$model->language, $model->translation); ?>
+ language, 'translation_'.$model->language); ?>
+ language, $model->translation); ?>
- } ?>
+
- $this->endWidget(); ?>
+endWidget(); ?>
diff --git a/user/views/translation/admin.php b/user/views/translation/admin.php
index a8ae700..8463c35 100644
--- a/user/views/translation/admin.php
+++ b/user/views/translation/admin.php
@@ -1,13 +1,13 @@
-
+breadcrumbs=array(
Yum::t('Translation')=>array('admin'),
Yum::t('Manage'),
);
?>
- echo Yum::t('Manage Translations'); ?>
+
- $this->widget('zii.widgets.grid.CGridView', array(
+widget('zii.widgets.grid.CGridView', array(
'id'=>'category-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
@@ -32,4 +32,4 @@
),
)); ?>
- echo CHtml::link(Yum::t('Create new Translation'), array('create')); ?>
+
diff --git a/user/views/translation/create.php b/user/views/translation/create.php
index ec7de8a..48e11c7 100644
--- a/user/views/translation/create.php
+++ b/user/views/translation/create.php
@@ -1,4 +1,4 @@
-
+breadcrumbs=array(
Yum::t('Translation')=>array('index'),
Yum::t('Create'),
@@ -6,6 +6,6 @@
?>
- echo Yum::t('Create translation'); ?>
+
- echo $this->renderPartial('_form', array('model'=>$model)); ?>
+renderPartial('_form', array('model'=>$model)); ?>
diff --git a/user/views/translation/update.php b/user/views/translation/update.php
index 6e05e3d..22edbcd 100644
--- a/user/views/translation/update.php
+++ b/user/views/translation/update.php
@@ -1,4 +1,4 @@
-
+breadcrumbs=array(
Yum::t('Translation')=>array('admin'),
sprintf('%s-%s-%s',
@@ -11,7 +11,7 @@
?>
-
+isNewRecord)
echo Yum::t('New translation');
@@ -19,4 +19,4 @@
echo Yum::t('Update translation {message}', array(
'{message}' => $models[0]->message)); ?>
- echo $this->renderPartial('_form', array('models'=>$models)); ?>
+renderPartial('_form', array('models'=>$models)); ?>
diff --git a/user/views/user/_activation_passwordform.php b/user/views/user/_activation_passwordform.php
index fb1aef1..03f51bc 100644
--- a/user/views/user/_activation_passwordform.php
+++ b/user/views/user/_activation_passwordform.php
@@ -1,22 +1,22 @@
- echo CHtml::beginForm() ?>
- echo CHtml::errorSummary($form); ?>
+
+
- echo CHtml::hiddenField('email', $email); ?>
- echo CHtml::hiddenField('activationKey', $key); ?>
+
+
- echo CHtml::activeLabelEx($form,'password'); ?>
- echo CHtml::activePasswordField($form,'password'); ?>
+
+
- echo CHtml::activeLabelEx($form,'verifyPassword'); ?>
- echo CHtml::activePasswordField($form,'verifyPassword'); ?>
+
+
- echo CHtml::submitButton() ?>
+
- echo CHtml::endForm() ?>
+
diff --git a/user/views/user/_form.php b/user/views/user/_form.php
index a516ed1..f3d77ac 100644
--- a/user/views/user/_form.php
+++ b/user/views/user/_form.php
@@ -1,5 +1,5 @@
-
+beginWidget('CActiveForm', array(
'id'=>'user-form',
@@ -7,9 +7,9 @@
?>
- echo Yum::requiredFieldNote(); ?>
+
-
+
- echo $form->labelEx($model, 'superuser');
+labelEx($model, 'superuser');
echo $form->dropDownList($model, 'superuser',YumUser::itemAlias('AdminStatus'));
echo $form->error($model, 'superuser'); ?>
- echo $form->labelEx($model,'status');
+labelEx($model,'status');
echo $form->dropDownList($model,'status',YumUser::itemAlias('UserStatus'));
echo $form->error($model,'status'); ?>
- if(Yum::hasModule('role')) {
- Yii::import('application.modules.role.models.*');
+
- echo Yum::t('User belongs to these roles'); ?>
+
- $this->widget('YumModule.components.Relation', array(
+ widget('YumComponents.Relation', array(
'model' => $model,
'relation' => 'roles',
'style' => 'dropdownlist',
@@ -43,36 +43,36 @@
'showAddButton' => false
)); ?>
- } ?>
+
- echo $form->labelEx($model, 'username');
+labelEx($model, 'username');
echo $form->textField($model, 'username');
echo $form->error($model, 'username'); ?>
- Leave password empty to
- echo $model->isNewRecord
-? 'generate a random Password'
+
Leave password empty to
+isNewRecord
+? 'generate a random Password'
: 'keep it unchanged '; ?>
- $this->renderPartial('/user/passwordfields', array(
+renderPartial('/user/passwordfields', array(
'form'=>$passwordform)); ?>
- if(Yum::hasModule('profile'))
-$this->renderPartial('application.modules.profile.views.profile._form', array(
+renderPartial('YumModulesRoot.profile.views.profile._form', array(
'profile' => $profile)); ?>
- $this->endWidget(); ?>
+endWidget(); ?>
diff --git a/user/views/user/_miniform.php b/user/views/user/_miniform.php
index e8d780d..684d80f 100644
--- a/user/views/user/_miniform.php
+++ b/user/views/user/_miniform.php
@@ -1,5 +1,5 @@
- $form=$this->beginWidget('CActiveForm', array(
+beginWidget('CActiveForm', array(
'id'=>'yum-user-form',
'enableAjaxValidation'=>true,
));
@@ -9,47 +9,47 @@
?>
- echo $form->labelEx($model,'username') ?>
- echo $form->textField($model,'username',array('size'=>20,'maxlength'=>20)) ?>
- echo $form->error($model,'username') ?>
+labelEx($model,'username') ?>
+textField($model,'username',array('size'=>20,'maxlength'=>20)) ?>
+error($model,'username') ?>
- echo $form->labelEx($model,'password') ?>
- echo $form->passwordField($model,'password',array('size'=>60,'maxlength'=>128)) ?>
- echo $form->error($model,'password') ?>
+labelEx($model,'password') ?>
+passwordField($model,'password',array('size'=>60,'maxlength'=>128)) ?>
+error($model,'password') ?>
- echo $form->labelEx($model,'activationKey') ?>
- echo $form->textField($model,'activationKey',array('size'=>60,'maxlength'=>128)) ?>
- echo $form->error($model,'activationKey') ?>
+labelEx($model,'activationkey') ?>
+textField($model,'activationkey',array('size'=>60,'maxlength'=>128)) ?>
+error($model,'activationkey') ?>
- echo $form->labelEx($model,'createtime') ?>
- echo $form->textField($model,'createtime') ?>
- echo $form->error($model,'createtime') ?>
+labelEx($model,'createtime') ?>
+textField($model,'createtime') ?>
+error($model,'createtime') ?>
- echo $form->labelEx($model,'lastvisit') ?>
- echo $form->textField($model,'lastvisit') ?>
- echo $form->error($model,'lastvisit') ?>
+labelEx($model,'lastvisit') ?>
+textField($model,'lastvisit') ?>
+error($model,'lastvisit') ?>
- echo $form->labelEx($model,'lastpasswordchange') ?>
- echo $form->textField($model,'lastpasswordchange') ?>
- echo $form->error($model,'lastpasswordchange') ?>
+labelEx($model,'lastpasswordchange') ?>
+textField($model,'lastpasswordchange') ?>
+error($model,'lastpasswordchange') ?>
- echo $form->labelEx($model,'superuser') ?>
- echo $form->textField($model,'superuser') ?>
- echo $form->error($model,'superuser') ?>
+labelEx($model,'superuser') ?>
+textField($model,'superuser') ?>
+error($model,'superuser') ?>
- echo $form->labelEx($model,'status') ?>
- echo $form->textField($model,'status') ?>
- echo $form->error($model,'status') ?>
+labelEx($model,'status') ?>
+textField($model,'status') ?>
+error($model,'status') ?>
-
+ "$('#dialog_yumuser').dialog('close');"));
echo CHtml::AjaxSubmitButton(Yii::t('app', 'Create'), array(
diff --git a/user/views/user/_resend_activation_partial.php b/user/views/user/_resend_activation_partial.php
index 8b451e5..f4b01b9 100644
--- a/user/views/user/_resend_activation_partial.php
+++ b/user/views/user/_resend_activation_partial.php
@@ -1,8 +1,8 @@
- echo CHtml::beginForm(array('registration/ResendActivation'),'POST',array()); ?>
+
- if(isset($form->email)){
+ email)){
echo CHtml::hiddenField('email',$form->email);
}else{
echo CHtml::activeLabelEx($user,'email');
@@ -11,12 +11,12 @@
?>
- echo Yii::t("UserModule.user", "If you failed to recieve the activation email, click the Resend Activation button."); ?>
+
- echo CHtml::submitButton(Yii::t("UserModule.user", "Resend Activation")); ?>
+
- echo CHtml::endForm(); ?>
+
diff --git a/user/views/user/_tooltip.php b/user/views/user/_tooltip.php
index 02f09c3..7d16e64 100644
--- a/user/views/user/_tooltip.php
+++ b/user/views/user/_tooltip.php
@@ -1,4 +1,4 @@
-
+ %s: %s ';
@@ -16,7 +16,7 @@
printf($template, Yum::t('First visit'), date(UserModule::$dateFormat, $data->createtime));
printf($template, Yum::t('Last visit'), date(UserModule::$dateFormat, $data->lastvisit));
-if(Yum::hasModule('messages')){
+if(Yum::hasModule('message')){
echo CHtml::link(Yum::t('Write a message'), array(
'//message/message/compose', 'to_user_id' => $data->id)) . '
';
}
diff --git a/user/views/user/_view.php b/user/views/user/_view.php
index 67ba230..2c2345c 100644
--- a/user/views/user/_view.php
+++ b/user/views/user/_view.php
@@ -1,10 +1,10 @@
-
- $this->renderPartial('_tooltip', array('data' => $data)); ?>
+
+ renderPartial('_tooltip', array('data' => $data)); ?>
-
+
-
+enablePrivacySetting) {
if($data->privacy && $data->privacy->show_online_status) {
@@ -16,14 +16,14 @@
?>
- printf('%s %s
', $data->username, $online); ?>
+%s %s', $data->username, $online); ?>
- echo CHtml::link($data->getAvatar(true),
+getAvatar(true),
array(
'//profile/profile/view', 'id' => $data->id)); ?>
-
+clientScript->registerScript('tooltip_'.$data->id, "
$('#user_{$data->id}').tooltip({
'position': 'top',
diff --git a/user/views/user/admin.php b/user/views/user/admin.php
index f33bc9b..8685c39 100644
--- a/user/views/user/admin.php
+++ b/user/views/user/admin.php
@@ -1,4 +1,4 @@
-
+title = Yum::t('Manage users');
@@ -8,7 +8,7 @@
echo Yum::renderFlash();
-$this->widget('application.modules.user.components.CsvGridView', array(
+$this->widget('YumComponents.CsvGridView', array(
'dataProvider'=>$model->search(),
'filter' => $model,
'columns'=>array(
@@ -52,6 +52,6 @@
),
))); ?>
- echo CHtml::link(Yum::t('Create new User'), array(
+
diff --git a/user/views/user/browse.php b/user/views/user/browse.php
index 4d459b3..3d81560 100644
--- a/user/views/user/browse.php
+++ b/user/views/user/browse.php
@@ -1,4 +1,4 @@
-
+title = Yum::t('Browse users');
$this->breadcrumbs=array(Yum::t('Browse users'));
@@ -7,10 +7,10 @@
?>