diff --git a/backend/views/objectkb/_form_language.php b/backend/views/objectkb/_form_language.php
index df17bf7..2ca5a23 100755
--- a/backend/views/objectkb/_form_language.php
+++ b/backend/views/objectkb/_form_language.php
@@ -27,8 +27,6 @@
)
->textInput([ 'maxlength' => true ]);
- echo $form->field($model_lang, '[' . $language->id . ']h1')
- ->textInput([ 'maxlength' => true ]);
echo $form->field($model_lang, '[' . $language->id . ']upper_text')
->textarea([ 'rows' => 7 ]);
@@ -36,10 +34,4 @@
echo $form->field($model_lang, '[' . $language->id . ']about_object_text')
->textarea([ 'rows' => 7 ]);
- echo $form->field($model_lang, '[' . $language->id . ']meta_title')
- ->textInput([ 'maxlength' => true ]);
-
- echo $form->field($model_lang, '[' . $language->id . ']meta_description')
- ->textarea([ 'rows' => 4 ]);
-
?>
\ No newline at end of file
diff --git a/common/models/ObjectkbLang.php b/common/models/ObjectkbLang.php
index f440825..c861ca8 100755
--- a/common/models/ObjectkbLang.php
+++ b/common/models/ObjectkbLang.php
@@ -57,9 +57,6 @@
'upper_text',
'about_object_text',
'object_name',
- 'meta_title',
- 'meta_description',
- 'h1',
],
'required',
],
@@ -76,9 +73,6 @@
'upper_text',
'about_object_text',
'object_name',
- 'meta_title',
- 'meta_description',
- 'h1',
],
'string',
],
@@ -113,9 +107,6 @@
'upper_text' => Yii::t('core', 'Upper Text'),
'about_object_text' => Yii::t('core', 'About object text'),
'object_name' => Yii::t('core', 'Object name'),
- 'meta_title' => Yii::t('core', 'Meta Title'),
- 'meta_description' => Yii::t('core', 'Meta Description'),
- 'h1' => Yii::t('core', 'H1 tag'),
];
}
diff --git a/common/models/ObjectkbSearch.php b/common/models/ObjectkbSearch.php
index bac2bde..7a7f189 100644
--- a/common/models/ObjectkbSearch.php
+++ b/common/models/ObjectkbSearch.php
@@ -63,13 +63,15 @@ class ObjectkbSearch extends Objectkb
}
// grid filtering conditions
- $query->andFilterWhere([
- 'id' => $this->id,
- 'slider_id' => $this->slider_id,
- 'status' => $this->status,
- 'sort' => $this->sort,
- 'image_mini_id' => $this->image_mini_id,
- ]);
+ $query->andFilterWhere(
+ [
+ 'id' => $this->id,
+ 'slider_id' => $this->slider_id,
+ 'status' => $this->status,
+ 'sort' => $this->sort,
+ 'image_mini_id' => $this->image_mini_id,
+ ]
+ );
return $dataProvider;
}
diff --git a/console/migrations/m180128_105937_drop_meta_columns_from_object_lang_table.php b/console/migrations/m180128_105937_drop_meta_columns_from_object_lang_table.php
new file mode 100644
index 0000000..24aeece
--- /dev/null
+++ b/console/migrations/m180128_105937_drop_meta_columns_from_object_lang_table.php
@@ -0,0 +1,29 @@
+dropColumn('object_lang', "meta_title");
+ $this->dropColumn('object_lang', "meta_description");
+ $this->dropColumn('object_lang', "h1");
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function down()
+ {
+ $this->addColumn('object_lang', "meta_title", $this->string(50));
+ $this->addColumn('object_lang', "meta_description", $this->string(300));
+ $this->addColumn('object_lang', "h1", $this->string(50));
+ }
+}
diff --git a/frontend/assets/AppAsset.php b/frontend/assets/AppAsset.php
index 4055291..75e7f70 100644
--- a/frontend/assets/AppAsset.php
+++ b/frontend/assets/AppAsset.php
@@ -12,9 +12,9 @@
public $basePath = '@webroot';
public $baseUrl = '@web';
public $css = [
- 'css/site.css',
+// 'css/site.css',
'css/animate.css',
- 'css/style.css',
+// 'css/style.css',
'css/style.blue.css',
'css/owl.carousel.css',
'css/owl.theme.css',
diff --git a/frontend/controllers/BlogController.php b/frontend/controllers/BlogController.php
index 537194c..937d7d0 100644
--- a/frontend/controllers/BlogController.php
+++ b/frontend/controllers/BlogController.php
@@ -24,7 +24,8 @@
[
'status' => true,
]
- ),
+ )
+ ->orderBy("sort"),
'pagination' => [
'pageSize' => 5,
],
diff --git a/frontend/views/blog/_article_item.php b/frontend/views/blog/_article_item.php
index ab67526..bb95c80 100644
--- a/frontend/views/blog/_article_item.php
+++ b/frontend/views/blog/_article_item.php
@@ -27,10 +27,10 @@
@@ -33,8 +42,15 @@
)?>
-
-
+
+
+
+ =SearchWidget::widget()?>
+ =CategoryWidget::widget()?>
+ =TagWidget::widget()?>
+
+
+
\ No newline at end of file
diff --git a/frontend/views/blog/view.php b/frontend/views/blog/view.php
index 30505a7..84847c0 100644
--- a/frontend/views/blog/view.php
+++ b/frontend/views/blog/view.php
@@ -8,6 +8,14 @@
*/
use artbox\weblog\models\Article;
+ use frontend\widgets\SearchWidget;
+ use frontend\widgets\CategoryWidget;
+ use frontend\widgets\TagWidget;
+ use common\models\Settings;
+
+ $settings = Settings::getInstance();
+
+ $this->params[ 'breadcrumbs' ][] = $this->title;
?>
@@ -150,61 +158,11 @@
+ = SearchWidget::widget()?>
-
-
-
+ = CategoryWidget::widget()?>
-
+ = TagWidget::widget()?>
diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php
index cd4108e..3e3b26e 100644
--- a/frontend/views/layouts/main.php
+++ b/frontend/views/layouts/main.php
@@ -39,7 +39,7 @@
'lang',
'pages' => function (ActiveQuery $query) {
$query->with('lang.alias')
- ->where(['in_menu' => true])
+ ->where([ 'in_menu' => true ])
->orderBy([ 'sort' => SORT_ASC ]);
},
]
@@ -64,511 +64,533 @@
?>
beginPage() ?>
-
-
-
-
-
-
- = Html::csrfMetaTags() ?>
- = Html::encode($seo->title) ?>
- head() ?>
-
-
- beginBody() ?>
-
-
-
-
-
-
-
-
-
-
-phone)) {
-// echo \Yii::t('app', 'Contact us on ');
-// echo Html::a($settings->phone, \Yii::t('app', 'tel:')." {$settings->phone}");
-// if (!empty($settings->email)) {
-// echo \Yii::t('app', ' or ');
-// echo Html::a($settings->email, "mailto:$settings->email");
-// }
-// }
-// ?>
-
-
-
-
-
-
-
-
-facebook)) {
-// echo Html::a(
-// Html::icon(
-// 'facebook',
-// [
-// 'prefix' => 'fa fa-',
-// ]
-// ),
-// $settings->facebook,
-// [
-// 'class' => 'external facebook',
-// 'data' => [
-// 'animate-hover' => 'pulse',
-// ],
-// ]
-// );
-// }
-// ?>
-vk)) {
-// echo Html::a(
-// Html::icon(
-// 'vk',
-// [
-// 'prefix' => 'fa fa-',
-// ]
-// ),
-// $settings->vk,
-// [
-// 'class' => 'external vk',
-// 'data' => [
-// 'animate-hover' => 'pulse',
-// ],
-// ]
-// );
-// }
-// ?>
-google)) {
-// echo Html::a(
-// Html::icon(
-// 'google-plus',
-// [
-// 'prefix' => 'fa fa-',
-// ]
-// ),
-// $settings->google,
-// [
-// 'class' => 'external gplus',
-// 'data' => [
-// 'animate-hover' => 'pulse',
-// ],
-// ]
-// );
-// }
-// ?>
-twitter)) {
-// echo Html::a(
-// Html::icon(
-// 'twitter',
-// [
-// 'prefix' => 'fa fa-',
-// ]
-// ),
-// $settings->twitter,
-// [
-// 'class' => 'external twitter',
-// 'data' => [
-// 'animate-hover' => 'pulse',
-// ],
-// ]
-// );
-// }
-// ?>
-ok)) {
-// echo Html::a(
-// Html::icon(
-// 'odnoklassniki',
-// [
-// 'prefix' => 'fa fa-',
-// ]
-// ),
-// $settings->ok,
-// [
-// 'class' => 'external odnoklassniki',
-// 'data' => [
-// 'animate-hover' => 'pulse',
-// ],
-// ]
-// );
-// }
-// ?>
-email)) {
-// echo Html::a(
-// Html::icon(
-// 'envelope',
-// [
-// 'prefix' => 'fa fa-',
-// ]
-// ),
-// "mailto:$settings->email",
-// [
-// 'class' => 'email',
-// 'data' => [
-// 'animate-hover' => 'pulse',
-// ],
-// ]
-// );
-// }
-// ?>
-
-
-
-
-
-
+
+
+
+
+
+
+ = Html::csrfMetaTags() ?>
+ = Html::encode($seo->title) ?>
+ head() ?>
+
+
+ beginBody() ?>
+
+
+
+
+
+
+
+
+
+
+ phone)) {
+ // echo \Yii::t('app', 'Contact us on ');
+ // echo Html::a($settings->phone, \Yii::t('app', 'tel:')." {$settings->phone}");
+ // if (!empty($settings->email)) {
+ // echo \Yii::t('app', ' or ');
+ // echo Html::a($settings->email, "mailto:$settings->email");
+ // }
+ // }
+ // ?>
+
+
+
+
+
+
+
+
+ facebook)) {
+ // echo Html::a(
+ // Html::icon(
+ // 'facebook',
+ // [
+ // 'prefix' => 'fa fa-',
+ // ]
+ // ),
+ // $settings->facebook,
+ // [
+ // 'class' => 'external facebook',
+ // 'data' => [
+ // 'animate-hover' => 'pulse',
+ // ],
+ // ]
+ // );
+ // }
+ // ?>
+ vk)) {
+ // echo Html::a(
+ // Html::icon(
+ // 'vk',
+ // [
+ // 'prefix' => 'fa fa-',
+ // ]
+ // ),
+ // $settings->vk,
+ // [
+ // 'class' => 'external vk',
+ // 'data' => [
+ // 'animate-hover' => 'pulse',
+ // ],
+ // ]
+ // );
+ // }
+ // ?>
+ google)) {
+ // echo Html::a(
+ // Html::icon(
+ // 'google-plus',
+ // [
+ // 'prefix' => 'fa fa-',
+ // ]
+ // ),
+ // $settings->google,
+ // [
+ // 'class' => 'external gplus',
+ // 'data' => [
+ // 'animate-hover' => 'pulse',
+ // ],
+ // ]
+ // );
+ // }
+ // ?>
+ twitter)) {
+ // echo Html::a(
+ // Html::icon(
+ // 'twitter',
+ // [
+ // 'prefix' => 'fa fa-',
+ // ]
+ // ),
+ // $settings->twitter,
+ // [
+ // 'class' => 'external twitter',
+ // 'data' => [
+ // 'animate-hover' => 'pulse',
+ // ],
+ // ]
+ // );
+ // }
+ // ?>
+ ok)) {
+ // echo Html::a(
+ // Html::icon(
+ // 'odnoklassniki',
+ // [
+ // 'prefix' => 'fa fa-',
+ // ]
+ // ),
+ // $settings->ok,
+ // [
+ // 'class' => 'external odnoklassniki',
+ // 'data' => [
+ // 'animate-hover' => 'pulse',
+ // ],
+ // ]
+ // );
+ // }
+ // ?>
+ email)) {
+ // echo Html::a(
+ // Html::icon(
+ // 'envelope',
+ // [
+ // 'prefix' => 'fa fa-',
+ // ]
+ // ),
+ // "mailto:$settings->email",
+ // [
+ // 'class' => 'email',
+ // 'data' => [
+ // 'animate-hover' => 'pulse',
+ // ],
+ // ]
+ // );
+ // }
+ // ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ \Yii::t('app', 'menu-about'),
+ 'url' => [ Url::home() ],
+ ];
+ $items[] = [
+ 'label' => \Yii::t('app', 'menu-individual'),
+ 'url' => [ 'site/individual' ],
+ ];
+ $items[] = [
+ 'label' => \Yii::t('app', 'menu-legal'),
+ 'url' => [ 'site/legal' ],
+ ];
+ $items[] = [
+ 'label' => \Yii::t('app', 'menu-objects'),
+ 'url' => [ 'object/index' ],
+ ];
+ $items[] = [
+ 'label' => \Yii::t('app', 'menu-green'),
+ 'url' => [ 'site/green' ],
+ ];
+ $items[] = [
+ 'label' => \Yii::t('app', 'menu-mediaabout'),
+ 'url' => [ 'site/media-about' ],
+ ];
+ $items[] = [
+ 'label' => \Yii::t('app', 'menu-blog'),
+ 'url' => [ 'blog/index' ],
+ ];
+ $items[] = [
+ 'label' => \Yii::t('app', 'menu-contacts'),
+ 'url' => [ 'site/contact' ],
+ ];
+ echo Nav::widget(
+ [
+ 'items' => $items,
+ 'options' => [
+ 'class' => 'nav navbar-nav navbar-right',
+ ],
+ ]
+ );
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'feedback-form',
+ 'method' => 'POST',
+ 'action' => '/site/feedback',
+ ]
+ ); ?>
+
+ = $form->field($feedback, 'name')
+ ->textInput(); ?>
+
+ = $form->field($feedback, 'email')
+ ->textInput(); ?>
+
+ = $form->field($feedback, 'phone')
+ ->textInput(); ?>
+
+ = $form->field($feedback, 'message')
+ ->textarea(
+ [
+ 'rows' => 4,
+ ]
+ ); ?>
+
+
+ = Html::submitButton(
+ 'Отправить',
+ [
+ 'class' => 'send-form btn btn-lg btn-template-primary',
+ ]
+ ) ?>
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'feedback-form',
- 'method' => 'POST',
- 'action' => '/site/feedback',
- ]
- ); ?>
-
- = $form->field($feedback, 'name')
- ->textInput(); ?>
-
- = $form->field($feedback, 'email')
- ->textInput(); ?>
-
- = $form->field($feedback, 'phone')
- ->textInput(); ?>
-
- = $form->field($feedback, 'message')
- ->textarea(
- [
- 'rows' => 4,
- ]
- ); ?>
-
- = Html::submitButton(
- 'Отправить',
- [
- 'class' => 'send-form btn btn-lg btn-template-primary',
- ]
- ) ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
Thank for your reply, we will call you, maybe.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
= $this->title; ?>
-
-
- = Breadcrumbs::widget(
- [
- 'links' => isset($this->params[ 'breadcrumbs' ]) ? $this->params[ 'breadcrumbs' ] : [],
- ]
- ) ?>
-
-
-
-
-
-
-
-
-
-
- = $content ?>
-
-
-
-
-
-
-
-
-
-
-
-
- endBody() ?>
-
-
+
+ endBody() ?>
+
+
endPage() ?>
\ No newline at end of file
diff --git a/frontend/views/object/index.php b/frontend/views/object/index.php
index e40a4b7..9e86009 100644
--- a/frontend/views/object/index.php
+++ b/frontend/views/object/index.php
@@ -17,8 +17,8 @@
$settings = Settings::getInstance();
- $this->title = \Yii::t('app', 'menu-objects');
- $this->params[ 'breadcrumbs' ][] = $this->title;
+ $this->params['h1'] = \Yii::t('app', 'menu-objects');
+ $this->params[ 'breadcrumbs' ][] = $this->params['h1'];
?>
diff --git a/frontend/widgets/CategoryWidget.php b/frontend/widgets/CategoryWidget.php
new file mode 100644
index 0000000..4129480
--- /dev/null
+++ b/frontend/widgets/CategoryWidget.php
@@ -0,0 +1,20 @@
+render(
+ 'category_view'
+ );
+ }
+ }
+
\ No newline at end of file
diff --git a/frontend/widgets/SearchWidget.php b/frontend/widgets/SearchWidget.php
new file mode 100644
index 0000000..9aff8de
--- /dev/null
+++ b/frontend/widgets/SearchWidget.php
@@ -0,0 +1,19 @@
+render(
+ 'search_view'
+ );
+ }
+ }
\ No newline at end of file
diff --git a/frontend/widgets/TagWidget.php b/frontend/widgets/TagWidget.php
new file mode 100644
index 0000000..8e77eb0
--- /dev/null
+++ b/frontend/widgets/TagWidget.php
@@ -0,0 +1,20 @@
+render(
+ 'tag_view'
+ );
+ }
+ }
\ No newline at end of file
diff --git a/frontend/widgets/views/category_view.php b/frontend/widgets/views/category_view.php
new file mode 100644
index 0000000..cc01be3
--- /dev/null
+++ b/frontend/widgets/views/category_view.php
@@ -0,0 +1,26 @@
+
+
+
diff --git a/frontend/widgets/views/search_view.php b/frontend/widgets/views/search_view.php
new file mode 100644
index 0000000..93602c8
--- /dev/null
+++ b/frontend/widgets/views/search_view.php
@@ -0,0 +1,26 @@
+
+
+
diff --git a/frontend/widgets/views/tag_view.php b/frontend/widgets/views/tag_view.php
new file mode 100644
index 0000000..34a96b2
--- /dev/null
+++ b/frontend/widgets/views/tag_view.php
@@ -0,0 +1,27 @@
+
+
+
--
libgit2 0.21.4