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
1f1ba1d1
Commit
1f1ba1d1
authored
Apr 03, 2019
by
Олег Гиммельшпах
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3108 - Важно - удаление лишних разделов из sitemao.xml
parent
209b8f44
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
14 deletions
+11
-14
common/components/UrlManager.php
common/components/UrlManager.php
+1
-2
common/modules/documentation/controllers/PageController.php
common/modules/documentation/controllers/PageController.php
+4
-6
common/modules/documentation/views/page/view.php
common/modules/documentation/views/page/view.php
+6
-6
No files found.
common/components/UrlManager.php
View file @
1f1ba1d1
...
@@ -21,8 +21,7 @@ class UrlManager extends \yii\web\UrlManager
...
@@ -21,8 +21,7 @@ class UrlManager extends \yii\web\UrlManager
foreach
(
$documents
as
$document
)
{
foreach
(
$documents
as
$document
)
{
$content
=
$document
->
docContents
;
$content
=
$document
->
docContents
;
if
(
$content
)
{
if
(
$content
)
{
foreach
(
$content
[
0
]
->
langs
as
$lang
)
$rules
[
'<document:('
.
$content
[
0
]
->
url
.
')>'
]
=
'documentation/page/view'
;
$rules
[
'<document:('
.
$lang
->
url
.
')>'
]
=
'documentation/page/view'
;
}
}
}
}
...
...
common/modules/documentation/controllers/PageController.php
View file @
1f1ba1d1
...
@@ -21,8 +21,7 @@ class PageController extends \common\components\BaseController
...
@@ -21,8 +21,7 @@ class PageController extends \common\components\BaseController
public
function
actionView
(
$document
)
public
function
actionView
(
$document
)
{
{
$modelContent
=
$this
->
findDocumentModel
(
$document
);
$model
=
$this
->
findDocumentModel
(
$document
);
$model
=
$modelContent
->
content
;
$documentation
=
$model
->
lang
->
html
;
$documentation
=
$model
->
lang
->
html
;
...
@@ -33,7 +32,6 @@ class PageController extends \common\components\BaseController
...
@@ -33,7 +32,6 @@ class PageController extends \common\components\BaseController
return
$this
->
render
(
'view'
,
[
return
$this
->
render
(
'view'
,
[
'documentation'
=>
$documentation
,
'documentation'
=>
$documentation
,
'model'
=>
$model
,
'model'
=>
$model
,
'modelContent'
=>
$modelContent
]);
]);
}
}
...
@@ -62,7 +60,7 @@ class PageController extends \common\components\BaseController
...
@@ -62,7 +60,7 @@ class PageController extends \common\components\BaseController
*/
*/
protected
function
findDocumentModel
(
$url
)
protected
function
findDocumentModel
(
$url
)
{
{
$langContent
=
\common\modules\documentation\models\DocContent
Lang
::
findOne
([
'url'
=>
$url
]);
$langContent
=
\common\modules\documentation\models\DocContent
::
findOne
([
'url'
=>
$url
]);
if
(
$langContent
!==
null
)
{
if
(
$langContent
!==
null
)
{
return
$langContent
;
return
$langContent
;
}
else
{
}
else
{
...
...
common/modules/documentation/views/page/view.php
View file @
1f1ba1d1
...
@@ -15,7 +15,7 @@ $encodedUrl = yii\helpers\Url::current([], true);
...
@@ -15,7 +15,7 @@ $encodedUrl = yii\helpers\Url::current([], true);
$this
->
registerMetaTag
([
'property'
=>
'og:type'
,
'content'
=>
'article'
]);
$this
->
registerMetaTag
([
'property'
=>
'og:type'
,
'content'
=>
'article'
]);
$this
->
registerMetaTag
([
'property'
=>
'og:title'
,
'content'
=>
$model
Content
->
name
]);
$this
->
registerMetaTag
([
'property'
=>
'og:title'
,
'content'
=>
$model
->
name
]);
$this
->
registerMetaTag
([
'property'
=>
'og:image'
,
'content'
=>
'https://task-on.com/images/taskon.png'
]);
$this
->
registerMetaTag
([
'property'
=>
'og:image'
,
'content'
=>
'https://task-on.com/images/taskon.png'
]);
$this
->
registerMetaTag
([
'property'
=>
'og:description'
,
'content'
=>
'Разработка высоконагруженных сервисов, интернет порталов, корпоративных порталов.'
]);
$this
->
registerMetaTag
([
'property'
=>
'og:description'
,
'content'
=>
'Разработка высоконагруженных сервисов, интернет порталов, корпоративных порталов.'
]);
$this
->
registerMetaTag
([
'property'
=>
'og:url'
,
'content'
=>
Url
::
current
([],
true
)]);
$this
->
registerMetaTag
([
'property'
=>
'og:url'
,
'content'
=>
Url
::
current
([],
true
)]);
...
@@ -119,7 +119,7 @@ $this->registerMetaTag(['property' => 'og:site_name', 'content' => 'Арт Пр
...
@@ -119,7 +119,7 @@ $this->registerMetaTag(['property' => 'og:site_name', 'content' => 'Арт Пр
<a
href=
"/"
>
Главная
</a>
<a
href=
"/"
>
Главная
</a>
<span>
|
</span>
<span>
|
</span>
<a
href=
"/
<?=
common\models\Settings
::
getValue
(
'documentation-home-page'
)
?>
"
>
Документаци для разраотчиков
</a>
<a
href=
"/
<?=
common\models\Settings
::
getValue
(
'documentation-home-page'
)
?>
"
>
Документаци для разраотчиков
</a>
<span>
|
</span>
<?php
echo
$model
Content
->
name
?>
<br>
<br>
<span>
|
</span>
<?php
echo
$model
->
name
?>
<br>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -136,13 +136,13 @@ $this->registerMetaTag(['property' => 'og:site_name', 'content' => 'Арт Пр
...
@@ -136,13 +136,13 @@ $this->registerMetaTag(['property' => 'og:site_name', 'content' => 'Арт Пр
<!-- Post-->
<!-- Post-->
<h1>
<?php
echo
$model
Content
->
name
?>
</h1>
<h1>
<?php
echo
$model
->
name
?>
</h1>
<div
class=
"single-post-meta"
>
<div
class=
"single-post-meta"
>
<div
class=
"meta-link"
><i
class=
"icon-clock"
></i>
Обновлено:
<?=
$model
->
list
->
getFormatedCreatedAt
()
?>
</div>
<div
class=
"meta-link"
><i
class=
"icon-clock"
></i>
Обновлено:
<?=
$model
->
list
->
getFormatedCreatedAt
()
?>
</div>
</div>
</div>
<?php
echo
str_replace
([
'<!-- ¿¿¿CAROUSEL_BEGIN¿¿¿ -->'
,
'<!-- ¿¿¿CAROUSEL_END¿¿¿ -->'
],
[
'<div class="owl-carousel owl-carousel-need-replace hidden" data-owl-carousel="{ "nav": true, "dots": true, "loop": true }">'
,
'</div>'
],
$model
Content
->
html
)
?>
<?php
echo
str_replace
([
'<!-- ¿¿¿CAROUSEL_BEGIN¿¿¿ -->'
,
'<!-- ¿¿¿CAROUSEL_END¿¿¿ -->'
],
[
'<div class="owl-carousel owl-carousel-need-replace hidden" data-owl-carousel="{ "nav": true, "dots": true, "loop": true }">'
,
'</div>'
],
$model
->
html
)
?>
<div
class=
"single-post-footer"
>
<div
class=
"single-post-footer"
>
<div
class=
"column"
>
<div
class=
"column"
>
...
@@ -150,7 +150,7 @@ $this->registerMetaTag(['property' => 'og:site_name', 'content' => 'Арт Пр
...
@@ -150,7 +150,7 @@ $this->registerMetaTag(['property' => 'og:site_name', 'content' => 'Арт Пр
<div
class=
"share-links"
>
<div
class=
"share-links"
>
<a
<a
class=
"tooltips social-button shape-circle sb-facebook"
class=
"tooltips social-button shape-circle sb-facebook"
href=
"https://www.facebook.com/sharer/sharer.php?u=
<?=
$encodedUrl
?>
&t=
<?php
echo
$model
Content
->
name
?>
&text=
<?php
echo
$modelContent
->
name
?>
"
href=
"https://www.facebook.com/sharer/sharer.php?u=
<?=
$encodedUrl
?>
&t=
<?php
echo
$model
->
name
?>
&text=
<?php
echo
$model
->
name
?>
"
onclick=
"javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');return false;"
onclick=
"javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');return false;"
target=
"_blank"
target=
"_blank"
data-toggle=
"tooltip"
data-toggle=
"tooltip"
...
@@ -159,7 +159,7 @@ $this->registerMetaTag(['property' => 'og:site_name', 'content' => 'Арт Пр
...
@@ -159,7 +159,7 @@ $this->registerMetaTag(['property' => 'og:site_name', 'content' => 'Арт Пр
><i
class=
"socicon-facebook"
></i></a>
><i
class=
"socicon-facebook"
></i></a>
<a
<a
class=
"tooltips social-button shape-circle sb-twitter"
class=
"tooltips social-button shape-circle sb-twitter"
href=
"https://twitter.com/share?url=
<?=
$encodedUrl
?>
&text=
<?php
echo
$model
Content
->
name
?>
"
href=
"https://twitter.com/share?url=
<?=
$encodedUrl
?>
&text=
<?php
echo
$model
->
name
?>
"
onclick=
"javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');return false;"
onclick=
"javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');return false;"
target=
"_blank"
target=
"_blank"
data-toggle=
"tooltip"
data-toggle=
"tooltip"
...
...
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