Commit 989d9e93 authored by john's avatar john

2949

parent 0fc6446d
<?php
namespace common\components;
use common\modules\languages\models\Languages;
use common\modules\content\models\CoContent;
use common\modules\documentation\models\DocList;
class UrlManager extends \yii\web\UrlManager {
class UrlManager extends \yii\web\UrlManager
{
public function parseRequest($request)
{
$pages = CoContent::find()->where(['active' => true])->all();
$rules = [];
foreach($pages as $page)
{
$rules['<page:('.$page->url.')>'] = 'content/page/view';
foreach ($pages as $page) {
$rules['<page:(' . $page->url . ')>'] = 'content/page/view';
}
$documents = DocList::find()->where(['active' => true])->all();
foreach ($documents as $document) {
$content = $document->docContents;
if ($content)
$rules['<document:(' . $content[0]->lang->url . ')>'] = 'documentation/page/view';
}
$request->url = rtrim($request->url, '/');
$this->addRules($rules, false);
return parent::parseRequest($request);
}
public function createUrl($params)
{
if(isset($params['lang_id']))
{
if (isset($params['lang_id'])) {
//Если указан идентификатор языка, то делаем попытку найти язык в БД,
//иначе работаем с языком по умолчанию
$lang = Languages::findOne($params['lang_id']);
if($lang === null)
{
if ($lang === null) {
$lang = Languages::getDefaultLang();
}
unset($params['lang_id']);
}
else
{
} else {
//Если не указан параметр языка, то работаем с текущим языком
$lang = Languages::getCurrent();
}
//Получаем сформированный URL(без префикса идентификатора языка)
$url = parent::createUrl($params);
//Добавляем к URL префикс - буквенный идентификатор языка
if($url == '/')
{
return '/' . (!$lang->default?$lang->url:'');
if ($url == '/') {
return '/' . (!$lang->default ? $lang->url : '');
}
// Делаем универсальный URL без языка для Eauth авторизации
elseif (strpos($url, '/eauth') !== false) {
return $url;
}
else
{
return (!$lang->default?'/'.$lang->url:'') . $url;
} else {
return (!$lang->default ? '/' . $lang->url : '') . $url;
}
}
}
......@@ -25,6 +25,9 @@ class DocumentationAsset extends AssetBundle
'css/documentation.css',
];
public $js = [
'js/vendor.min.js',
'js/scripts.min.js',
'js/accordion.js',
'js/documentation.js',
];
public $depends = [
......
......@@ -6,13 +6,13 @@
body {
font-family: "RobotoRegular" !important;
color: #2d323a !important;
color: #5a5a5a !important;
}
header {
color: #ffffff;
}
.offcanvas-wrapper {
color: #2d323a;
color: #5a5a5a;
font-family: "RobotoRegular" !important;
}
.offcanvas-wrapper h1,
......@@ -29,9 +29,13 @@ header {
.offcanvas-wrapper .h6 {
color: #3d3d3d;
}
.meta-link i {
position: relative;
top: -2px;
}
.offcanvas-wrapper p {
font-size: 17px;
line-height: 26px;
font-size: 15px;
line-height: 24px;
}
.offcanvas-wrapper ol:not([class]) {
/*list-style: decimal outside ;
......@@ -51,19 +55,22 @@ header {
border: 1px solid #2980B9 ;
display: inline-block;
text-align: center;
line-height: 16px;
line-height: 15px;
font-size: 12px;
font-weight: bold;
width: 18px;
height: 18px;
position: absolute;
top: 2px;
top: 3px;
left: -25px;
}
.offcanvas-wrapper ul:not([class]) {
list-style: disc outside;
padding-left: 20px;
}
.set_in {
display: none;
}
.article_short_tags {
color: #374250;
list-style: disc outside;
......@@ -112,7 +119,7 @@ header {
display: block;
padding: 5px 20px !important;
transition: color .3s;
color: #2d323a;
color: #5a5a5a;
font-size: 14px;
font-weight: 500;
text-align: left;
......@@ -455,7 +462,7 @@ header {
.navi-link,
.navi-link-light {
transition: color .3s;
color: #2d323a;
color: #5a5a5a;
text-decoration: none;
}
......@@ -499,7 +506,7 @@ header {
transition: opacity .25s;
border: 0;
background: 0;
color: #2d323a;
color: #5a5a5a;
font-family: sans-serif;
font-size: 18px;
cursor: pointer;
......@@ -759,7 +766,7 @@ header {
}
.text-body {
color: #2d323a !important;
color: #5a5a5a !important;
}
.text-light,
......@@ -1601,7 +1608,7 @@ blockquote {
padding: 24px 0 24px 36px;
border-top: 1px solid #e1e7ec;
border-bottom: 1px solid #e1e7ec;
color: #2d323a;
color: #5a5a5a;
font-size: 18px;
}
......@@ -1652,7 +1659,7 @@ blockquote.blockquote-reverse::before {
left: auto;
}
kbd {
background-color: #2d323a;
background-color: #5a5a5a;
}
.form-control {
......@@ -1660,7 +1667,7 @@ kbd {
border: 1px solid #dbe2e8;
border-radius: 22px;
background-color: #ffffff;
color: #2d323a;
color: #5a5a5a;
font-family: "RobotoRegular", Helvetica, Arial, sans-serif;
font-size: 14px;
-webkit-appearance: none;
......@@ -1688,7 +1695,7 @@ kbd {
.form-control:focus {
border-color: #0da9ef;
outline: none;
color: #2d323a;
color: #5a5a5a;
box-shadow: none !important;
}
......@@ -1840,7 +1847,7 @@ select.form-control.form-control-sm:not([size]):not([multiple]) {
height: 44px;
border-radius: 22px;
border-color: #dbe2e8;
color: #2d323a;
color: #5a5a5a;
line-height: 2.2;
}
......@@ -1910,7 +1917,7 @@ select.form-control.form-control-sm:not([size]):not([multiple]) {
transition: color .3s;
border: 0;
background: 0;
color: #2d323a;
color: #5a5a5a;
font-size: 1.2em;
cursor: pointer;
}
......@@ -2051,7 +2058,7 @@ select.form-control.form-control-sm:not([size]):not([multiple]) {
}
.was-validated .custom-control-input:valid ~ .custom-control-label, .was-validated .custom-control-input.is-valid ~ .custom-control-label {
color: #2d323a;
color: #5a5a5a;
}
.was-validated .custom-control-input:valid ~ .custom-control-label::before, .was-validated .custom-control-input.is-valid ~ .custom-control-label::before {
......@@ -2059,7 +2066,7 @@ select.form-control.form-control-sm:not([size]):not([multiple]) {
}
.was-validated .custom-control-input:valid:checked ~ .custom-control-label, .was-validated .custom-control-input.is-valid:checked ~ .custom-control-label {
color: #2d323a;
color: #5a5a5a;
}
.was-validated .custom-control-input:valid:checked ~ .custom-control-label::before, .was-validated .custom-control-input.is-valid:checked ~ .custom-control-label::before {
......@@ -2112,7 +2119,7 @@ select.form-control.form-control-sm:not([size]):not([multiple]) {
.thead-default th {
background-color: #f5f5f5;
color: #2d323a;
color: #5a5a5a;
}
.table-striped tbody tr:nth-of-type(odd) {
......@@ -2176,7 +2183,7 @@ select.form-control.form-control-sm:not([size]):not([multiple]) {
border-radius: 22px;
background-color: transparent;
background-image: none;
color: #2d323a;
color: #5a5a5a;
font-family: "RobotoRegular", Helvetica, Arial, sans-serif;
font-size: 14px;
font-style: normal;
......@@ -2206,7 +2213,7 @@ select.form-control.form-control-sm:not([size]):not([multiple]) {
}
.btn:hover {
color: #2d323a;
color: #5a5a5a;
}
.btn > i {
......@@ -2411,11 +2418,11 @@ button:focus {
}
.btn-outline-white:hover {
color: #2d323a;
color: #5a5a5a;
}
.btn-link-secondary {
color: #2d323a;
color: #5a5a5a;
}
.btn-link-secondary:hover {
......@@ -2611,7 +2618,7 @@ button:focus {
.market-button .mb-title {
display: block;
color: #2d323a;
color: #5a5a5a;
font-size: 18px;
}
......@@ -2721,7 +2728,7 @@ button:focus {
margin-right: 18px;
margin-bottom: 5px;
transition: color .3s;
color: #2d323a;
color: #5a5a5a;
font-size: 13px;
text-decoration: none;
vertical-align: middle;
......@@ -2735,6 +2742,9 @@ button:focus {
line-height: 35px;
text-align: center;
}
.social-button.shape-circle i {
line-height: 35px;
}
.social-button.shape-circle {
border-radius: 50%;
......@@ -2773,12 +2783,12 @@ button:focus {
font-size: 1.15em !important;
}
.sb-amazon:hover, .sb-amazon:focus {
.sb-amazon:hover i, .sb-amazon:focus {
color: #ff9900 !important;
}
/* Airbnb */
.sb-airbnb:hover, .sb-airbnb:focus {
.sb-airbnb:hover i, .sb-airbnb:focus {
color: #fd5c63 !important;
}
......@@ -2787,7 +2797,7 @@ button:focus {
font-size: 1.1em !important;
}
.sb-behance:hover, .sb-behance:focus {
.sb-behance:hover i, .sb-behance:focus {
color: #1769ff !important;
}
......@@ -2796,7 +2806,7 @@ button:focus {
font-size: 1.2em !important;
}
.sb-deviantart:hover, .sb-deviantart:focus {
.sb-deviantart:hover i, .sb-deviantart:focus {
color: #4e6252 !important;
}
......@@ -2805,7 +2815,7 @@ button:focus {
font-size: 1.2em !important;
}
.sb-digg:hover, .sb-digg:focus {
.sb-digg:hover i, .sb-digg:focus {
color: #000000 !important;
}
......@@ -2814,12 +2824,12 @@ button:focus {
font-size: 1.1em !important;
}
.sb-disqus:hover, .sb-disqus:focus {
.sb-disqus:hover i, .sb-disqus:focus {
color: #2e9fff !important;
}
/* Dribbble */
.sb-dribbble:hover, .sb-dribbble:focus {
.sb-dribbble:hover i, .sb-dribbble:focus {
color: #ea4c89 !important;
}
......@@ -2828,32 +2838,32 @@ button:focus {
font-size: 1.1em !important;
}
.sb-drupal:hover, .sb-drupal:focus {
.sb-drupal:hover i, .sb-drupal:focus {
color: #0077c0 !important;
}
/* Email */
.sb-email:hover, .sb-email:focus {
.sb-email:hover i, .sb-email:focus {
color: #0da9ef !important;
}
/* Facebook */
.sb-facebook:hover, .sb-facebook:focus {
.sb-facebook:hover i, .sb-facebook:focus {
color: #3b5998 !important;
}
/* Flickr */
.sb-flickr:hover, .sb-flickr:focus {
.sb-flickr:hover i, .sb-flickr:focus {
color: #0063dc !important;
}
/* Foursquare */
.sb-foursquare:hover, .sb-foursquare:focus {
.sb-foursquare:hover i, .sb-foursquare:focus {
color: #ef4b78 !important;
}
/* GitHub */
.sb-github:hover, .sb-github:focus {
.sb-github:hover i, .sb-github:focus {
color: #4183c4 !important;
}
......@@ -2862,12 +2872,12 @@ button:focus {
font-size: 1.2em !important;
}
.sb-google-plus:hover, .sb-google-plus:focus {
.sb-google-plus:hover i, .sb-google-plus:focus {
color: #dd4b39 !important;
}
/* Instagram */
.sb-instagram:hover, .sb-instagram:focus {
.sb-instagram:hover i, .sb-instagram:focus {
color: #3f729b !important;
}
......@@ -2876,12 +2886,12 @@ button:focus {
font-size: 1.1em !important;
}
.sb-lastfm:hover, .sb-lastfm:focus {
.sb-lastfm:hover i, .sb-lastfm:focus {
color: #e31b23 !important;
}
/* LinkedIn */
.sb-linkedin:hover, .sb-linkedin:focus {
.sb-linkedin:hover i, .sb-linkedin:focus {
color: #0976b4 !important;
}
......@@ -2890,7 +2900,7 @@ button:focus {
font-size: 1.1em !important;
}
.sb-odnoklassniki:hover, .sb-odnoklassniki:focus {
.sb-odnoklassniki:hover i, .sb-odnoklassniki:focus {
color: #ed812b !important;
}
......@@ -2899,12 +2909,12 @@ button:focus {
font-size: .9em !important;
}
.sb-paypal:hover, .sb-paypal:focus {
.sb-paypal:hover i, .sb-paypal:focus {
color: #253b80 !important;
}
/* Pinterest */
.sb-pinterest:hover, .sb-pinterest:focus {
.sb-pinterest:hover i, .sb-pinterest:focus {
color: #cc2127 !important;
}
......@@ -2913,7 +2923,7 @@ button:focus {
font-size: 1.1em !important;
}
.sb-reddit:hover, .sb-reddit:focus {
.sb-reddit:hover i, .sb-reddit:focus {
color: #ff4500 !important;
}
......@@ -2922,7 +2932,7 @@ button:focus {
font-size: .9em !important;
}
.sb-rss:hover, .sb-rss:focus {
.sb-rss:hover i, .sb-rss:focus {
color: #f26522 !important;
}
......@@ -2931,7 +2941,7 @@ button:focus {
font-size: .9em !important;
}
.sb-skype:hover, .sb-skype:focus {
.sb-skype:hover i, .sb-skype:focus {
color: #00aff0 !important;
}
......@@ -2940,47 +2950,47 @@ button:focus {
font-size: 1.2em !important;
}
.sb-soundcloud:hover, .sb-soundcloud:focus {
.sb-soundcloud:hover i, .sb-soundcloud:focus {
color: #ff8800 !important;
}
/* Stack Overflow */
.sb-stackoverflow:hover, .sb-stackoverflow:focus {
.sb-stackoverflow:hover i, .sb-stackoverflow:focus {
color: #fe7a15 !important;
}
/* Steam */
.sb-steam:hover, .sb-steam:focus {
.sb-steam:hover i, .sb-steam:focus {
color: #7da10e !important;
}
/* StumbleUpon */
.sb-stumbleupon:hover, .sb-stumbleupon:focus {
.sb-stumbleupon:hover i, .sb-stumbleupon:focus {
color: #eb4924 !important;
}
/* Tumblr */
.sb-tumblr:hover, .sb-tumblr:focus {
.sb-tumblr:hover i, .sb-tumblr:focus {
color: #35465c !important;
}
/* Twitch */
.sb-twitch:hover, .sb-twitch:focus {
.sb-twitch:hover i, .sb-twitch:focus {
color: #6441a5 !important;
}
/* Twitter */
.sb-twitter:hover, .sb-twitter:focus {
.sb-twitter:hover i, .sb-twitter:focus {
color: #55acee !important;
}
/* Vimeo */
.sb-vimeo:hover, .sb-vimeo:focus {
.sb-vimeo:hover i, .sb-vimeo:focus {
color: #1ab7ea !important;
}
/* Vine */
.sb-vine:hover, .sb-vine:focus {
.sb-vine:hover i, .sb-vine:focus {
color: #00b488 !important;
}
......@@ -2989,17 +2999,17 @@ button:focus {
font-size: 1.1em !important;
}
.sb-vk:hover, .sb-vk:focus {
.sb-vk:hover i, .sb-vk:focus {
color: #45668e !important;
}
/* WordPress */
.sb-wordpress:hover, .sb-wordpress:focus {
.sb-wordpress:hover i, .sb-wordpress:focus {
color: #21759b !important;
}
/* XING */
.sb-xing:hover, .sb-xing:focus {
.sb-xing:hover i, .sb-xing:focus {
color: #026466 !important;
}
......@@ -3008,17 +3018,17 @@ button:focus {
font-size: 1.1em !important;
}
.sb-yahoo:hover, .sb-yahoo:focus {
.sb-yahoo:hover i, .sb-yahoo:focus {
color: #400191 !important;
}
/* Yelp */
.sb-yelp:hover, .sb-yelp:focus {
.sb-yelp:hover i, .sb-yelp:focus {
color: #af0606 !important;
}
/* YouTube */
.sb-youtube:hover, .sb-youtube:focus {
.sb-youtube:hover i, .sb-youtube:focus {
color: #e52d27 !important;
}
......@@ -3049,7 +3059,7 @@ button:focus {
transition: color .3s;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
color: #2d323a;
color: #5a5a5a;
font-size: 14px;
font-weight: 500;
letter-spacing: .05em;
......@@ -3103,7 +3113,7 @@ button:focus {
padding: 8px 16px;
transition: all .3s;
border-radius: 22px;
color: #2d323a;
color: #5a5a5a;
font-size: 13px;
font-weight: 500;
letter-spacing: .07em;
......@@ -3430,7 +3440,7 @@ button:focus {
.accordion [data-toggle='collapse'] {
display: block;
position: relative;
color: #2d323a;
color: #5a5a5a;
text-decoration: none;
}
......@@ -3509,7 +3519,7 @@ button:focus {
transition: all .3s;
border: 1px solid transparent;
border-radius: 50%;
color: #2d323a;
color: #5a5a5a;
line-height: 34px;
text-decoration: none;
}
......@@ -3620,7 +3630,7 @@ button:focus {
.comment .comment-title {
margin-bottom: 8px;
color: #2d323a;
color: #5a5a5a;
font-size: 14px;
font-weight: 500;
}
......@@ -3650,7 +3660,7 @@ button:focus {
.comment .reply-link {
transition: color .3s;
color: #2d323a;
color: #5a5a5a;
font-size: 14px;
font-weight: 500;
letter-spacing: .07em;
......@@ -3752,7 +3762,7 @@ button:focus {
}
.popover-body {
color: #2d323a;
color: #5a5a5a;
}
.example-tooltip .tooltip {
......@@ -3805,7 +3815,7 @@ button:focus {
padding-right: 20px;
padding-left: 20px;
transition: color .3s;
color: #2d323a;
color: #5a5a5a;
text-decoration: none;
}
......@@ -3887,7 +3897,7 @@ button:focus {
a.list-group-item,
.list-group-item-action {
transition: all .25s;
color: #2d323a;
color: #5a5a5a;
font-weight: 500;
}
......@@ -3896,7 +3906,7 @@ a.list-group-item:hover, a.list-group-item:focus, a.list-group-item:active,
.list-group-item-action:focus,
.list-group-item-action:active {
background-color: #f5f5f5;
color: #2d323a;
color: #5a5a5a;
}
a.list-group-item {
......@@ -3926,7 +3936,7 @@ a.list-group-item {
.badge.badge-default {
background-color: #eaeef2;
color: #2d323a;
color: #5a5a5a;
}
.badge.badge-primary {
......@@ -3964,7 +3974,7 @@ a.list-group-item {
.list-group-item.active .badge {
background-color: #ffffff !important;
color: #2d323a !important;
color: #5a5a5a !important;
}
.list-group-item-info {
......@@ -4095,7 +4105,7 @@ a.list-group-item {
.alert-default {
background-color: rgba(96, 105, 117, 0.05);
color: #2d323a;
color: #5a5a5a;
}
.alert-default::before {
......@@ -4105,11 +4115,11 @@ a.list-group-item {
.alert-default > *:not(.text-white), .alert-default > *:not(.text-light),
.alert-default h1:not(.text-white),
.alert-default h1:not(.text-light), .alert-default h2:not(.text-white), .alert-default h2:not(.text-light), .alert-default h3:not(.text-white), .alert-default h3:not(.text-light), .alert-default h4:not(.text-white), .alert-default h4:not(.text-light), .alert-default h5:not(.text-white), .alert-default h5:not(.text-light), .alert-default h6:not(.text-white), .alert-default h6:not(.text-light), .alert-default p:not(.text-white), .alert-default p:not(.text-light), .alert-default ul:not(.text-white), .alert-default ul:not(.text-light), .alert-default ol:not(.text-white), .alert-default ol:not(.text-light), .alert-default a:not(.text-white), .alert-default a:not(.text-light) {
color: #2d323a;
color: #5a5a5a;
}
.alert-default .alert-close {
color: #2d323a;
color: #5a5a5a;
}
.alert-primary {
......@@ -4628,7 +4638,7 @@ a.list-group-item {
margin: 0 6px;
transition: opacity .25s;
border-radius: 50%;
background-color: #2d323a;
background-color: #5a5a5a;
opacity: .3;
}
......@@ -4782,7 +4792,7 @@ a.list-group-item {
transform: translateX(-50%);
border-top-left-radius: 7px;
border-top-right-radius: 7px;
background-color: #2d323a;
background-color: #5a5a5a;
}
.hero-slider > .owl-carousel .owl-prev,
......@@ -4900,7 +4910,7 @@ a.list-group-item {
transform: none;
border-radius: 50%;
background-color: #ffffff;
color: #2d323a;
color: #5a5a5a;
font-size: 27px;
line-height: 42px;
box-shadow: 0px 4px 15px 0px rgba(0, 0, 0, 0.25);
......@@ -5054,7 +5064,7 @@ video {
margin-top: -24px;
border: 1px solid #e1e7ec;
background-color: #ffffff;
color: #2d323a !important;
color: #5a5a5a !important;
font-size: 20px;
box-shadow: 0 3px 10px 0 rgba(55, 66, 80, 0.2);
cursor: pointer;
......@@ -5092,9 +5102,9 @@ video {
margin-bottom: 20px;
padding-bottom: 12px;
border-bottom: 1px solid #e1e7ec;
color: #9da9b9;
font-size: 14px;
font-weight: 500;
color: #5a5a5a !important;
font-size: 12px;
font-weight: bold;
text-transform: uppercase;
}
......@@ -5123,13 +5133,16 @@ video {
margin: 0 !important;
padding: 0 !important;
list-style: none !important;
margin-top: 8px !important;
}
.widget-categories ul > li,
.widget-links ul > li {
position: relative;
margin-bottom: 5px;
margin-bottom: 10px;
padding-left: 14px;
display: block;
line-height: 16px;
}
.widget-categories ul > li:last-child,
......@@ -5141,7 +5154,7 @@ video {
.widget-links ul > li::before {
display: block;
position: absolute;
top: 10px;
top: 6px;
left: 0;
width: 0;
height: 0;
......@@ -5156,12 +5169,37 @@ video {
color: #9da9b9;
content: '';
}
.widget-categories ul.set_in > li::before,
.widget-links ul.set_in > li::before {
display: none;
}
.widget-categories ul.set_in > li::after,
.widget-links ul.set_in > li::after {
display: block;
position: absolute;
top: 8px;
left: 0;
width: 7px;
height: 0;
border: auto;
border-bottom: 2px solid #9da9b9;
color: #9da9b9;
content: '';
}
.widget-categories ul > li.active::before,
.widget-links ul > li.active::before {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
.widget-categories ul > li > a,
.widget-links ul > li > a {
display: inline-block;
transition: color .3s;
color: #2d323a;
color: #3d3d3d;
font-size: 14px;
line-height: 16px;
font-weight: 500;
......@@ -5273,7 +5311,7 @@ video {
.widget-featured-posts > .entry .entry-title > a,
.widget-featured-products > .entry .entry-title > a {
transition: color .3s;
color: #2d323a;
color: #5a5a5a;
font-weight: 500;
text-decoration: none;
}
......@@ -5301,7 +5339,7 @@ video {
}
.widget-featured-products > .entry .entry-meta {
color: #2d323a;
color: #5a5a5a;
font-size: 13px;
}
......@@ -5314,7 +5352,7 @@ video {
transition: all .3s;
border: 1px solid #e1e7ec;
border-radius: 14px;
color: #2d323a !important;
color: #5a5a5a !important;
font-size: 13px;
font-weight: 500;
line-height: 25px;
......@@ -5324,7 +5362,7 @@ video {
.tag:hover {
background-color: #f5f5f5;
color: #2d323a !important;
color: #5a5a5a !important;
}
.tag.active {
......@@ -5544,7 +5582,7 @@ video {
.widget-light-skin .tag:hover {
background-color: #f5f5f5;
color: #2d323a !important;
color: #5a5a5a !important;
}
.widget-light-skin .tag.active {
......@@ -5605,7 +5643,7 @@ video {
.steps .step .step-title {
margin-top: 16px;
margin-bottom: 0;
color: #2d323a;
color: #5a5a5a;
font-size: 14px;
font-weight: 500;
}
......@@ -5965,7 +6003,7 @@ video {
}
.topbar .topbar-column a:not(.social-button), .topbar .topbar-column span, .topbar .topbar-column p {
color: #2d323a;
color: #5a5a5a;
font-size: 13px;
}
......@@ -6112,7 +6150,7 @@ video {
padding-left: 30px;
border: 0;
background-color: #ffffff;
color: #2d323a;
color: #5a5a5a;
font-size: 16px;
}
......@@ -6159,7 +6197,7 @@ video {
}
.site-search .search-tools .clear-search:hover {
color: #2d323a;
color: #5a5a5a;
}
.site-search .search-tools .close-search {
......@@ -6252,7 +6290,7 @@ video {
width: 74px;
transition: color .3s;
border-right: 1px solid #e1e7ec;
color: #2d323a;
color: #5a5a5a;
font-size: 20px;
line-height: 1;
cursor: pointer;
......@@ -6293,7 +6331,7 @@ video {
.site-menu ul > li > a {
padding: 0 15px;
transition: color .3s;
color: #2d323a;
color: #5a5a5a;
font-size: 14px;
font-weight: 500;
text-decoration: none;
......@@ -6386,7 +6424,7 @@ video {
transition: background-color .35s;
border: 1px solid #e1e7ec;
border-radius: 50%;
color: #2d323a;
color: #5a5a5a;
font-size: 17px;
cursor: pointer;
vertical-align: middle;
......@@ -6558,7 +6596,7 @@ video {
display: block;
padding-top: 2px;
transition: color .3s;
color: #2d323a;
color: #5a5a5a;
font-size: 14px;
font-weight: 500;
text-decoration: none;
......@@ -6622,7 +6660,7 @@ video {
}
.navbar-ghost:not(.navbar-stuck) .toolbar .toolbar-dropdown-group {
color: #2d323a;
color: #5a5a5a;
}
@media (max-width: 1070px) {
......@@ -6721,7 +6759,7 @@ video {
.breadcrumbs > li > a {
transition: color .25s;
color: #2d323a;
color: #5a5a5a;
text-decoration: none;
}
......@@ -6968,6 +7006,9 @@ video {
max-width: 100%;
padding: 10px 15px;
}
.tooltip {
left: 9px !important;
}
.user-info-wrapper .info-label {
display: block;
......@@ -6978,7 +7019,7 @@ video {
padding: 0 12px;
border-radius: 13px;
background-color: #ffffff;
color: #2d323a;
color: #5a5a5a;
font-size: 12px;
line-height: 26px;
box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.18);
......@@ -7028,7 +7069,7 @@ video {
transition: opacity .3s;
border-radius: 50%;
background-color: #ffffff;
color: #2d323a;
color: #5a5a5a;
line-height: 34px;
box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.2);
cursor: pointer;
......@@ -7106,7 +7147,7 @@ video {
.product-card .product-price {
margin-bottom: 10px;
color: #2d323a;
color: #5a5a5a;
font-size: 16px;
font-weight: 500;
text-align: center;
......@@ -7313,13 +7354,13 @@ video {
width: 3px;
height: 3px;
margin-bottom: 3px;
background-color: #2d323a;
background-color: #5a5a5a;
}
.shop-view > a span::before, .shop-view > a span::after {
display: block;
position: absolute;
background-color: #2d323a;
background-color: #5a5a5a;
}
.shop-view > a span:last-child {
......@@ -7579,7 +7620,7 @@ video {
border-top: 1px solid #e1e7ec;
border-bottom: 1px solid #e1e7ec;
background-color: #ffffff;
color: #2d323a;
color: #5a5a5a;
font-size: 14px;
font-weight: 500;
line-height: 53px;
......@@ -7653,7 +7694,7 @@ video {
}
.checkout-steps > a.completed:hover {
color: #2d323a;
color: #5a5a5a;
}
.checkout-steps > a:first-child {
......@@ -7858,7 +7899,7 @@ video {
margin: 0;
padding: 9px 12px;
border-bottom: 1px solid #e1e7ec;
color: #2d323a;
color: #5a5a5a;
font-size: 13px;
cursor: default;
}
......@@ -7880,7 +7921,7 @@ video {
.post-meta > li > a {
transition: color .25s;
color: #2d323a;
color: #5a5a5a;
text-decoration: none;
}
......@@ -7929,7 +7970,7 @@ video {
.single-post-meta .meta-link {
display: inline-block;
margin-right: 10px;
color: #2d323a;
color: #5a5a5a;
font-size: 13px;
}
......@@ -7940,7 +7981,7 @@ video {
.single-post-meta .meta-link > a {
transition: color .25s;
color: #2d323a;
color: #5a5a5a;
text-decoration: none;
}
......@@ -8006,7 +8047,7 @@ video {
.single-post-footer .sp-tag {
transition: color .25s;
color: #2d323a;
color: #5a5a5a;
font-size: 13px;
font-weight: 500;
text-decoration: none;
......
if($('.set').length){
$(".set > li > a").on("click", function(){
if($(this).parent().hasClass('active')){
$(this).parent().removeClass("active");
$(this).siblings('.set_in').slideUp(200);
//$(".set > a i").removeClass("fa-minus").addClass("fa-plus");
}else{
//$(".set > a i").removeClass("fa-minus").addClass("fa-plus");
//$(this).find("i").removeClass("fa-plus").addClass("fa-minus");
$(".set > li> a").parent().removeClass("active");
//$(this).addClass("active");
$(this).parent().addClass("active");
$('.set_in').slideUp(200);
$(this).siblings('.set_in').slideDown(200);
}
});
}
\ No newline at end of file
jQuery(document).ready(function(a){"use strict";function b(b){var c=a("body"),d=a(b.target).attr("href");a(d).addClass("active"),c.css("overflow","hidden"),c.addClass("offcanvas-open"),b.preventDefault()}function c(){var b=a("body");b.removeClass("offcanvas-open"),setTimeout(function(){b.css("overflow","visible"),a(".offcanvas-container").removeClass("active")},450)}function d(){k.parent().removeClass("expanded")}function e(b){var c=b.item.index,d=a(".owl-item").eq(c).find("[data-hash]").attr("data-hash");a(".product-thumbnails li").removeClass("active"),a('[href="#'+d+'"]').parent().addClass("active"),a(".gallery-wrapper .gallery-item").removeClass("active"),a('[data-hash="'+d+'"]').parent().addClass("active")}(function(){if("number"==typeof window.innerWidth)return window.innerWidth>document.documentElement.clientWidth;var a,b=document.documentElement||document.body;void 0!==b.currentStyle&&(a=b.currentStyle.overflow),a=a||window.getComputedStyle(b,"").overflow;var c;void 0!==b.currentStyle&&(c=b.currentStyle.overflowY),c=c||window.getComputedStyle(b,"").overflowY;var d=b.scrollHeight>b.clientHeight,e=/^(visible|auto)$/.test(a)||/^(visible|auto)$/.test(c),f="scroll"===a||"scroll"===c;return d&&e||f})()&&a("body").addClass("hasScrollbar"),a('a[href="#"]').on("click",function(a){a.preventDefault()}),function(){var b=a("body"),c=a(".navbar-sticky"),d=a(".topbar").outerHeight(),e=c.outerHeight();c.length&&a(window).on("scroll",function(){a(this).scrollTop()>d?(c.addClass("navbar-stuck"),c.hasClass("navbar-ghost")||b.css("padding-top",e)):(c.removeClass("navbar-stuck"),b.css("padding-top",0))})}(),function(b,c,d,e){a(b).on("click",function(){a(e).addClass("search-visible"),setTimeout(function(){a(e+" > input").focus()},200)}),a(c).on("click",function(){a(e).removeClass("search-visible")}),a(d).on("click",function(){a(e+" > input").val(""),setTimeout(function(){a(e+" > input").focus()},200)})}(".toolbar .tools .search",".close-search",".clear-search",".site-search"),a(".lang-currency-switcher").on("click",function(){a(this).parent().addClass("show"),a(this).parent().find(".dropdown-menu").addClass("show")}),a(document).on("click",function(b){a(b.target).closest(".lang-currency-switcher-wrap").length||(a(".lang-currency-switcher-wrap").removeClass("show"),a(".lang-currency-switcher-wrap .dropdown-menu").removeClass("show"))}),a('[data-toggle="offcanvas"]').on("click",b),a(".site-backdrop").on("click",c);var f=a(".offcanvas-menu .menu").height();a(".offcanvas-menu .offcanvas-submenu").each(function(){a(this).prepend('<li class="back-btn"><a href="#">Back</a></li>')});var g=a(".has-children .sub-menu-toggle");a(".offcanvas-menu .offcanvas-submenu .back-btn").on("click",function(b){var c=this,d=a(c).parent(),e=a(c).parent().parent().siblings().parent(),g=a(c).parents(".menu");d.removeClass("in-view"),e.removeClass("off-view"),"menu"===e.attr("class")?g.css("height",f):g.css("height",e.height()),b.preventDefault()}),g.on("click",function(b){var c=this,d=a(c).parent().parent().parent(),e=a(c).parents(".menu");return d.addClass("off-view"),a(c).parent().parent().find("> .offcanvas-submenu").addClass("in-view"),e.css("height",a(c).parent().parent().find("> .offcanvas-submenu").height()),b.preventDefault(),!1}),window.addEventListener("load",function(){var a=document.getElementsByClassName("needs-validation");Array.prototype.filter.call(a,function(a){a.addEventListener("submit",function(b){!1===a.checkValidity()&&(b.preventDefault(),b.stopPropagation()),a.classList.add("was-validated")},!1)})},!1);var h=a(".scroll-to-top-btn");if(h.length>0&&(a(window).on("scroll",function(){a(this).scrollTop()>600?h.addClass("visible"):h.removeClass("visible")}),h.on("click",function(b){b.preventDefault(),a("html").velocity("scroll",{offset:0,duration:1200,easing:"easeOutExpo",mobileHA:!1})})),a(document).on("click",".scroll-to",function(b){var c=a(this).attr("href");if("#"===c)return!1;var d=a(c);if(d.length>0){var e=d.data("offset-top")||70;a("html").velocity("scroll",{offset:a(this.hash).offset().top-e,duration:1e3,easing:"easeOutExpo",mobileHA:!1})}b.preventDefault()}),function(b){b.each(function(){var b=a(this),c=b.data("filter-list"),d=b.find("input[type=text]"),e=b.find("input[type=radio]"),f=a(c).find(".list-group-item");d.keyup(function(){var b=d.val();f.each(function(){0==a(this).text().toLowerCase().indexOf(b.toLowerCase())?a(this).show():a(this).hide()})}),e.on("click",function(b){var c=a(this).val();"all"!==c?(f.hide(),a("[data-filter-item="+c+"]").show()):f.show()})})}(a("[data-filter-list]")),function(b,c){b.each(function(){var b=a(this),d=a(this).data("date-time");(c||b).downCount({date:d,offset:10})})}(a(".countdown")),a("[data-toast]").on("click",function(){var b=a(this),c=b.data("toast-type"),d=b.data("toast-icon"),e=b.data("toast-position"),f=b.data("toast-title"),g=b.data("toast-message"),h="";switch(e){case"topRight":h={class:"iziToast-"+c||"",title:f||"Title",message:g||"toast message",animateInside:!1,position:"topRight",progressBar:!1,icon:d,timeout:3200,transitionIn:"fadeInLeft",transitionOut:"fadeOut",transitionInMobile:"fadeIn",transitionOutMobile:"fadeOut"};break;case"bottomRight":h={class:"iziToast-"+c||"",title:f||"Title",message:g||"toast message",animateInside:!1,position:"bottomRight",progressBar:!1,icon:d,timeout:3200,transitionIn:"fadeInLeft",transitionOut:"fadeOut",transitionInMobile:"fadeIn",transitionOutMobile:"fadeOut"};break;case"topLeft":h={class:"iziToast-"+c||"",title:f||"Title",message:g||"toast message",animateInside:!1,position:"topLeft",progressBar:!1,icon:d,timeout:3200,transitionIn:"fadeInRight",transitionOut:"fadeOut",transitionInMobile:"fadeIn",transitionOutMobile:"fadeOut"};break;case"bottomLeft":h={class:"iziToast-"+c||"",title:f||"Title",message:g||"toast message",animateInside:!1,position:"bottomLeft",progressBar:!1,icon:d,timeout:3200,transitionIn:"fadeInRight",transitionOut:"fadeOut",transitionInMobile:"fadeIn",transitionOutMobile:"fadeOut"};break;case"topCenter":h={class:"iziToast-"+c||"",title:f||"Title",message:g||"toast message",animateInside:!1,position:"topCenter",progressBar:!1,icon:d,timeout:3200,transitionIn:"fadeInDown",transitionOut:"fadeOut",transitionInMobile:"fadeIn",transitionOutMobile:"fadeOut"};break;case"bottomCenter":h={class:"iziToast-"+c||"",title:f||"Title",message:g||"toast message",animateInside:!1,position:"bottomCenter",progressBar:!1,icon:d,timeout:3200,transitionIn:"fadeInUp",transitionOut:"fadeOut",transitionInMobile:"fadeIn",transitionOutMobile:"fadeOut"};break;default:h={class:"iziToast-"+c||"",title:f||"Title",message:g||"toast message",animateInside:!1,position:"topRight",progressBar:!1,icon:d,timeout:3200,transitionIn:"fadeInLeft",transitionOut:"fadeOut",transitionInMobile:"fadeIn",transitionOutMobile:"fadeOut"}}iziToast.show(h)}),a('[data-toggle="toast"]').on("click",function(){var b="#"+a(this).data("toast-id");a(b).toast("show")}),a(".btn-wishlist").on("click",function(){var b=a(this).data("iteration")||1,c={title:"Product",animateInside:!1,position:"topRight",progressBar:!1,timeout:3200,transitionIn:"fadeInLeft",transitionOut:"fadeOut",transitionInMobile:"fadeIn",transitionOutMobile:"fadeOut"};switch(b){case 1:a(this).addClass("active"),c.class="iziToast-info",c.message="added to your wishlist!",c.icon="icon-bell";break;case 2:a(this).removeClass("active"),c.class="iziToast-danger",c.message="removed from your wishlist!",c.icon="icon-ban"}iziToast.show(c),b++,b>2&&(b=1),a(this).data("iteration",b)}),a(".isotope-grid").length)var i=a(".isotope-grid").imagesLoaded(function(){i.isotope({itemSelector:".grid-item",transitionDuration:"0.7s",masonry:{columnWidth:".grid-sizer",gutter:".gutter-sizer"}})});if(a(".filter-grid").length>0){var j=a(".filter-grid");a(".nav-pills").on("click","a",function(b){b.preventDefault(),a(".nav-pills a").removeClass("active"),a(this).addClass("active");var c=a(this).attr("data-filter");j.isotope({filter:c})})}var k=a(".widget-categories .has-children > a");k.on("click",function(b){a(b.target).parent().is(".expanded")?d():(d(),a(this).parent().addClass("expanded"))}),a('[data-toggle="tooltip"]').tooltip(),a('[data-toggle="popover"]').popover();var l=document.querySelector(".ui-range-slider");if(void 0!==l&&null!==l){var m=parseInt(l.parentNode.getAttribute("data-start-min"),10),n=parseInt(l.parentNode.getAttribute("data-start-max"),10),o=parseInt(l.parentNode.getAttribute("data-min"),10),p=parseInt(l.parentNode.getAttribute("data-max"),10),q=parseInt(l.parentNode.getAttribute("data-step"),10),r=document.querySelector(".ui-range-value-min span"),s=document.querySelector(".ui-range-value-max span"),t=document.querySelector(".ui-range-value-min input"),u=document.querySelector(".ui-range-value-max input");noUiSlider.create(l,{start:[m,n],connect:!0,step:q,range:{min:o,max:p}}),l.noUiSlider.on("update",function(a,b){var c=a[b];b?(s.innerHTML=Math.round(c),u.value=Math.round(c)):(r.innerHTML=Math.round(c),t.value=Math.round(c))})}var v=a(".interactive-credit-card");if(v.length&&v.card({form:".interactive-credit-card",container:".card-wrapper"}),a(".gallery-wrapper").length){!function(b){function c(a,b){return(" "+a.className+" ").indexOf(" "+b+" ")>-1}for(var d=function(b){for(var c,d,e,f,g=a(b).find(".gallery-item:not(.isotope-hidden)").get(),h=g.length,i=[],j=0;j<h;j++)c=g[j],1===c.nodeType&&(d=c.children[0],"video"==a(d).data("type")?f={html:a(d).data("video")}:(e=d.getAttribute("data-size").split("x"),f={src:d.getAttribute("href"),w:parseInt(e[0],10),h:parseInt(e[1],10)}),c.children.length>1&&(f.title=a(c).find(".caption").html()),d.children.length>0&&(f.msrc=d.children[0].getAttribute("src")),f.el=c,i.push(f));return i},e=function a(b,c){return b&&(c(b)?b:a(b.parentNode,c))},f=function(b){b=b||window.event,b.preventDefault?b.preventDefault():b.returnValue=!1;var d=b.target||b.srcElement,f=e(d,function(a){return c(a,"gallery-item")});if(f){for(var h,i=f.closest(".gallery-wrapper"),j=a(f.closest(".gallery-wrapper")).find(".gallery-item:not(.isotope-hidden)").get(),k=j.length,l=0,m=0;m<k;m++)if(1===j[m].nodeType){if(j[m]===f){h=l;break}l++}return h>=0&&g(h,i),!1}},g=function(b,c,e,f){var g,h,i,j=document.querySelectorAll(".pswp")[0];if(i=d(c),h={closeOnScroll:!1,galleryUID:c.getAttribute("data-pswp-uid"),getThumbBoundsFn:function(b){var c=i[b].el.getElementsByTagName("img")[0];if(a(c).length>0){var d=window.pageYOffset||document.documentElement.scrollTop,e=c.getBoundingClientRect();return{x:e.left,y:e.top+d,w:e.width}}}},f)if(h.galleryPIDs){for(var k=0;k<i.length;k++)if(i[k].pid==b){h.index=k;break}}else h.index=parseInt(b,10)-1;else h.index=parseInt(b,10);isNaN(h.index)||(e&&(h.showAnimationDuration=0),g=new PhotoSwipe(j,PhotoSwipeUI_Default,i,h),g.init(),g.listen("beforeChange",function(){var b=a(g.currItem.container);a(".pswp__video").removeClass("active");b.find(".pswp__video").addClass("active");a(".pswp__video").each(function(){a(this).hasClass("active")||a(this).attr("src",a(this).attr("src"))})}),g.listen("close",function(){a(".pswp__video").each(function(){a(this).attr("src",a(this).attr("src"))})}))},h=document.querySelectorAll(b),i=0,j=h.length;i<j;i++)h[i].setAttribute("data-pswp-uid",i+1),h[i].onclick=f;var k=function(){var a=window.location.hash.substring(1),b={};if(a.length<5)return b;for(var c=a.split("&"),d=0;d<c.length;d++)if(c[d]){var e=c[d].split("=");e.length<2||(b[e[0]]=e[1])}return b.gid&&(b.gid=parseInt(b.gid,10)),b}();k.pid&&k.gid&&g(k.pid,h[k.gid-1],!0,!0)}(".gallery-wrapper")}var w=a(".product-carousel");w.length&&w.owlCarousel({items:1,loop:!1,dots:!1,URLhashListener:!0,startPosition:"URLHash",onTranslate:e});var x=a(".google-map");x.length&&x.each(function(){var b=a(this).data("height"),c=a(this).data("address"),d=a(this).data("zoom"),e=a(this).data("disable-controls"),f=a(this).data("scrollwheel"),g=a(this).data("marker"),h=a(this).data("marker-title"),i=a(this).data("styles");a(this).height(b),a(this).gmap3({marker:{address:c,data:h,options:{icon:g},events:{mouseover:function(b,c,d){var e=a(this).gmap3("get"),f=a(this).gmap3({get:{name:"infowindow"}});f?(f.open(e,b),f.setContent(d.data)):a(this).gmap3({infowindow:{anchor:b,options:{content:d.data}}})},mouseout:function(){var b=a(this).gmap3({get:{name:"infowindow"}});b&&b.close()}}},map:{options:{zoom:d,disableDefaultUI:e,scrollwheel:f,styles:i}}})})});
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -15,9 +15,9 @@ class PageController extends \common\components\BaseController
];
}
public function actionView($id)
public function actionView($document)
{
$model = $this->findModel($id);
$model = $this->findDocumentModel($document);
$documentation = $model->lang->html;
......@@ -47,4 +47,25 @@ class PageController extends \common\components\BaseController
}
}
/**
* Finds the DocContent model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param integer $id
* @return DocContent the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findDocumentModel($url)
{
$langContent = \common\modules\documentation\models\DocContentLang::findOne(['url' => $url]);
if (!$langContent) {
throw new NotFoundHttpException('The requested page does not exist.');
}
$model = $langContent->content;
if ($model !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
}
......@@ -5,6 +5,7 @@ namespace common\modules\documentation\models;
use Yii;
use yii\behaviors\TimestampBehavior;
use common\modules\languages\models\Languages;
use yii\helpers\Html;
/**
* This is the model class for table "{{%doc_list}}".
......@@ -73,7 +74,7 @@ class DocList extends \yii\db\ActiveRecord
return [
'id' => 'ID',
'active' => 'Активность',
'parent_id' => 'Родитель',
'parent_id' => 'Родительский раздел',
'name' => 'Заголовок',
'position' => 'Position',
'created_at' => 'Created At',
......@@ -133,27 +134,23 @@ class DocList extends \yii\db\ActiveRecord
* @param boolean $disabled
* @return array
*/
public function getParentList($updated, $parent_id = 0, $disabled = false)
public function getParentList($updated, $parent_id = 0, $left = 0, $ignore = false)
{
$list = [];
$thisLevel = DocList::find()->where(['=', 'parent_id', $parent_id])->orderBy(['position' => SORT_ASC])->all();
foreach ($thisLevel as $level) {
if ($updated->id == $level->id)
$disabled = true;
$curent = [
'id' => $level->id,
'text' => $level->lang->name,
'state' => [
'disabled' => $disabled,
'selected' => $updated->parent_id == $level->id,
'expanded' => true,
'checked' => $updated->parent_id == $level->id,
]
];
$nodes = $level->getParentList($updated, $level->id, $disabled);
if ($updated->id == $level->id && !$ignore)
continue;
$l = '';
for ($i = 0; $i < $left; $i++)
$l .= '   ';
$leftStr = ($left) ? $l : '';
$curent [$level->id . ' '] = $leftStr . $level->lang->name;
$nodes = $level->getParentList($updated, $level->id, $left + 1);
if ($nodes)
$curent['nodes'] = $nodes;
$list[] = $curent;
$curent = array_merge($curent, $nodes);
$list = array_merge($list, $curent);
}
return $list;
}
......@@ -170,9 +167,13 @@ class DocList extends \yii\db\ActiveRecord
$list = [];
$thisLevel = DocList::find()->where(['=', 'parent_id', $parent_id])->orderBy(['position' => SORT_ASC])->all();
foreach ($thisLevel as $level) {
$docContents = $level->docContents;
$url = ($docContents) ? $docContents[0]->lang->url : '';
$curent = [
'id' => $level->id,
'text' => $level->lang->name,
'url' => '/' . $url,
'state' => [
'selected' => $updated->id == $level->id,
'expanded' => true,
......@@ -187,4 +188,34 @@ class DocList extends \yii\db\ActiveRecord
return $list;
}
public function getList($arr, &$open = '', $baseLevel = true)
{
$list = [];
foreach ($arr as $item) {
$ulClass = 'set_in';
if ($baseLevel) {
$ulClass = 'set';
$open = '';
}
$ch = '';
if (isset($item['nodes']) && is_array($item['nodes']))
$ch = $this->getList($item['nodes'], $open, false);
$active = '';
if ($item['url'] == yii::$app->request->url) {
$active = 'active';
}
$list[] = Html::tag('li', Html::a($item['text'], $item['url'], ['class' => $active]) . $ch, ['class' => $open]);
if ($item['url'] == yii::$app->request->url) {
$open = 'active';
}
}
return count($list) ? Html::tag('ul', implode('', $list), ['class' => $ulClass]) : '';
}
public function getFormatedCreatedAt()
{
Yii::$app->formatter->locale = Yii::$app->language;
return Yii::$app->formatter->asDate($this->created_at, "medium");
}
}
......@@ -67,45 +67,8 @@ DocumentationAsset::register($this);
<?= $form->field($model, 'priority')->textInput(['maxlength' => 3])->hint('Приоритетность URL относительно других URL на Вашем сайте. Допустимый диапазон значений — от 0.0 до 1.0. Это значение позволяет указать поисковым системам, какие страницы, по Вашему мнению, более важны для сканеров (позволяет задать порядок их обработки ПС). Приоритет страницы по умолчанию — 0.5.') ?>
<div class="list_list_id">
<div class="hidden" style="display:none">
<?= $form->field($model, 'list_id')->textInput() ?>
</div>
<?php
$data = $modelDocList->getParentListForContent($model->list);
$onSelect = new JsExpression(<<<JS
function (undefined, item) {
$('#doccontent-list_id').val(item.id);
}
JS
);
$groupsContent = TreeView::widget([
'data' => $data,
'size' => TreeView::SIZE_SMALL,
'header' => 'Родитель',
'searchOptions' => [
'inputOptions' => [
'placeholder' => 'Выберите родителя'
],
],
'clientOptions' => [
'multiSelect' => false,
'showIcon' => true,
// 'showCheckbox' => true,
// 'showTags' => false,
'showBorder' => false,
'onNodeSelected' => $onSelect,
'selectedBackColor' => '#79C137',
'borderColor' => '#fff',
],
]);
echo $groupsContent;
?>
</div>
<?= $form->field($model, 'list_id')->dropDownList($data = $modelDocList->getParentList($model->list,0, 0, true), ['class' => 'form-control', 'prompt'=>'Выберите родительский раздел']) ?>
<div class="form-group">
<?= Html::submitButton('Сохранить', ['class' => 'btn btn-success']) ?>
</div>
......
......@@ -37,50 +37,15 @@ $blocks = \common\modules\content\models\CoBlocks::find()->all();
<?= $form->field($content, '[' . $lang_id . ']name')->textInput(['maxlength' => 250])->hint('Название пункта меню.') ?>
<?= $form->field($content, '[' . $lang_id . ']hint')->textInput(['maxlength' => 250])->hint('Подсказка при наведение на пунтр меню.') ?>
<div style="display: none" class="hidden">
<?= $form->field($content, '[' . $lang_id . ']hint')->textInput(['value' => '**', 'maxlength' => 250])->hint('Подсказка при наведение на пунтр меню.') ?>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
<div class="list_parent_id">
<div class="hidden" style="display:none">
<?= $form->field($model, 'parent_id')->textInput() ?>
</div>
<?php
$data = $model->getParentList($model);
$onSelect = new JsExpression(<<<JS
function (undefined, item) {
$('#doclist-parent_id').val(item.id);
}
JS
);
$groupsContent = TreeView::widget([
'data' => $data,
'size' => TreeView::SIZE_SMALL,
'header' => 'Родитель',
'searchOptions' => [
'inputOptions' => [
'placeholder' => 'Выберите родителя'
],
],
'clientOptions' => [
'multiSelect' => false,
'showIcon' => true,
// 'showCheckbox' => true,
// 'showTags' => false,
'showBorder' => false,
'onNodeSelected' => $onSelect,
'selectedBackColor' => '#79C137',
'borderColor' => '#fff',
],
]);
echo $groupsContent;
?>
</div>
<?= $form->field($model, 'parent_id')->dropDownList($model->getParentList($model), ['class' => 'form-control', 'prompt'=>'Выберите родительский раздел']) ?>
<?=
$form->field($model, 'active', [
'template' => '{input}<a href="#" class="btn btn-xs btn-success m-l-5 disabled">Пункт меню скрыт от пользователя / Пункт меню виднен для пользователю</a>'
......@@ -97,21 +62,4 @@ JS
<?php ActiveForm::end(); ?>
</div>
<?php
$js = <<<JS
$('.list_parent_id .list-group-item').click(function(){
if($(this).hasClass('node-disabled'))
return false;
if($(this).hasClass('node-selected')){
$('#doclist-parent_id').val('')
}else{
$('#doclist-parent_id').val($(this).attr('id'))
}
})
JS;
$this->registerJs($js);
?>
\ No newline at end of file
</div>
\ No newline at end of file
......@@ -2,8 +2,6 @@
use yii\widgets\Pjax;
use common\modules\documentation\assets\DocumentationAsset;
use execut\widget\TreeView;
use yii\web\JsExpression;
use common\modules\documentation\models\DocList;
/* @var $this \yii\web\View */
......@@ -50,82 +48,60 @@ $ml = $model->lang;
<div class="container padding-bottom-3x mb-2">
<div class="row">
<!-- Content-->
<div class="col-xl-9 col-lg-8 order-lg-2">
<div class="col-xl-8 col-lg-7 order-lg-2">
<!-- Post-->
<h1><?= $ml->name ?></h1>
<h1><?php echo $ml->name ?></h1>
<div class="single-post-meta">
<div class="meta-link"><i class="icon-clock"></i> 22 февраля 2019 г.</div>
<div class="meta-link"><i class="icon-clock"></i><?= $model->list->getFormatedCreatedAt() ?> 22 февраля 2019 г.</div>
</div>
<div>
<?php echo $ml->html ?>
</div>
<?php echo $ml->html ?>
</div>
<!-- Sidebar -->
<div class="col-xl-3 col-lg-4 order-lg-1">
<div class="col-xl-4 col-lg-5 order-lg-1">
<button class="sidebar-toggle position-left" data-toggle="modal" data-target="#modalBlogSidebar"><i class="icon-layout"></i></button>
<aside class="sidebar sidebar-offcanvas">
<!-- Widget Categories-->
<section class="widget widget-categories">
<h3 class="widget-title text-muted">Разделы документации</h3>
<section class="widget widget-categories widget-categories_left">
<h3 class="widget-title">Разделы документации</h3>
<?php
$data = $modelDocList->getParentListForContent($model->list);
$onSelect = new JsExpression(<<<JS
function (undefined, item) {
$('#doccontent-list_id').val(item.id);
}
JS
);
$groupsContent = TreeView::widget([
'data' => $data,
'template' => TreeView::TEMPLATE_SIMPLE,
'size' => TreeView::SIZE_SMALL,
'header' => 'Родитель',
'clientOptions' => [
'multiSelect' => false,
'showIcon' => true,
'showBorder' => false,
'onNodeSelected' => $onSelect,
'selectedBackColor' => '#79C137',
'borderColor' => '#fff',
],
]);
echo $groupsContent;
echo $modelDocList->getList($data);
?>
<!-- <ul class="set">
<li class="active">
<a href="#">Что такое платформа Taskon</a>
<ul class="set_in" style="display: block;">
<li class="active"><a href="#">Используемые технологии в Taskon</a></li>
<li><a href="#">Что такое платформа Taskon? 0 0 1</a></li>
<li><a href="#">Требования к серверу</a></li>
<li><a href="#">Установка платформы Taskon</a></li>
</ul>
</li>
<li>
<a href="#">Используемые технологии в Taskon</a>
<ul class="set_in">
<li><a href="#">Используемые технологии в Taskon</a></li>
<li><a href="#">Что такое платформа Taskon? 0 0 1</a></li>
<li><a href="#">Требования к серверу</a></li>
<li><a href="#">Установка платформы Taskon</a></li>
</ul>
</li>
<li><a href="#">Что такое платформа Taskon? 0 0 1</a></li>
<li><a href="#">Требования к серверу</a></li>
<li><a href="#">Установка платформы Taskon</a></li>
</ul>-->
</section>
<!-- Widget Featured Posts-->
<section class="widget widget-featured-posts">
<h3 class="widget-title text-muted">Популярные разделы справки</h3>
<!-- Entry-->
<div class="entry">
<div class="entry-thumb"><a href="blog-single-rs.html"><img src="/images/taskon.png" alt="Post"></a></div>
<div class="entry-content">
<h4 class="entry-title"><a href="blog-single-rs.html">Заказать разработку приложения на Taskon</a></h4>
</div>
</div>
<!-- Entry-->
<div class="entry">
<div class="entry-content">
<h4 class="entry-title"><a href="blog-single-rs.html">Как установить Taskon 2.0?</a></h4><span class="entry-meta">Инструкция по установке</span>
</div>
</div>
<!-- Entry-->
<div class="entry">
<div class="entry-thumb"><a href="blog-single-rs.html"><img src="/images/taskon.png" alt="Post"></a></div>
<div class="entry-content">
<h4 class="entry-title"><a href="blog-single-rs.html">Справка для пользователя</a></h4>
<span class="entry-meta">Руководство пользователя для клиентов</span>
</div>
</div>
</section>
<!-- Promo Banner-->
<section class="promo-box" style="background-color: #ccc;">
<section class="promo-box" style="background-image: url(img/banners/01.jpg);">
<!-- Choose between .overlay-dark (#000) or .overlay-light (#fff) with default opacity of 50%. You can overrride default color and opacity values via 'style' attribute.--><span class="overlay-dark" style="opacity: .35;"></span>
<div class="promo-box-content text-center padding-top-1x padding-bottom-1x">
<h4 class="text-bold text-light text-shadow">Заказать разработку на платформе <br> Taskon 2.0</h4>
......@@ -138,5 +114,4 @@ JS
</div>
</div>
</div>
<?=
$this->render('@app/views/layouts/footer')?>
\ No newline at end of file
<?= $this->render('@app/views/layouts/footer') ?>
\ No newline at end of file
......@@ -193,6 +193,7 @@ return [
'logout' => 'site/logout',
'activate/<code>' => 'users/user/activate',
'<page:(/)>' => 'content/page/view',
'<document:(/)>' => 'documentation/page/view',
'<_m>/<_c>/<_a>/<id:\d+>' => '<_m>/<_c>/<_a>',
'<_m>/<_c>/<_a>/<page>' => '<_m>/<_c>/<_a>',
'<_m>/<_c>/<_a>' => '<_m>/<_c>/<_a>',
......
......@@ -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