fix views
This commit is contained in:
@ -1,18 +1,9 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Dektrium project.
|
||||
*
|
||||
* (c) Dektrium project <http://github.com/dektrium>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE.md
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\Menu;
|
||||
|
||||
/** @var dektrium\user\models\User $user */
|
||||
/** @var \Da\User\Model\User $user */
|
||||
$user = Yii::$app->user->identity;
|
||||
$networksVisible = count(Yii::$app->authClientCollection->clients) > 0;
|
||||
|
||||
@ -21,27 +12,32 @@ $networksVisible = count(Yii::$app->authClientCollection->clients) > 0;
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<?= Html::img($user->profile->getAvatarUrl(24), [
|
||||
'class' => 'img-rounded',
|
||||
'alt' => $user->username,
|
||||
]) ?>
|
||||
<?= Html::img(
|
||||
$user->profile->getAvatarUrl(24),
|
||||
[
|
||||
'class' => 'img-rounded',
|
||||
'alt' => $user->username,
|
||||
]
|
||||
) ?>
|
||||
<?= $user->username ?>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?= Menu::widget([
|
||||
'options' => [
|
||||
'class' => 'nav nav-pills nav-stacked',
|
||||
],
|
||||
'items' => [
|
||||
['label' => Yii::t('user', 'Profile'), 'url' => ['/user/settings/profile']],
|
||||
['label' => Yii::t('user', 'Account'), 'url' => ['/user/settings/account']],
|
||||
[
|
||||
'label' => Yii::t('user', 'Networks'),
|
||||
'url' => ['/user/settings/networks'],
|
||||
'visible' => $networksVisible
|
||||
<?= Menu::widget(
|
||||
[
|
||||
'options' => [
|
||||
'class' => 'nav nav-pills nav-stacked',
|
||||
],
|
||||
],
|
||||
]) ?>
|
||||
'items' => [
|
||||
['label' => Yii::t('user', 'Profile'), 'url' => ['/user/settings/profile']],
|
||||
['label' => Yii::t('user', 'Account'), 'url' => ['/user/settings/account']],
|
||||
[
|
||||
'label' => Yii::t('user', 'Networks'),
|
||||
'url' => ['/user/settings/networks'],
|
||||
'visible' => $networksVisible
|
||||
],
|
||||
],
|
||||
]
|
||||
) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,21 +1,12 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Dektrium project.
|
||||
*
|
||||
* (c) Dektrium project <http://github.com/dektrium>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE.md
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/**
|
||||
* @var $this yii\web\View
|
||||
* @var $form yii\widgets\ActiveForm
|
||||
* @var $model dektrium\user\models\SettingsForm
|
||||
* @var yii\web\View $this
|
||||
* @var yii\widgets\ActiveForm $form
|
||||
* @var \Da\User\Form\SettingsForm $model
|
||||
*/
|
||||
|
||||
$this->title = Yii::t('user', 'Account settings');
|
||||
@ -35,7 +26,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php $form = ActiveForm::begin([
|
||||
'id' => 'account-form',
|
||||
'id' => $model->formName(),
|
||||
'options' => ['class' => 'form-horizontal'],
|
||||
'fieldConfig' => [
|
||||
'template' => "{label}\n<div class=\"col-lg-9\">{input}</div>\n<div class=\"col-sm-offset-3 col-lg-9\">{error}\n{hint}</div>",
|
||||
@ -65,7 +56,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($model->module->enableAccountDelete): ?>
|
||||
<?php if ($model->module->allowAccountDelete): ?>
|
||||
<div class="panel panel-danger">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><?= Yii::t('user', 'Delete account') ?></h3>
|
||||
|
||||
@ -1,20 +1,12 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Dektrium project.
|
||||
*
|
||||
* (c) Dektrium project <http://github.com/dektrium>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE.md
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use dektrium\user\widgets\Connect;
|
||||
use Da\User\Widget\ConnectWidget;
|
||||
use yii\helpers\Html;
|
||||
|
||||
/*
|
||||
/**
|
||||
* @var yii\web\View $this
|
||||
* @var yii\widgets\ActiveForm $form
|
||||
* @var \Da\User\Model\User $user
|
||||
*/
|
||||
|
||||
$this->title = Yii::t('user', 'Networks');
|
||||
@ -36,9 +28,9 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<div class="alert alert-info">
|
||||
<p><?= Yii::t('user', 'You can connect multiple accounts to be able to log in using them') ?>.</p>
|
||||
</div>
|
||||
<?php $auth = Connect::begin([
|
||||
<?php $auth = ConnectWidget::begin([
|
||||
'baseAuthUrl' => ['/user/security/auth'],
|
||||
'accounts' => $user->accounts,
|
||||
'accounts' => $user->socialNetworkAccounts,
|
||||
'autoRender' => false,
|
||||
'popupMode' => false,
|
||||
]) ?>
|
||||
@ -65,7 +57,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<?php Connect::end() ?>
|
||||
<?php ConnectWidget::end() ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user