User Account Settings styling

This commit is contained in:
buddha87 2016-05-22 18:43:53 +02:00
parent e86f83fdb9
commit 9e5dff707a
9 changed files with 48 additions and 28 deletions

View File

@ -0,0 +1,21 @@
Testing
====================
1. Install codeception
composer global require "codeception/codeception=2.0.*" "codeception/specify=*" "codeception/verify=*"
2. Create test Database:
CREATE DATABASE `humhub_test` CHARACTER SET utf8 COLLATE utf8_general_ci;
3. Migrate Up:
cd protected/humhub/tests/codeception/bin
php yii migrate/up --includeModuleMigrations=1 --interactive=0
php yii installer/auto
4. Build Tests:
cd protected/humhub/tests
codecept build
5. Run Tests:
cd protected/humhub/tests/
codecept run

View File

@ -9,7 +9,7 @@ use yii\helpers\Url;
</div>
<div class="panel-body">
<p><?php echo Yii::t('UserModule.views_account_editModules', 'Enhance your profile with modules.'); ?></p>
<div class="help-block"><?php echo Yii::t('UserModule.views_account_editModules', 'Enhance your profile with modules.'); ?></div>
<?php foreach ($availableModules as $moduleId => $module): ?>
<hr>

View File

@ -8,10 +8,9 @@ use \humhub\models\Setting;
<div class="panel-heading">
<?php echo Yii::t('UserModule.views_account_editSettings', '<strong>User</strong> settings'); ?>
</div>
<?= humhub\modules\user\widgets\AccountSettingsMenu::widget(); ?>
<div class="panel-body">
<?= humhub\modules\user\widgets\AccountSettingsMenu::widget(); ?>
<br />
<p />
<?php $form = ActiveForm::begin(['id' => 'basic-settings-form']); ?>
<?php echo $form->field($model, 'tags'); ?>

View File

@ -11,33 +11,29 @@ use humhub\modules\user\models\User;
<div class="panel-body">
<?php $form = ActiveForm::begin(); ?>
<strong><?php echo Yii::t('UserModule.views_account_emailing', 'Notifications'); ?></strong><br/>
<?php echo $form->field($model, 'enable_html5_desktop_notifications')->checkbox(); ?>
<hr>
</div>
<div class="panel-heading">
<div class="panel-heading" style="padding-top:0px;">
<?php echo Yii::t('UserModule.views_account_emailing', '<strong>Email</strong> Notifications'); ?>
</div>
<div class="panel-body">
<strong><?php echo Yii::t('UserModule.views_account_emailing', 'Notifications'); ?></strong><br>
<div class="help-block">
<?php echo Yii::t('UserModule.views_account_emailing', 'Get an email, when other users comment or like your posts.'); ?>
<br>
<br>
</div>
<?php echo $form->field($model, 'receive_email_notifications')->dropdownList([User::RECEIVE_EMAIL_NEVER => Yii::t('UserModule.views_account_emailing', 'Never'),
User::RECEIVE_EMAIL_WHEN_OFFLINE => Yii::t('UserModule.views_account_emailing', 'When I´m offline'),
User::RECEIVE_EMAIL_ALWAYS => Yii::t('UserModule.views_account_emailing', 'Always')]); ?>
<hr>
<strong><?php echo Yii::t('UserModule.views_account_emailing', 'Activities'); ?></strong><br/>
<?php echo Yii::t('UserModule.views_account_emailing', 'Get an email, by every activity from other users you follow or work<br>together in workspaces.'); ?>
<div class="help-block">
<?php echo Yii::t('UserModule.views_account_emailing', 'Get an email, by every activity from other users you follow or work together in workspaces.'); ?>
</div>
<?php echo $form->field($model, 'receive_email_activities')->dropdownList([
User::RECEIVE_EMAIL_NEVER => Yii::t('UserModule.views_account_emailing', 'Never'),
User::RECEIVE_EMAIL_DAILY_SUMMARY => Yii::t('UserModule.views_account_emailing', 'Daily summary'),

View File

@ -1,28 +1,23 @@
<?php
use \yii\bootstrap\Html;
use yii\helpers\Url;
use yii\widgets\ActiveForm;
use \humhub\models\Setting;
?>
<div class="panel-heading">
<?php echo Yii::t('UserModule.base', '<strong>Security</strong> settings'); ?>
</div>
<div class="panel-body">
<br />
<ul class="nav nav-tabs" role="tablist">
<div class="tab-menu">
<ul class="nav nav-tabs" role="tablist" style="margin-bottom:0px;">
<?php foreach ($groups as $groupId => $groupTitle) : ?>
<li role="presentation" class="<?php if ($groupId == $group): ?>active<?php endif; ?>">
<a href="<?= Url::to(['security', 'groupId' => $groupId]); ?>" role="tab" ><?php echo $groupTitle; ?></a>
</li>
<?php endforeach; ?>
</ul>
</div>
<div class="panel-body" style="padding-top:0px;">
<div class="tab-content">
<?= \humhub\modules\user\widgets\PermissionGridEditor::widget(['permissionManager' => $user->permissionManager, 'groupId' => $group]); ?>
</div>
</div>

View File

@ -10,7 +10,6 @@ namespace humhub\modules\user\widgets;
use Yii;
use yii\helpers\Url;
use humhub\models\Setting;
/**
* Account Settings Tab Menu
@ -47,6 +46,13 @@ class AccountSettingsMenu extends \humhub\widgets\BaseMenu
parent::init();
}
public function run()
{
if(count($this->items) > 1) {
return parent::run();
}
}
/**
* Returns optional authclients

View File

@ -41,7 +41,10 @@ class PermissionGridEditor extends GridView
'columns' => [
'title',
'description',
'moduleId',
[
'label' => Yii::t('UserModule.widgets_PermissionGridEditor', 'Module'),
'attribute' => 'moduleId'
],
[
'label' => '',
'class' => 'humhub\libs\DropDownGridColumn',

File diff suppressed because one or more lines are too long

View File

@ -1071,7 +1071,7 @@ input[type=select] {
}
.tab-menu {
padding-top:5px;
padding-top:10px;
background-color: #FFFFFF;
.nav-tabs {