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
e7703357
Commit
e7703357
authored
Feb 08, 2016
by
Олег Гиммельшпах
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#998 - Скрывать страницы от пользователей
parent
3592caee
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
common/components/UrlManager.php
common/components/UrlManager.php
+2
-1
frontend/views/layouts/block/cases.php
frontend/views/layouts/block/cases.php
+4
-1
frontend/views/layouts/block/projects.php
frontend/views/layouts/block/projects.php
+8
-2
No files found.
common/components/UrlManager.php
View file @
e7703357
...
...
@@ -2,12 +2,13 @@
namespace
common\components
;
use
common\modules\languages\models\Languages
;
use
common\modules\content\models\CoContent
;
class
UrlManager
extends
\yii\web\UrlManager
{
public
function
parseRequest
(
$request
)
{
$pages
=
\common\modules\content\models\CoContent
::
find
(
)
->
all
();
$pages
=
CoContent
::
find
()
->
where
([
'active'
=>
true
]
)
->
all
();
$rules
=
[];
foreach
(
$pages
as
$page
)
...
...
frontend/views/layouts/block/cases.php
View file @
e7703357
...
...
@@ -3,7 +3,10 @@ use \common\modules\content\models\CoContent;
use
yii\helpers\Html
;
$models
=
CoContent
::
find
()
->
where
([
'category_id'
=>
4
])
->
where
([
'category_id'
=>
4
,
'active'
=>
true
])
->
orderBy
(
'id DESC'
)
->
all
();
?>
...
...
frontend/views/layouts/block/projects.php
View file @
e7703357
...
...
@@ -3,9 +3,15 @@ use \common\modules\content\models\CoContent;
use
yii\helpers\Html
;
use
yii\helpers\Url
;
$models
=
CoContent
::
find
()
->
where
([
'category_id'
=>
5
])
->
orderBy
(
'id DESC'
)
->
all
();
$models
=
CoContent
::
find
()
->
where
([
'category_id'
=>
5
,
'active'
=>
true
])
->
orderBy
(
'id DESC'
)
->
all
();
$cases
=
CoContent
::
find
()
->
where
([
'category_id'
=>
4
]);
$cases
=
CoContent
::
find
()
->
where
([
'category_id'
=>
4
,
'active'
=>
true
]);
?>
<?php
if
(
$models
)
:
?>
<div
class=
"row"
>
...
...
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