Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taskonsite-архив-перенесен
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Korolev
taskonsite-архив-перенесен
Commits
9b224c9b
Commit
9b224c9b
authored
Mar 17, 2016
by
Олег Гиммельшпах
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#1080 - Поменять местами отзывы о компании
parent
8c75bb34
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
17 deletions
+25
-17
common/modules/reviews/forms/ReviewForm.php
common/modules/reviews/forms/ReviewForm.php
+16
-15
common/modules/reviews/models/Reviews.php
common/modules/reviews/models/Reviews.php
+8
-1
frontend/views/layouts/block/reviews.php
frontend/views/layouts/block/reviews.php
+1
-1
No files found.
common/modules/reviews/forms/ReviewForm.php
View file @
9b224c9b
...
...
@@ -35,21 +35,22 @@ return [
'items'
=>
[
'active'
=>
'Активен'
,
'hidden'
=>
'Скрыт'
],
'class'
=>
'form-control'
],
'rate_usability'
=>
[
'type'
=>
'dropdownlist'
,
'items'
=>
Reviews
::
getSource
(
'rate_usability'
),
'class'
=>
'form-control'
],
'rate_loyality'
=>
[
'type'
=>
'dropdownlist'
,
'items'
=>
Reviews
::
getSource
(
'rate_loyality'
),
'class'
=>
'form-control'
],
'rate_profit'
=>
[
'type'
=>
'dropdownlist'
,
'items'
=>
Reviews
::
getSource
(
'rate_profit'
),
'class'
=>
'form-control'
],
'priority'
=>
[
'type'
=>
'textarea'
,
'class'
=>
'form-control'
],
// 'rate_usability' => [
// 'type' => 'dropdownlist',
// 'items' => Reviews::getSource('rate_usability'),
// 'class' => 'form-control'
// ],
// 'rate_loyality' => [
// 'type' => 'dropdownlist',
// 'items' => Reviews::getSource('rate_loyality'),
// 'class' => 'form-control'
// ],
// 'rate_profit' => [
// 'type' => 'dropdownlist',
// 'items' => Reviews::getSource('rate_profit'),
// 'class' => 'form-control'
// ],
],
'buttons'
=>
[
'submit'
=>
[
'type'
=>
'submit'
,
'value'
=>
'Cохранить'
]
...
...
common/modules/reviews/models/Reviews.php
View file @
9b224c9b
...
...
@@ -3,6 +3,7 @@
namespace
common\modules\reviews\models
;
use
Yii
;
use
yii\behaviors\TimestampBehavior
;
/**
* This is the model class for table "reviews".
...
...
@@ -90,6 +91,12 @@ class Reviews extends \common\components\ActiveRecordModel
'folder'
=>
'/uploads/reviews/'
,
'field'
=>
'photo'
],
'timestamp'
=>
[
'class'
=>
TimestampBehavior
::
className
(),
'createdAtAttribute'
=>
'created_at'
,
'updatedAtAttribute'
=>
'updated_at'
,
'value'
=>
time
(),
],
];
}
...
...
@@ -132,7 +139,7 @@ class Reviews extends \common\components\ActiveRecordModel
'state'
=>
Yii
::
t
(
'reviews'
,
'Состояние'
),
'date'
=>
Yii
::
t
(
'reviews'
,
'Дата'
),
'date_create'
=>
Yii
::
t
(
'reviews'
,
'Создана'
),
'priority'
=>
Yii
::
t
(
'reviews'
,
'
Priority
'
),
'priority'
=>
Yii
::
t
(
'reviews'
,
'
Приоритет
'
),
'email'
=>
Yii
::
t
(
'reviews'
,
'Email'
),
'notification_date'
=>
Yii
::
t
(
'reviews'
,
'Notification Date'
),
'notification_send'
=>
Yii
::
t
(
'reviews'
,
'Notification Send'
),
...
...
frontend/views/layouts/block/reviews.php
View file @
9b224c9b
...
...
@@ -4,7 +4,7 @@ use yii\helpers\Html;
$reviews
=
Reviews
::
find
()
->
where
([
'state'
=>
'active'
])
->
orderBy
(
'created_at DESC'
)
->
orderBy
(
[
'priority'
=>
SORT_ASC
]
)
->
all
();
?>
<?php
if
(
$reviews
)
:
?>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment