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
40d10cda
Commit
40d10cda
authored
Feb 11, 2016
by
Shakarim Sapa
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
c10cddca
75f04dd9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
2 deletions
+7
-2
backend/web/js/form-load.js
backend/web/js/form-load.js
+2
-0
common/modules/blog/controllers/PostController.php
common/modules/blog/controllers/PostController.php
+2
-0
common/modules/blog/models/PostTag.php
common/modules/blog/models/PostTag.php
+1
-1
common/modules/blog/views/post/_sidebar.php
common/modules/blog/views/post/_sidebar.php
+2
-1
No files found.
backend/web/js/form-load.js
View file @
40d10cda
...
@@ -33,6 +33,8 @@ $(function() {
...
@@ -33,6 +33,8 @@ $(function() {
toolbar2
:
"
| responsivefilemanager | link unlink anchor | image media | forecolor backcolor | print preview code
"
,
toolbar2
:
"
| responsivefilemanager | link unlink anchor | image media | forecolor backcolor | print preview code
"
,
image_advtab
:
true
,
image_advtab
:
true
,
forced_root_block
:
false
,
forced_root_block
:
false
,
force_br_newlines
:
false
,
force_p_newlines
:
true
,
external_filemanager_path
:
"
/filemanager/
"
,
external_filemanager_path
:
"
/filemanager/
"
,
filemanager_title
:
"
Responsive Filemanager
"
,
filemanager_title
:
"
Responsive Filemanager
"
,
external_plugins
:
{
"
filemanager
"
:
"
/filemanager/plugin.min.js
"
}
external_plugins
:
{
"
filemanager
"
:
"
/filemanager/plugin.min.js
"
}
...
...
common/modules/blog/controllers/PostController.php
View file @
40d10cda
...
@@ -52,6 +52,8 @@ class PostController extends BaseController
...
@@ -52,6 +52,8 @@ class PostController extends BaseController
throw
new
NotFoundHttpException
(
'The requested page does not exist.'
);
throw
new
NotFoundHttpException
(
'The requested page does not exist.'
);
}
}
$this
->
meta_title
=
Yii
::
t
(
'app'
,
'Tag'
)
.
': '
.
$model
->
name
.
' - '
.
\Yii
::
$app
->
params
[
'name'
];
return
$this
->
render
(
'tag'
,
[
return
$this
->
render
(
'tag'
,
[
'model'
=>
$model
,
'model'
=>
$model
,
]);
]);
...
...
common/modules/blog/models/PostTag.php
View file @
40d10cda
...
@@ -65,7 +65,7 @@ class PostTag extends \common\components\ActiveRecordModel
...
@@ -65,7 +65,7 @@ class PostTag extends \common\components\ActiveRecordModel
*/
*/
public
function
getPosts
()
public
function
getPosts
()
{
{
return
$this
->
hasMany
(
Post
::
className
(),
[
'id'
=>
'post_id'
])
->
viaTable
(
'posts_tags_assign'
,
[
'tag_id'
=>
'id'
]);
return
$this
->
hasMany
(
Post
::
className
(),
[
'id'
=>
'post_id'
])
->
viaTable
(
'posts_tags_assign'
,
[
'tag_id'
=>
'id'
])
->
where
([
'active'
=>
1
])
;
}
}
/**
/**
...
...
common/modules/blog/views/post/_sidebar.php
View file @
40d10cda
...
@@ -15,8 +15,9 @@ use common\models\Settings;
...
@@ -15,8 +15,9 @@ use common\models\Settings;
<div
class=
"sidebar_module_body"
>
<div
class=
"sidebar_module_body"
>
<?php
$tags
=
PostTag
::
find
()
<?php
$tags
=
PostTag
::
find
()
->
innerJoinWith
(
'
assign
s'
)
->
innerJoinWith
(
'
post
s'
)
->
groupBy
([
'posts_tags_assign.tag_id'
])
->
groupBy
([
'posts_tags_assign.tag_id'
])
->
where
([
'posts.active'
=>
1
])
->
orderBy
(
'RAND()'
)
->
orderBy
(
'RAND()'
)
->
limit
(
7
)
->
limit
(
7
)
->
all
();
->
all
();
...
...
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