diff --git a/plugins/bedard/blogtags/Plugin.php b/plugins/bedard/blogtags/Plugin.php
index 7ac9f4420..ce670f77c 100644
--- a/plugins/bedard/blogtags/Plugin.php
+++ b/plugins/bedard/blogtags/Plugin.php
@@ -65,13 +65,21 @@ class Plugin extends PluginBase
// extend the post model
PostModel::extend(function($model) {
- $model->belongsToMany['tags'] = [
+ $model->belongsToMany['tags_ru'] = [
'Bedard\BlogTags\Models\Tag',
'table' => 'bedard_blogtags_post_tag',
- 'order' => 'name'
+ 'order' => 'name',
+ 'conditions' => 'bedard_blogtags_tags.locale = "ru"'
+ ];
+ $model->belongsToMany['tags_en'] = [
+ 'Bedard\BlogTags\Models\Tag',
+ 'table' => 'bedard_blogtags_post_tag',
+ 'order' => 'name',
+ 'conditions' => 'bedard_blogtags_tags.locale = "en"'
];
});
+
// extend the post form
PostsController::extendFormFields(function($form, $model, $context) {
if (!$model instanceof PostModel) {
@@ -79,9 +87,17 @@ class Plugin extends PluginBase
}
$form->addSecondaryTabFields([
- 'tags' => [
- 'label' => 'bedard.blogtags::lang.form.label',
+ 'tags_ru' => [
+ 'label' => 'Tags ru',
'mode' => 'relation',
+ 'dependsOn' => 'locale',
+ 'tab' => 'rainlab.blog::lang.post.tab_categories',
+ 'type' => 'taglist'
+ ],
+ 'tags_en' => [
+ 'label' => 'Tags en',
+ 'mode' => 'relation',
+ 'dependsOn' => 'locale',
'tab' => 'rainlab.blog::lang.post.tab_categories',
'type' => 'taglist'
]
diff --git a/plugins/bedard/blogtags/models/Tag.php b/plugins/bedard/blogtags/models/Tag.php
index 1fc539daa..944fe0429 100644
--- a/plugins/bedard/blogtags/models/Tag.php
+++ b/plugins/bedard/blogtags/models/Tag.php
@@ -1,6 +1,7 @@
slug = str_slug($this->name);
+ $this->locale = input('Post')['locale'];
}
/**
@@ -91,4 +93,6 @@ class Tag extends Model
return $this->url = $controller->pageUrl($pageName, $params);
}
+
+
}
diff --git a/plugins/rainlab/blog/models/Post.php b/plugins/rainlab/blog/models/Post.php
index 46436dcff..09b2d8c25 100644
--- a/plugins/rainlab/blog/models/Post.php
+++ b/plugins/rainlab/blog/models/Post.php
@@ -122,6 +122,16 @@ class Post extends Model
*/
public function filterFields($fields, $context = null)
{
+ if(isset($fields->locale)){
+ if($this->locale == 'en')
+ {
+ $fields->tags_en->hidden = false;
+ $fields->tags_ru->hidden = true;
+ }else{
+ $fields->tags_en->hidden = true;
+ $fields->tags_ru->hidden = false;
+ }
+ }
if (!isset($fields->published, $fields->published_at)) {
return;
}
diff --git a/plugins/tps/reklama/components/advertisement/slider.htm b/plugins/tps/reklama/components/advertisement/slider.htm
index 80e25ce85..07e376adb 100644
--- a/plugins/tps/reklama/components/advertisement/slider.htm
+++ b/plugins/tps/reklama/components/advertisement/slider.htm
@@ -1,6 +1,7 @@
-
+{% if group and group.adds %}
+
+
+
+
+{% endif %}
diff --git a/themes/modern/assets/js/main.js b/themes/modern/assets/js/main.js
index fd4d21f57..8812bc2ad 100755
--- a/themes/modern/assets/js/main.js
+++ b/themes/modern/assets/js/main.js
@@ -121,41 +121,4 @@ if (
);
// lazyload end
// =============================================
-// advertisement start
-$(function () {
- var $slideshow = $(".advertisiment");
- var ImagePauses = [6000, 2000, 3000, 10000];
- // Init
- $slideshow.slick({
- dots: false,
- arrows: false,
- infinite: true,
- initialSlide: 0,
- autoplay: true,
- autoplaySpeed: ImagePauses[0],
- fade: true,
- cssEase: "linear",
- adaptiveHeight: true,
- });
-
- // Sliding settings
- $slideshow.on("afterChange", function (event, slick, currentSlide) {
- // Console log, can be removed
- console.log(
- "Current slide: " +
- currentSlide +
- ". Setting speed to: " +
- ImagePauses[currentSlide]
- );
-
- // Update autoplay speed according to slide index
- $slideshow.slick(
- "slickSetOption",
- "autoplaySpeed",
- ImagePauses[currentSlide],
- true
- );
- });
-});
-// advertisement end
diff --git a/themes/modern/meta/menus/top-menu.yaml b/themes/modern/meta/menus/top-menu.yaml
index ec0a1bf62..0aca27ed6 100644
--- a/themes/modern/meta/menus/top-menu.yaml
+++ b/themes/modern/meta/menus/top-menu.yaml
@@ -1,25 +1,26 @@
items:
-
title: Главная
- nesting: null
type: url
url: /
code: ''
- reference: null
- cmsPage: null
- replace: null
viewBag:
locale:
en:
title: Home
url: ''
- isHidden: '1'
+ isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: Рубрики
+ nesting: null
type: header
+ url: null
code: ''
+ reference: null
+ cmsPage: null
+ replace: null
viewBag:
locale:
en:
@@ -31,8 +32,11 @@ items:
items:
-
title: 'New menu item'
+ nesting: null
type: all-blog-categories
+ url: null
code: ''
+ reference: null
cmsPage: category
replace: 1
viewBag:
diff --git a/themes/modern/pages/index.htm b/themes/modern/pages/index.htm
index 2a8da99f2..50ae71719 100644
--- a/themes/modern/pages/index.htm
+++ b/themes/modern/pages/index.htm
@@ -18,6 +18,11 @@ code = "media"
type = "carousel"
random = 0
+[adverts slider]
+code = "media"
+type = "slider"
+random = 0
+
[adverts samsung]
code = "samsung"
type = "single"
@@ -31,20 +36,6 @@ random = 0
-
{% component 'samsung' %}
@@ -62,6 +53,33 @@ random = 0
+
+ {% component 'slider' %}
+
+
+
+ {% partial 'index/category_posts' category = blogCategories.categories.shift %}
+ {% partial 'index/category_posts' category = blogCategories.categories.shift %}
+
+
+
+
+
+
+
+ {% partial 'index/category_posts' category = blogCategories.categories.shift %}
+ {% partial 'index/category_posts' category = blogCategories.categories.shift %}
+
+
+
+
+
+
+
+ {% partial 'index/category_posts' category = blogCategories.categories.shift %}
+ {% partial 'index/category_posts' category = blogCategories.categories.shift %}
+
+
-
-
- {% partial 'index/category_posts' category = blogCategories.categories.shift %}
- {% partial 'index/category_posts' category = blogCategories.categories.shift %}
-
-
-
-
-
- {% partial 'index/category_posts' category = blogCategories.categories.shift %}
- {% partial 'index/category_posts' category = blogCategories.categories.shift %}
-
-
-
-
-
- {% partial 'index/category_posts' category = blogCategories.categories.shift %}
- {% partial 'index/category_posts' category = blogCategories.categories.shift %}
-
-
-
{% partial 'index/partner_news'%}