Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
resurtm committed Dec 21, 2016
1 parent f66689e commit a343450
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
Empty file removed .codeclimate.yml
Empty file.
3 changes: 3 additions & 0 deletions docs/enhancing-and-overriding/how-to-enhance-a-user-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ feature. This is good approach too:
],
```

> Please note, the method above works only starting from Yii 2.0.10 and upper. In version 2.0.9 and lower you can
> use explicit calls to DI container from application `bootstrap.php` file.
Finally you can now add new methods, properties, and other things to your new `User` model class:

```php
Expand Down
10 changes: 4 additions & 6 deletions lib/User/resources/views/admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@
* the LICENSE file that was distributed with this source code.
*/

use Da\User\Search\UserSearch;
use yii\data\ActiveDataProvider;
use yii\grid\GridView;
use yii\helpers\Html;
use yii\web\View;
use yii\widgets\Pjax;

/*
* @var View $this
* @var ActiveDataProvider $dataProvider
* @var UserSearch $searchModel
/**
* @var $this yii\web\View
* @var $dataProvider yii\data\ActiveDataProvider
* @var $searchModel Da\User\Search\UserSearch
*/

$this->title = Yii::t('user', 'Manage users');
Expand Down
6 changes: 3 additions & 3 deletions lib/User/resources/views/shared/_alert.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@

use yii\bootstrap\Alert;

/*
* @var \Da\User\Module $module
/**
* @var $module Da\User\Module
*/
?>

<?php if ($module->enableFlashMessages): ?>
<div class="row">
<div class="col-xs-12">
<?php foreach (Yii::$app->session->getAllFlashes() as $type => $message): ?>
<?php if (in_array($type, ['success', 'danger', 'warning', 'info'])): ?>
<?php if (in_array($type, ['success', 'danger', 'warning', 'info'], true)): ?>
<?= Alert::widget([
'options' => ['class' => 'alert-dismissible alert-'.$type],
'body' => $message,
Expand Down
6 changes: 6 additions & 0 deletions lib/User/resources/views/shared/admin_layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,20 @@

use yii\helpers\Html;

/**
* @var $content string
*/

?>
<div class="clearfix"></div>

<?= $this->render(
'/shared/_alert',
[
'module' => Yii::$app->getModule('user'),
]
) ?>

<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
Expand Down

0 comments on commit a343450

Please sign in to comment.