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
f68ac566
Commit
f68ac566
authored
Mar 12, 2019
by
john
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3010
parent
97c7ca96
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
14 deletions
+38
-14
common/modules/documentation/models/SearchDocList.php
common/modules/documentation/models/SearchDocList.php
+5
-3
common/modules/documentation/views/documentation-list-admin/index.php
...es/documentation/views/documentation-list-admin/index.php
+5
-2
common/modules/documentation/views/page/view.php
common/modules/documentation/views/page/view.php
+24
-5
frontend/web/.htaccess
frontend/web/.htaccess
+4
-4
No files found.
common/modules/documentation/models/SearchDocList.php
View file @
f68ac566
...
@@ -43,14 +43,16 @@ class SearchDocList extends DocList
...
@@ -43,14 +43,16 @@ class SearchDocList extends DocList
*/
*/
public
function
search
(
$params
)
public
function
search
(
$params
)
{
{
$idList
=
array_keys
(
$this
->
getParentList
(
$this
,
0
,
0
,
true
));
$idListInt
=
[
-
1
];
foreach
(
$idList
as
$_id
)
$idListInt
[]
=
(
int
)
$_id
;
$query
=
DocList
::
find
();
$query
=
DocList
::
find
();
$query
->
joinWith
([
'lang'
]);
$query
->
joinWith
([
'lang'
]);
$query
->
orderBy
([
new
\yii\db\Expression
(
'FIELD (`doc_list`.`id`, '
.
implode
(
','
,
$idListInt
)
.
')'
)]);
$dataProvider
=
new
ActiveDataProvider
([
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
$query
,
'query'
=>
$query
,
'sort'
=>
[
'sort'
=>
[
'defaultOrder'
=>
[
'id'
=>
SORT_DESC
,
],
'attributes'
=>
[
'attributes'
=>
[
'id'
,
'id'
,
'active'
,
'active'
,
...
...
common/modules/documentation/views/documentation-list-admin/index.php
View file @
f68ac566
...
@@ -6,6 +6,7 @@ use yii\grid\GridView;
...
@@ -6,6 +6,7 @@ use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $this yii\web\View */
/* @var $searchModel common\modules\documentation\models\SearchCoCategory */
/* @var $searchModel common\modules\documentation\models\SearchCoCategory */
/* @var $dataProvider yii\data\ActiveDataProvider */
/* @var $dataProvider yii\data\ActiveDataProvider */
$parentList
=
$searchModel
->
getParentList
(
$searchModel
,
0
,
0
,
true
);
?>
?>
<?php
// echo $this->render('_search', ['model' => $searchModel]); ?>
<?php
// echo $this->render('_search', ['model' => $searchModel]); ?>
...
@@ -27,8 +28,10 @@ use yii\grid\GridView;
...
@@ -27,8 +28,10 @@ use yii\grid\GridView;
],
],
[
[
'attribute'
=>
'name'
,
'attribute'
=>
'name'
,
'value'
=>
function
(
$model
)
{
'format'
=>
'raw'
,
return
$model
->
lang
->
name
;
'value'
=>
function
(
$model
)
use
(
$parentList
)
{
return
'<p style="white-space: nowrap;">'
.
$parentList
[
$model
->
id
.
' '
]
.
'</p>'
;
// return $model->lang->name;
}
}
],
],
[
[
...
...
common/modules/documentation/views/page/view.php
View file @
f68ac566
<?php
<?php
use
yii\widgets\Pjax
;
use
yii\widgets\Pjax
;
use
yii\helpers\Url
;
use
common\modules\documentation\assets\DocumentationAsset
;
use
common\modules\documentation\assets\DocumentationAsset
;
use
common\modules\documentation\models\DocList
;
use
common\modules\documentation\models\DocList
;
...
@@ -10,7 +11,16 @@ use common\modules\documentation\models\DocList;
...
@@ -10,7 +11,16 @@ use common\modules\documentation\models\DocList;
DocumentationAsset
::
register
(
$this
);
DocumentationAsset
::
register
(
$this
);
$modelDocList
=
new
DocList
();
$modelDocList
=
new
DocList
();
$encodedUrl
=
yii\helpers\Url
::
current
([],
true
);
$encodedUrl
=
yii\helpers\Url
::
current
([],
true
);
$encodedUrl
=
yii\helpers\Url
::
current
([],
true
);
$this
->
registerMetaTag
([
'property'
=>
'og:type'
,
'content'
=>
'article'
]);
$this
->
registerMetaTag
([
'property'
=>
'og:title'
,
'content'
=>
$modelContent
->
name
]);
$this
->
registerMetaTag
([
'property'
=>
'og:image'
,
'content'
=>
'https://task-on.com/images/logo.png'
]);
$this
->
registerMetaTag
([
'property'
=>
'og:description'
,
'content'
=>
'Разработка высоконагруженных сервисов, интернет порталов, корпоративных порталов.'
]);
$this
->
registerMetaTag
([
'property'
=>
'og:url'
,
'content'
=>
Url
::
base
(
true
)]);
$this
->
registerMetaTag
([
'property'
=>
'og:site_name'
,
'content'
=>
'Арт Проект'
]);
?>
?>
...
@@ -71,7 +81,7 @@ $encodedUrl = yii\helpers\Url::current([], true);
...
@@ -71,7 +81,7 @@ $encodedUrl = yii\helpers\Url::current([], true);
<div
class=
"share-links"
>
<div
class=
"share-links"
>
<a
<a
class=
"social-button shape-circle sb-facebook"
class=
"social-button shape-circle sb-facebook"
href=
"https://www.facebook.com/sharer/sharer.php?u=
<?=
$encodedUrl
?>
&t=
<?php
echo
$modelContent
->
name
?>
"
href=
"https://www.facebook.com/sharer/sharer.php?u=
<?=
$encodedUrl
?>
&t=
<?php
echo
$modelContent
->
name
?>
&text=
<?php
echo
$modelContent
->
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"
...
@@ -87,13 +97,22 @@ $encodedUrl = yii\helpers\Url::current([], true);
...
@@ -87,13 +97,22 @@ $encodedUrl = yii\helpers\Url::current([], true);
data-placement=
"top"
data-placement=
"top"
data-original-title=
"Twitter"
><i
class=
"socicon-twitter"
></i></a>
data-original-title=
"Twitter"
><i
class=
"socicon-twitter"
></i></a>
<a
<a
class=
"social-button shape-circle sb-
google-plus
"
class=
"social-button shape-circle sb-
vk
"
href=
"https://
plus.google.com/share
?url=
<?=
$encodedUrl
?>
"
href=
"https://
vk.com/share.php
?url=
<?=
$encodedUrl
?>
"
onclick=
"javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=350,width=480');return false;"
onclick=
"javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=350,width=480');return false;"
target=
"_blank"
target=
"_blank"
data-toggle=
"tooltip"
data-toggle=
"tooltip"
data-placement=
"top"
data-placement=
"top"
data-original-title=
"Google +"
><i
class=
"socicon-googleplus"
></i></a></div>
data-original-title=
"ВКонтакте"
><i
class=
"socicon-vkontakte"
></i></a>
<!-- <a
class="social-button shape-circle sb-google-plus"
href="https://plus.google.com/share?url=
<?=
$encodedUrl
?>
"
onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=350,width=480');return false;"
target="_blank"
data-toggle="tooltip"
data-placement="top"
data-original-title="Google +"><i class="socicon-googleplus"></i></a>-->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
frontend/web/.htaccess
View file @
f68ac566
...
@@ -5,17 +5,17 @@ RewriteCond %{HTTP_HOST} ^www.task-on\.com$ [NC]
...
@@ -5,17 +5,17 @@ RewriteCond %{HTTP_HOST} ^www.task-on\.com$ [NC]
RewriteRule
^(.*)$ http://task-on.com/$1 [R=301,L]
RewriteRule
^(.*)$ http://task-on.com/$1 [R=301,L]
RewriteCond
%{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteCond
%{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule
^index\.php$ http
s
://task-on.com/ [R=301,L]
RewriteRule
^index\.php$ http://task-on.com/ [R=301,L]
RewriteCond
%{HTTP_HOST} ^www\.(.*) [NC]
RewriteCond
%{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule
^(.*)$ http://%1/$1 [R=301,L]
RewriteRule
^(.*)$ http://%1/$1 [R=301,L]
RewriteCond
%{HTTP
S
}
off
RewriteCond
%{HTTP}
off
RewriteRule
(.*) http
s
://%{HTTP_HOST}%{REQUEST_URI} [R,L]
RewriteRule
(.*) http://%{HTTP_HOST}%{REQUEST_URI} [R,L]
RewriteCond
%{REQUEST_FILENAME} !-d
RewriteCond
%{REQUEST_FILENAME} !-d
RewriteCond
%{REQUEST_URI} ^(.+)/$
RewriteCond
%{REQUEST_URI} ^(.+)/$
RewriteRule
^(.+)/$ http
s
://task-on.com/$1 [R=301,L]
RewriteRule
^(.+)/$ http://task-on.com/$1 [R=301,L]
Redirect
301 /portfolio/appl /portfolio
Redirect
301 /portfolio/appl /portfolio
...
...
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