Skip to content

Commit ffecf87

Browse files
author
NickMaster
committedJan 26, 2016
Change bug UserSearch class name
1 parent a7003e4 commit ffecf87

File tree

10 files changed

+100
-15
lines changed

10 files changed

+100
-15
lines changed
 

‎composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"php": ">=5.4.0",
1818
"yiisoft/yii2": ">=2.0.5",
1919
"yiisoft/yii2-bootstrap": "*",
20-
"yiisoft/yii2-swiftmailer": "*"
20+
"yiisoft/yii2-swiftmailer": "*",
21+
"yiisoft/yii2-jui": "^2.0"
2122
},
2223
"require-dev": {
2324
"yiisoft/yii2-codeception": "*",

‎composer.lock

+77-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎controllers/UserController.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Yii;
66
use app\models\User;
7-
use app\models\search\UserSeach;
7+
use app\models\search\UserSearch;
88
use yii\web\Controller;
99
use yii\web\NotFoundHttpException;
1010
use yii\filters\VerbFilter;
@@ -32,7 +32,7 @@ public function behaviors()
3232
*/
3333
public function actionIndex()
3434
{
35-
$searchModel = new UserSeach();
35+
$searchModel = new UserSearch();
3636
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
3737

3838
return $this->render('index', [

‎data/calendar.mwb

9 Bytes
Binary file not shown.

‎data/calendar.mwb.bak

311 Bytes
Binary file not shown.

‎models/search/UserSeach.php ‎models/search/UserSearch.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
use app\models\User;
99

1010
/**
11-
* UserSeach represents the model behind the search form about `app\models\User`.
11+
* UserSearch represents the model behind the search form about `app\models\User`.
1212
*/
13-
class UserSeach extends User
13+
class UserSearch extends User
1414
{
1515
/**
1616
* @inheritdoc

‎views/user/_form.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
<?= $form->field($model, 'password')->passwordInput(['maxlength' => true]) ?>
2222

2323
<div class="form-group">
24-
<?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
24+
<?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Создать пользователя') :
25+
Yii::t('app', 'Изменить'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
2526
</div>
2627

2728
<?php ActiveForm::end(); ?>

‎views/user/_search.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use yii\widgets\ActiveForm;
55

66
/* @var $this yii\web\View */
7-
/* @var $model app\models\search\UserSeach */
7+
/* @var $model app\models\search\UserSearch */
88
/* @var $form yii\widgets\ActiveForm */
99
?>
1010

‎views/user/index.php

+11-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use yii\grid\GridView;
55

66
/* @var $this yii\web\View */
7-
/* @var $searchModel app\models\search\UserSeach */
7+
/* @var $searchModel app\models\search\UserSearch */
88
/* @var $dataProvider yii\data\ActiveDataProvider */
99

1010
$this->title = Yii::t('app', 'Users');
@@ -29,10 +29,18 @@
2929
'username',
3030
'name',
3131
'surname',
32-
'password',
32+
// 'password',
3333
// 'salt',
3434
// 'access_token',
35-
// 'create_date',
35+
[
36+
'attribute' => 'create_date',
37+
'value' => 'create_date',
38+
'filter' => \yii\jui\DatePicker::widget([
39+
'language' => 'ru',
40+
'dateFormat' => 'dd-MM-yyyy'
41+
]),
42+
'format' => 'html'
43+
],
3644

3745
['class' => 'yii\grid\ActionColumn'],
3846
],

‎views/user/update.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
/* @var $this yii\web\View */
66
/* @var $model app\models\User */
77

8-
$this->title = Yii::t('app', 'Update {modelClass}: ', [
8+
$this->title = Yii::t('app', 'Изменить пользователя: ', [
99
'modelClass' => 'User',
1010
]) . ' ' . $model->name;
11-
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Users'), 'url' => ['index']];
11+
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Пользователи'), 'url' => ['index']];
1212
$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]];
13-
$this->params['breadcrumbs'][] = Yii::t('app', 'Update');
13+
$this->params['breadcrumbs'][] = Yii::t('app', 'Изменить пользователя');
1414
?>
1515
<div class="user-update">
1616

0 commit comments

Comments
 (0)
Please sign in to comment.