Commit f68ac566 authored by john's avatar john

3010

parent 97c7ca96
......@@ -43,14 +43,16 @@ class SearchDocList extends DocList
*/
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->joinWith(['lang']);
$query->orderBy([ new \yii\db\Expression('FIELD (`doc_list`.`id`, ' . implode(',', $idListInt) . ')')]);
$dataProvider = new ActiveDataProvider([
'query' => $query,
'sort' => [
'defaultOrder' => [
'id' => SORT_DESC,
],
'attributes' => [
'id',
'active',
......
......@@ -6,6 +6,7 @@ use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel common\modules\documentation\models\SearchCoCategory */
/* @var $dataProvider yii\data\ActiveDataProvider */
$parentList = $searchModel->getParentList($searchModel, 0, 0, true);
?>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
......@@ -27,8 +28,10 @@ use yii\grid\GridView;
],
[
'attribute' => 'name',
'value' => function($model) {
return $model->lang->name;
'format'=>'raw',
'value' => function($model)use($parentList) {
return '<p style="white-space: nowrap;">'.$parentList[$model->id . ' '].'</p>';
// return $model->lang->name;
}
],
[
......
<?php
use yii\widgets\Pjax;
use yii\helpers\Url;
use common\modules\documentation\assets\DocumentationAsset;
use common\modules\documentation\models\DocList;
......@@ -10,7 +11,16 @@ use common\modules\documentation\models\DocList;
DocumentationAsset::register($this);
$modelDocList = new DocList();
$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);
<div class="share-links">
<a
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;"
target="_blank"
data-toggle="tooltip"
......@@ -87,13 +97,22 @@ $encodedUrl = yii\helpers\Url::current([], true);
data-placement="top"
data-original-title="Twitter"><i class="socicon-twitter"></i></a>
<a
class="social-button shape-circle sb-vk"
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;"
target="_blank"
data-toggle="tooltip"
data-placement="top"
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>
data-original-title="Google +"><i class="socicon-googleplus"></i></a>-->
</div>
</div>
</div>
</div>
......
......@@ -5,17 +5,17 @@ RewriteCond %{HTTP_HOST} ^www.task-on\.com$ [NC]
RewriteRule ^(.*)$ http://task-on.com/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ https://task-on.com/ [R=301,L]
RewriteRule ^index\.php$ http://task-on.com/ [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
RewriteCond %{HTTP} off
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^(.+)/$
RewriteRule ^(.+)/$ https://task-on.com/$1 [R=301,L]
RewriteRule ^(.+)/$ http://task-on.com/$1 [R=301,L]
Redirect 301 /portfolio/appl /portfolio
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment