Commit 379797826922810e1a39378d860f9f9eefa9b180

Authored by Karnovsky A
2 parents bce22e8a fa68c38d

Merge branch 'master' of gitlab.artweb.com.ua:root/baucenter

# Conflicts:
#	composer.json
#	composer.lock
Showing 797 changed files with 10926 additions and 555 deletions   Show diff stats

Too many changes.

To preserve performance only 100 of 797 files are displayed.

.gitignore
... ... @@ -40,4 +40,7 @@ phpunit.phar
40 40 /backend/web/assets/
41 41 /frontend/web/assets/
42 42 /frontend/web/css/node_modules/
  43 +/frontend/views/вертска
43 44 composer.lock
  45 +
  46 +tests/_output/*
44 47 \ No newline at end of file
... ...
24032016_0400.sql 100644 → 100755
LICENSE.md 100644 → 100755
README.md 100644 → 100755
backend/assets/AdminLteAsset.php 100644 → 100755
backend/assets/AppAsset.php 100644 → 100755
backend/assets/FontAwesomeAsset.php 100644 → 100755
backend/config/.gitignore 100644 → 100755
backend/config/bootstrap.php 100644 → 100755
backend/config/main.php 100644 → 100755
... ... @@ -54,6 +54,19 @@ return [
54 54 'adminUrl' => '/admin'
55 55  
56 56 ],
  57 + 'urlManager' => [
  58 + 'baseUrl' => '/admin',
  59 + 'enablePrettyUrl' => true,
  60 + 'showScriptName' => false,
  61 + 'rules' => [
  62 + 'slider-image/<action>/<slider_id:[A-Za-z0-9_-]+>/<id:[A-Za-z0-9_-]+>' => 'slider-image/<action>',
  63 + 'slider-image/<action>/<slider_id:[A-Za-z0-9_-]+>' => 'slider-image/<action>',
  64 + 'seo-dynamic/<action>/<seo_category_id:[A-Za-z0-9_-]+>/<id:[A-Za-z0-9_-]+>' => 'seo-dynamic/<action>',
  65 + 'seo-dynamic/<action>/<seo_category_id:[A-Za-z0-9_-]+>' => 'seo-dynamic/<action>',
  66 +
  67 +
  68 + ]
  69 + ]
57 70  
58 71 ],
59 72 'params' => $params,
... ...
backend/config/params.php 100644 → 100755
backend/controllers/BannerController.php 0 → 100755
  1 +<?php
  2 +
  3 +namespace backend\controllers;
  4 +
  5 +use common\modules\file\widgets\ImageUploader;
  6 +use Yii;
  7 +use common\models\Banner;
  8 +use common\models\BannerSearch;
  9 +use yii\web\Controller;
  10 +use yii\web\NotFoundHttpException;
  11 +use yii\filters\VerbFilter;
  12 +
  13 +/**
  14 + * BannerController implements the CRUD actions for Banner model.
  15 + */
  16 +class BannerController extends Controller
  17 +{
  18 + /**
  19 + * @inheritdoc
  20 + */
  21 + public function behaviors()
  22 + {
  23 + return [
  24 + 'verbs' => [
  25 + 'class' => VerbFilter::className(),
  26 + 'actions' => [
  27 + 'delete' => ['POST'],
  28 + ],
  29 + ],
  30 + ];
  31 + }
  32 +
  33 + /**
  34 + * Lists all Banner models.
  35 + * @return mixed
  36 + */
  37 + public function actionIndex()
  38 + {
  39 + $searchModel = new BannerSearch();
  40 + $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
  41 +
  42 + return $this->render('index', [
  43 + 'searchModel' => $searchModel,
  44 + 'dataProvider' => $dataProvider,
  45 + ]);
  46 + }
  47 +
  48 + public function actionSaveImageSettings(){
  49 + \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
  50 + $width = Yii::$app->request->post('width');
  51 + $height = Yii::$app->request->post('height');
  52 +
  53 + $html = ImageUploader::widget([
  54 + 'model'=> new Banner(),
  55 + 'field'=>'image',
  56 + 'size' => [
  57 + [
  58 + 'width'=>$width,
  59 + 'height'=>$height,
  60 + ],
  61 + ],
  62 + 'name' => "Загрузить баннер"
  63 + ]);
  64 +
  65 + return ['html'=>$html];
  66 + }
  67 +
  68 + /**
  69 + * Displays a single Banner model.
  70 + * @param integer $id
  71 + * @return mixed
  72 + */
  73 + public function actionView($id)
  74 + {
  75 + return $this->render('view', [
  76 + 'model' => $this->findModel($id),
  77 + ]);
  78 + }
  79 +
  80 + /**
  81 + * Creates a new Banner model.
  82 + * If creation is successful, the browser will be redirected to the 'view' page.
  83 + * @return mixed
  84 + */
  85 + public function actionCreate()
  86 + {
  87 + $model = new Banner();
  88 +
  89 + if ($model->load(Yii::$app->request->post()) && $model->save()) {
  90 + return $this->redirect(['view', 'id' => $model->banner_id]);
  91 + } else {
  92 + return $this->render('create', [
  93 + 'model' => $model,
  94 + ]);
  95 + }
  96 + }
  97 +
  98 + /**
  99 + * Updates an existing Banner model.
  100 + * If update is successful, the browser will be redirected to the 'view' page.
  101 + * @param integer $id
  102 + * @return mixed
  103 + */
  104 + public function actionUpdate($id)
  105 + {
  106 + $model = $this->findModel($id);
  107 +
  108 + if ($model->load(Yii::$app->request->post()) && $model->save()) {
  109 + return $this->redirect(['view', 'id' => $model->banner_id]);
  110 + } else {
  111 + return $this->render('update', [
  112 + 'model' => $model,
  113 + ]);
  114 + }
  115 + }
  116 +
  117 + /**
  118 + * Deletes an existing Banner model.
  119 + * If deletion is successful, the browser will be redirected to the 'index' page.
  120 + * @param integer $id
  121 + * @return mixed
  122 + */
  123 + public function actionDelete($id)
  124 + {
  125 + $this->findModel($id)->delete();
  126 +
  127 + return $this->redirect(['index']);
  128 + }
  129 +
  130 + /**
  131 + * Finds the Banner model based on its primary key value.
  132 + * If the model is not found, a 404 HTTP exception will be thrown.
  133 + * @param integer $id
  134 + * @return Banner the loaded model
  135 + * @throws NotFoundHttpException if the model cannot be found
  136 + */
  137 + protected function findModel($id)
  138 + {
  139 + if (($model = Banner::findOne($id)) !== null) {
  140 + return $model;
  141 + } else {
  142 + throw new NotFoundHttpException('The requested page does not exist.');
  143 + }
  144 + }
  145 +}
... ...
backend/controllers/BlogController.php 100644 → 100755
backend/controllers/BrandController.php 100644 → 100755
backend/controllers/CategoryController.php 100644 → 100755
backend/controllers/EventController.php 0 → 100644
  1 +<?php
  2 +
  3 +namespace backend\controllers;
  4 +
  5 +use Yii;
  6 +use common\models\Event;
  7 +use common\models\EventSearch;
  8 +use yii\web\Controller;
  9 +use yii\web\NotFoundHttpException;
  10 +use yii\filters\VerbFilter;
  11 +
  12 +/**
  13 + * EventController implements the CRUD actions for Event model.
  14 + */
  15 +class EventController extends Controller
  16 +{
  17 + /**
  18 + * @inheritdoc
  19 + */
  20 + public function behaviors()
  21 + {
  22 + return [
  23 + 'verbs' => [
  24 + 'class' => VerbFilter::className(),
  25 + 'actions' => [
  26 + 'delete' => ['POST'],
  27 + ],
  28 + ],
  29 + ];
  30 + }
  31 +
  32 + /**
  33 + * Lists all Event models.
  34 + * @return mixed
  35 + */
  36 + public function actionIndex()
  37 + {
  38 + $searchModel = new EventSearch();
  39 + $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
  40 +
  41 + return $this->render('index', [
  42 + 'searchModel' => $searchModel,
  43 + 'dataProvider' => $dataProvider,
  44 + ]);
  45 + }
  46 +
  47 + /**
  48 + * Displays a single Event model.
  49 + * @param integer $id
  50 + * @return mixed
  51 + */
  52 + public function actionView($id)
  53 + {
  54 + return $this->render('view', [
  55 + 'model' => $this->findModel($id),
  56 + ]);
  57 + }
  58 +
  59 + /**
  60 + * Creates a new Event model.
  61 + * If creation is successful, the browser will be redirected to the 'view' page.
  62 + * @return mixed
  63 + */
  64 + public function actionCreate()
  65 + {
  66 + $model = new Event();
  67 +
  68 + if ($model->load(Yii::$app->request->post()) && $model->save()) {
  69 + return $this->redirect(['view', 'id' => $model->event_id]);
  70 + } else {
  71 + return $this->render('create', [
  72 + 'model' => $model,
  73 + ]);
  74 + }
  75 + }
  76 +
  77 + /**
  78 + * Updates an existing Event model.
  79 + * If update is successful, the browser will be redirected to the 'view' page.
  80 + * @param integer $id
  81 + * @return mixed
  82 + */
  83 + public function actionUpdate($id)
  84 + {
  85 + $model = $this->findModel($id);
  86 +
  87 + if ($model->load(Yii::$app->request->post()) && $model->save()) {
  88 + return $this->redirect(['view', 'id' => $model->event_id]);
  89 + } else {
  90 + return $this->render('update', [
  91 + 'model' => $model,
  92 + ]);
  93 + }
  94 + }
  95 +
  96 + /**
  97 + * Deletes an existing Event model.
  98 + * If deletion is successful, the browser will be redirected to the 'index' page.
  99 + * @param integer $id
  100 + * @return mixed
  101 + */
  102 + public function actionDelete($id)
  103 + {
  104 + $this->findModel($id)->delete();
  105 +
  106 + return $this->redirect(['index']);
  107 + }
  108 +
  109 + /**
  110 + * Finds the Event model based on its primary key value.
  111 + * If the model is not found, a 404 HTTP exception will be thrown.
  112 + * @param integer $id
  113 + * @return Event the loaded model
  114 + * @throws NotFoundHttpException if the model cannot be found
  115 + */
  116 + protected function findModel($id)
  117 + {
  118 + if (($model = Event::findOne($id)) !== null) {
  119 + return $model;
  120 + } else {
  121 + throw new NotFoundHttpException('The requested page does not exist.');
  122 + }
  123 + }
  124 +}
... ...
backend/controllers/OrdersController.php 100644 → 100755
backend/controllers/PageController.php 0 → 100644
  1 +<?php
  2 +
  3 +namespace backend\controllers;
  4 +
  5 +use Yii;
  6 +use yii\filters\AccessControl;
  7 +use common\models\Page;
  8 +use common\models\PageSearch;
  9 +use yii\web\Controller;
  10 +use yii\web\NotFoundHttpException;
  11 +use yii\filters\VerbFilter;
  12 +
  13 +/**
  14 + * PageController implements the CRUD actions for Page model.
  15 + */
  16 +class PageController extends Controller
  17 +{
  18 + public function behaviors()
  19 + {
  20 + return [
  21 + 'access' => [
  22 + 'class' => AccessControl::className(),
  23 + 'rules' => [
  24 + [
  25 + 'actions' => ['login', 'error'],
  26 + 'allow' => true,
  27 + ],
  28 + [
  29 + 'actions' => ['logout', 'index','create','update','view','delete','test-img' ],
  30 + 'allow' => true,
  31 + 'roles' => ['@'],
  32 + ],
  33 + ],
  34 + ],
  35 + 'verbs' => [
  36 + 'class' => VerbFilter::className(),
  37 + 'actions' => [
  38 + 'logout' => ['post'],
  39 + ],
  40 + ],
  41 + ];
  42 + }
  43 +
  44 + /**
  45 + * Lists all Page models.
  46 + * @return mixed
  47 + */
  48 + public function actionIndex()
  49 + {
  50 + $searchModel = new PageSearch();
  51 + $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
  52 +
  53 + return $this->render('index', [
  54 + 'searchModel' => $searchModel,
  55 + 'dataProvider' => $dataProvider,
  56 + ]);
  57 + }
  58 +
  59 + /**
  60 + * Displays a single Page model.
  61 + * @param integer $id
  62 + * @return mixed
  63 + */
  64 + public function actionView($id)
  65 + {
  66 + return $this->render('view', [
  67 + 'model' => $this->findModel($id),
  68 + ]);
  69 + }
  70 +
  71 + /**
  72 + * Creates a new Page model.
  73 + * If creation is successful, the browser will be redirected to the 'view' page.
  74 + * @return mixed
  75 + */
  76 + public function actionCreate()
  77 + {
  78 + $model = new Page();
  79 +
  80 + if ($model->load(Yii::$app->request->post()) && $model->save()) {
  81 + return $this->redirect(['view', 'id' => $model->id]);
  82 + } else {
  83 + return $this->render('create', [
  84 + 'model' => $model,
  85 + ]);
  86 + }
  87 + }
  88 +
  89 + /**
  90 + * Updates an existing Page model.
  91 + * If update is successful, the browser will be redirected to the 'view' page.
  92 + * @param integer $id
  93 + * @return mixed
  94 + */
  95 + public function actionUpdate($id)
  96 + {
  97 + $model = $this->findModel($id);
  98 +
  99 + if ($model->load(Yii::$app->request->post()) && $model->save()) {
  100 + return $this->redirect(['view', 'id' => $model->id]);
  101 + } else {
  102 + return $this->render('update', [
  103 + 'model' => $model,
  104 + ]);
  105 + }
  106 + }
  107 +
  108 + /**
  109 + * Deletes an existing Page model.
  110 + * If deletion is successful, the browser will be redirected to the 'index' page.
  111 + * @param integer $id
  112 + * @return mixed
  113 + */
  114 + public function actionDelete($id)
  115 + {
  116 + $this->findModel($id)->delete();
  117 +
  118 + return $this->redirect(['index']);
  119 + }
  120 +
  121 + /**
  122 + * Finds the Page model based on its primary key value.
  123 + * If the model is not found, a 404 HTTP exception will be thrown.
  124 + * @param integer $id
  125 + * @return Page the loaded model
  126 + * @throws NotFoundHttpException if the model cannot be found
  127 + */
  128 + protected function findModel($id)
  129 + {
  130 + if (($model = Page::findOne($id)) !== null) {
  131 + return $model;
  132 + } else {
  133 + throw new NotFoundHttpException('The requested page does not exist.');
  134 + }
  135 + }
  136 +}
... ...
backend/controllers/SeoCategoryController.php 0 → 100644
  1 +<?php
  2 +
  3 +namespace backend\controllers;
  4 +
  5 +use Yii;
  6 +use common\models\SeoCategory;
  7 +use common\models\SeoCategorySearch;
  8 +use yii\web\Controller;
  9 +use yii\web\NotFoundHttpException;
  10 +use yii\filters\VerbFilter;
  11 +
  12 +/**
  13 + * SeoCategoryController implements the CRUD actions for SeoCategory model.
  14 + */
  15 +class SeoCategoryController extends Controller
  16 +{
  17 + /**
  18 + * @inheritdoc
  19 + */
  20 + public function behaviors()
  21 + {
  22 + return [
  23 + 'verbs' => [
  24 + 'class' => VerbFilter::className(),
  25 + 'actions' => [
  26 + 'delete' => ['POST'],
  27 + ],
  28 + ],
  29 + ];
  30 + }
  31 +
  32 + /**
  33 + * Lists all SeoCategory models.
  34 + * @return mixed
  35 + */
  36 + public function actionIndex()
  37 + {
  38 + $searchModel = new SeoCategorySearch();
  39 + $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
  40 +
  41 + return $this->render('index', [
  42 + 'searchModel' => $searchModel,
  43 + 'dataProvider' => $dataProvider,
  44 + ]);
  45 + }
  46 +
  47 + /**
  48 + * Displays a single SeoCategory model.
  49 + * @param integer $id
  50 + * @return mixed
  51 + */
  52 + public function actionView($id)
  53 + {
  54 + return $this->render('view', [
  55 + 'model' => $this->findModel($id),
  56 + ]);
  57 + }
  58 +
  59 + /**
  60 + * Creates a new SeoCategory model.
  61 + * If creation is successful, the browser will be redirected to the 'view' page.
  62 + * @return mixed
  63 + */
  64 + public function actionCreate()
  65 + {
  66 + $model = new SeoCategory();
  67 +
  68 + if ($model->load(Yii::$app->request->post()) && $model->save()) {
  69 + return $this->redirect(['view', 'id' => $model->seo_category_id]);
  70 + } else {
  71 + return $this->render('create', [
  72 + 'model' => $model,
  73 + ]);
  74 + }
  75 + }
  76 +
  77 + /**
  78 + * Updates an existing SeoCategory model.
  79 + * If update is successful, the browser will be redirected to the 'view' page.
  80 + * @param integer $id
  81 + * @return mixed
  82 + */
  83 + public function actionUpdate($id)
  84 + {
  85 + $model = $this->findModel($id);
  86 +
  87 + if ($model->load(Yii::$app->request->post()) && $model->save()) {
  88 + return $this->redirect(['view', 'id' => $model->seo_category_id]);
  89 + } else {
  90 + return $this->render('update', [
  91 + 'model' => $model,
  92 + ]);
  93 + }
  94 + }
  95 +
  96 + /**
  97 + * Deletes an existing SeoCategory model.
  98 + * If deletion is successful, the browser will be redirected to the 'index' page.
  99 + * @param integer $id
  100 + * @return mixed
  101 + */
  102 + public function actionDelete($id)
  103 + {
  104 + $this->findModel($id)->delete();
  105 +
  106 + return $this->redirect(['index']);
  107 + }
  108 +
  109 + /**
  110 + * Finds the SeoCategory model based on its primary key value.
  111 + * If the model is not found, a 404 HTTP exception will be thrown.
  112 + * @param integer $id
  113 + * @return SeoCategory the loaded model
  114 + * @throws NotFoundHttpException if the model cannot be found
  115 + */
  116 + protected function findModel($id)
  117 + {
  118 + if (($model = SeoCategory::findOne($id)) !== null) {
  119 + return $model;
  120 + } else {
  121 + throw new NotFoundHttpException('The requested page does not exist.');
  122 + }
  123 + }
  124 +}
... ...
backend/controllers/SeoController.php 0 → 100644
  1 +<?php
  2 +
  3 +namespace backend\controllers;
  4 +
  5 +use Yii;
  6 +use common\models\Seo;
  7 +use common\models\SeoSearch;
  8 +use yii\web\Controller;
  9 +use yii\web\NotFoundHttpException;
  10 +use yii\filters\VerbFilter;
  11 +
  12 +/**
  13 + * SeoController implements the CRUD actions for Seo model.
  14 + */
  15 +class SeoController extends Controller
  16 +{
  17 + /**
  18 + * @inheritdoc
  19 + */
  20 + public function behaviors()
  21 + {
  22 + return [
  23 + 'verbs' => [
  24 + 'class' => VerbFilter::className(),
  25 + 'actions' => [
  26 + 'delete' => ['POST'],
  27 + ],
  28 + ],
  29 + ];
  30 + }
  31 +
  32 + /**
  33 + * Lists all Seo models.
  34 + * @return mixed
  35 + */
  36 + public function actionIndex()
  37 + {
  38 + $searchModel = new SeoSearch();
  39 + $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
  40 +
  41 + return $this->render('index', [
  42 + 'searchModel' => $searchModel,
  43 + 'dataProvider' => $dataProvider,
  44 + ]);
  45 + }
  46 +
  47 + /**
  48 + * Displays a single Seo model.
  49 + * @param integer $id
  50 + * @return mixed
  51 + */
  52 + public function actionView($id)
  53 + {
  54 + return $this->render('view', [
  55 + 'model' => $this->findModel($id),
  56 + ]);
  57 + }
  58 +
  59 + /**
  60 + * Creates a new Seo model.
  61 + * If creation is successful, the browser will be redirected to the 'view' page.
  62 + * @return mixed
  63 + */
  64 + public function actionCreate()
  65 + {
  66 + $model = new Seo();
  67 +
  68 + if ($model->load(Yii::$app->request->post()) && $model->save()) {
  69 + return $this->redirect(['view', 'id' => $model->seo_id]);
  70 + } else {
  71 + return $this->render('create', [
  72 + 'model' => $model,
  73 + ]);
  74 + }
  75 + }
  76 +
  77 + /**
  78 + * Updates an existing Seo model.
  79 + * If update is successful, the browser will be redirected to the 'view' page.
  80 + * @param integer $id
  81 + * @return mixed
  82 + */
  83 + public function actionUpdate($id)
  84 + {
  85 + $model = $this->findModel($id);
  86 +
  87 + if ($model->load(Yii::$app->request->post()) && $model->save()) {
  88 + return $this->redirect(['view', 'id' => $model->seo_id]);
  89 + } else {
  90 + return $this->render('update', [
  91 + 'model' => $model,
  92 + ]);
  93 + }
  94 + }
  95 +
  96 + /**
  97 + * Deletes an existing Seo model.
  98 + * If deletion is successful, the browser will be redirected to the 'index' page.
  99 + * @param integer $id
  100 + * @return mixed
  101 + */
  102 + public function actionDelete($id)
  103 + {
  104 + $this->findModel($id)->delete();
  105 +
  106 + return $this->redirect(['index']);
  107 + }
  108 +
  109 + /**
  110 + * Finds the Seo model based on its primary key value.
  111 + * If the model is not found, a 404 HTTP exception will be thrown.
  112 + * @param integer $id
  113 + * @return Seo the loaded model
  114 + * @throws NotFoundHttpException if the model cannot be found
  115 + */
  116 + protected function findModel($id)
  117 + {
  118 + if (($model = Seo::findOne($id)) !== null) {
  119 + return $model;
  120 + } else {
  121 + throw new NotFoundHttpException('The requested page does not exist.');
  122 + }
  123 + }
  124 +}
... ...
backend/controllers/SeoDynamicController.php 0 → 100644
  1 +<?php
  2 +
  3 +namespace backend\controllers;
  4 +
  5 +use Yii;
  6 +use common\models\SeoDynamic;
  7 +use common\models\SeoDynamicSearch;
  8 +use yii\web\Controller;
  9 +use yii\web\NotFoundHttpException;
  10 +use yii\filters\VerbFilter;
  11 +
  12 +/**
  13 + * SeoDynamicController implements the CRUD actions for SeoDynamic model.
  14 + */
  15 +class SeoDynamicController extends Controller
  16 +{
  17 + /**
  18 + * @inheritdoc
  19 + */
  20 + public function behaviors()
  21 + {
  22 + return [
  23 + 'verbs' => [
  24 + 'class' => VerbFilter::className(),
  25 + 'actions' => [
  26 + 'delete' => ['POST'],
  27 + ],
  28 + ],
  29 + ];
  30 + }
  31 +
  32 + /**
  33 + * Lists all SeoDynamic models.
  34 + * @return mixed
  35 + */
  36 + public function actionIndex($seo_category_id)
  37 + {
  38 + $searchModel = new SeoDynamicSearch();
  39 + $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
  40 +
  41 + return $this->render('index', [
  42 + 'searchModel' => $searchModel,
  43 + 'dataProvider' => $dataProvider,
  44 + 'seo_category_id' => $seo_category_id
  45 + ]);
  46 + }
  47 +
  48 + /**
  49 + * Displays a single SeoDynamic model.
  50 + * @param integer $id
  51 + * @return mixed
  52 + */
  53 + public function actionView($seo_category_id, $id)
  54 + {
  55 + return $this->render('view', [
  56 + 'model' => $this->findModel($id),
  57 + 'seo_category_id' => $seo_category_id
  58 + ]);
  59 + }
  60 +
  61 + /**
  62 + * Creates a new SeoDynamic model.
  63 + * If creation is successful, the browser will be redirected to the 'view' page.
  64 + * @return mixed
  65 + */
  66 + public function actionCreate($seo_category_id)
  67 + {
  68 + $model = new SeoDynamic();
  69 +
  70 + if ($model->load(Yii::$app->request->post())) {
  71 + $model->seo_category_id = $seo_category_id;
  72 + $model->save();
  73 + return $this->redirect(['index', 'seo_category_id' => $model->seo_category_id]);
  74 + } else {
  75 + return $this->render('create', [
  76 + 'model' => $model,
  77 + 'seo_category_id' => $seo_category_id
  78 + ]);
  79 + }
  80 + }
  81 +
  82 + /**
  83 + * Updates an existing SeoDynamic model.
  84 + * If update is successful, the browser will be redirected to the 'view' page.
  85 + * @param integer $id
  86 + * @return mixed
  87 + */
  88 + public function actionUpdate($seo_category_id,$id)
  89 + {
  90 + $model = $this->findModel($id);
  91 +
  92 + if ($model->load(Yii::$app->request->post()) && $model->save()) {
  93 + return $this->redirect(['index', 'seo_category_id' => $model->seo_category_id]);
  94 + } else {
  95 + return $this->render('update', [
  96 + 'model' => $model,
  97 + 'seo_category_id' => $seo_category_id
  98 + ]);
  99 + }
  100 + }
  101 +
  102 + /**
  103 + * Deletes an existing SeoDynamic model.
  104 + * If deletion is successful, the browser will be redirected to the 'index' page.
  105 + * @param integer $id
  106 + * @return mixed
  107 + */
  108 + public function actionDelete($seo_category_id,$id)
  109 + {
  110 + $this->findModel($id)->delete();
  111 +
  112 + return $this->redirect(['index','seo_category_id'=> $seo_category_id]);
  113 + }
  114 +
  115 + /**
  116 + * Finds the SeoDynamic model based on its primary key value.
  117 + * If the model is not found, a 404 HTTP exception will be thrown.
  118 + * @param integer $id
  119 + * @return SeoDynamic the loaded model
  120 + * @throws NotFoundHttpException if the model cannot be found
  121 + */
  122 + protected function findModel($id)
  123 + {
  124 + if (($model = SeoDynamic::findOne($id)) !== null) {
  125 + return $model;
  126 + } else {
  127 + throw new NotFoundHttpException('The requested page does not exist.');
  128 + }
  129 + }
  130 +}
... ...
backend/controllers/ServiceController.php 0 → 100644
  1 +<?php
  2 +
  3 +namespace backend\controllers;
  4 +
  5 +use Yii;
  6 +use common\models\Service;
  7 +use common\models\ServiceSearch;
  8 +use yii\web\Controller;
  9 +use yii\web\NotFoundHttpException;
  10 +use yii\filters\VerbFilter;
  11 +
  12 +/**
  13 + * ServiceController implements the CRUD actions for Service model.
  14 + */
  15 +class ServiceController extends Controller
  16 +{
  17 + /**
  18 + * @inheritdoc
  19 + */
  20 + public function behaviors()
  21 + {
  22 + return [
  23 + 'verbs' => [
  24 + 'class' => VerbFilter::className(),
  25 + 'actions' => [
  26 + 'delete' => ['POST'],
  27 + ],
  28 + ],
  29 + ];
  30 + }
  31 +
  32 + /**
  33 + * Lists all Service models.
  34 + * @return mixed
  35 + */
  36 + public function actionIndex()
  37 + {
  38 + $searchModel = new ServiceSearch();
  39 + $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
  40 +
  41 + return $this->render('index', [
  42 + 'searchModel' => $searchModel,
  43 + 'dataProvider' => $dataProvider,
  44 + ]);
  45 + }
  46 +
  47 + /**
  48 + * Displays a single Service model.
  49 + * @param integer $id
  50 + * @return mixed
  51 + */
  52 + public function actionView($id)
  53 + {
  54 + return $this->render('view', [
  55 + 'model' => $this->findModel($id),
  56 + ]);
  57 + }
  58 +
  59 + /**
  60 + * Creates a new Service model.
  61 + * If creation is successful, the browser will be redirected to the 'view' page.
  62 + * @return mixed
  63 + */
  64 + public function actionCreate()
  65 + {
  66 + $model = new Service();
  67 +
  68 + if ($model->load(Yii::$app->request->post()) && $model->save()) {
  69 + return $this->redirect(['view', 'id' => $model->service_id]);
  70 + } else {
  71 + return $this->render('create', [
  72 + 'model' => $model,
  73 + ]);
  74 + }
  75 + }
  76 +
  77 + /**
  78 + * Updates an existing Service model.
  79 + * If update is successful, the browser will be redirected to the 'view' page.
  80 + * @param integer $id
  81 + * @return mixed
  82 + */
  83 + public function actionUpdate($id)
  84 + {
  85 + $model = $this->findModel($id);
  86 +
  87 + if ($model->load(Yii::$app->request->post()) && $model->save()) {
  88 + return $this->redirect(['view', 'id' => $model->service_id]);
  89 + } else {
  90 + return $this->render('update', [
  91 + 'model' => $model,
  92 + ]);
  93 + }
  94 + }
  95 +
  96 + /**
  97 + * Deletes an existing Service model.
  98 + * If deletion is successful, the browser will be redirected to the 'index' page.
  99 + * @param integer $id
  100 + * @return mixed
  101 + */
  102 + public function actionDelete($id)
  103 + {
  104 + $this->findModel($id)->delete();
  105 +
  106 + return $this->redirect(['index']);
  107 + }
  108 +
  109 + /**
  110 + * Finds the Service model based on its primary key value.
  111 + * If the model is not found, a 404 HTTP exception will be thrown.
  112 + * @param integer $id
  113 + * @return Service the loaded model
  114 + * @throws NotFoundHttpException if the model cannot be found
  115 + */
  116 + protected function findModel($id)
  117 + {
  118 + if (($model = Service::findOne($id)) !== null) {
  119 + return $model;
  120 + } else {
  121 + throw new NotFoundHttpException('The requested page does not exist.');
  122 + }
  123 + }
  124 +}
... ...
backend/controllers/SiteController.php 100644 → 100755
backend/controllers/SliderController.php 0 → 100755
  1 +<?php
  2 +
  3 +namespace backend\controllers;
  4 +
  5 +use common\models\TemplateLocation;
  6 +use Yii;
  7 +use common\models\Slider;
  8 +use common\models\SliderSearch;
  9 +use yii\helpers\ArrayHelper;
  10 +use yii\web\Controller;
  11 +use yii\web\NotFoundHttpException;
  12 +use yii\filters\VerbFilter;
  13 +
  14 +/**
  15 + * SliderController implements the CRUD actions for Slider model.
  16 + */
  17 +class SliderController extends Controller
  18 +{
  19 + /**
  20 + * @inheritdoc
  21 + */
  22 + public function behaviors()
  23 + {
  24 + return [
  25 + 'verbs' => [
  26 + 'class' => VerbFilter::className(),
  27 + 'actions' => [
  28 + 'delete' => ['POST'],
  29 + ],
  30 + ],
  31 + ];
  32 + }
  33 +
  34 + /**
  35 + * Lists all Slider models.
  36 + * @return mixed
  37 + */
  38 + public function actionIndex()
  39 + {
  40 + $searchModel = new SliderSearch();
  41 + $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
  42 +
  43 + return $this->render('index', [
  44 + 'searchModel' => $searchModel,
  45 + 'dataProvider' => $dataProvider,
  46 + ]);
  47 + }
  48 +
  49 + /**
  50 + * Displays a single Slider model.
  51 + * @param integer $id
  52 + * @return mixed
  53 + */
  54 + public function actionView($id)
  55 + {
  56 + return $this->render('view', [
  57 + 'model' => $this->findModel($id),
  58 + ]);
  59 + }
  60 +
  61 + /**
  62 + * Creates a new Slider model.
  63 + * If creation is successful, the browser will be redirected to the 'view' page.
  64 + * @return mixed
  65 + */
  66 + public function actionCreate()
  67 + {
  68 + $model = new Slider();
  69 +
  70 + if ($model->load(Yii::$app->request->post()) && $model->save()) {
  71 + return $this->redirect(['view', 'id' => $model->slider_id]);
  72 + } else {
  73 +
  74 +
  75 + return $this->render('create', [
  76 + 'model' => $model,
  77 + ]);
  78 + }
  79 + }
  80 +
  81 + /**
  82 + * Updates an existing Slider model.
  83 + * If update is successful, the browser will be redirected to the 'view' page.
  84 + * @param integer $id
  85 + * @return mixed
  86 + */
  87 + public function actionUpdate($id)
  88 + {
  89 + $model = $this->findModel($id);
  90 +
  91 + if ($model->load(Yii::$app->request->post()) && $model->save()) {
  92 + return $this->redirect(['view', 'id' => $model->slider_id]);
  93 + } else {
  94 + return $this->render('update', [
  95 + 'model' => $model,
  96 + ]);
  97 + }
  98 + }
  99 +
  100 + /**
  101 + * Deletes an existing Slider model.
  102 + * If deletion is successful, the browser will be redirected to the 'index' page.
  103 + * @param integer $id
  104 + * @return mixed
  105 + */
  106 + public function actionDelete($id)
  107 + {
  108 + $this->findModel($id)->delete();
  109 +
  110 + return $this->redirect(['index']);
  111 + }
  112 +
  113 + /**
  114 + * Finds the Slider model based on its primary key value.
  115 + * If the model is not found, a 404 HTTP exception will be thrown.
  116 + * @param integer $id
  117 + * @return Slider the loaded model
  118 + * @throws NotFoundHttpException if the model cannot be found
  119 + */
  120 + protected function findModel($id)
  121 + {
  122 + if (($model = Slider::findOne($id)) !== null) {
  123 + return $model;
  124 + } else {
  125 + throw new NotFoundHttpException('The requested page does not exist.');
  126 + }
  127 + }
  128 +}
... ...
backend/controllers/SliderImageController.php 0 → 100755
  1 +<?php
  2 +
  3 +namespace backend\controllers;
  4 +
  5 +use common\models\Slider;
  6 +use Yii;
  7 +use common\models\SliderImage;
  8 +use common\models\SliderImageSearch;
  9 +use yii\web\Controller;
  10 +use yii\web\NotFoundHttpException;
  11 +use yii\filters\VerbFilter;
  12 +
  13 +/**
  14 + * SliderImageController implements the CRUD actions for SliderImage model.
  15 + */
  16 +class SliderImageController extends Controller
  17 +{
  18 + /**
  19 + * @inheritdoc
  20 + */
  21 + public function behaviors()
  22 + {
  23 + return [
  24 + 'verbs' => [
  25 + 'class' => VerbFilter::className(),
  26 + 'actions' => [
  27 + 'delete' => ['POST'],
  28 + ],
  29 + ],
  30 + ];
  31 + }
  32 +
  33 + /**
  34 + * Lists all SliderImage models.
  35 + * @param $slider_id Slider id
  36 + * @return mixed
  37 + */
  38 + public function actionIndex($slider_id)
  39 + {
  40 + $searchModel = new SliderImageSearch();
  41 + $dataProvider = $searchModel->search($slider_id, Yii::$app->request->queryParams);
  42 +
  43 + return $this->render('index', [
  44 + 'slider_id' => $slider_id,
  45 + 'searchModel' => $searchModel,
  46 + 'dataProvider' => $dataProvider,
  47 + ]);
  48 + }
  49 +
  50 + /**
  51 + * Displays a single SliderImage model.
  52 + * @param integer $id
  53 + * @param $slider_id Slider id
  54 + * @return mixed
  55 + */
  56 + public function actionView($slider_id, $id)
  57 + {
  58 + return $this->render('view', [
  59 + 'slider_id' => $slider_id,
  60 + 'model' => $this->findModel($slider_id, $id),
  61 + ]);
  62 + }
  63 +
  64 + /**
  65 + * Creates a new SliderImage model.
  66 + * If creation is successful, the browser will be redirected to the 'view' page.
  67 + * @param $slider_id Slider id
  68 + * @return mixed
  69 + */
  70 + public function actionCreate($slider_id)
  71 + {
  72 + $model = new SliderImage();
  73 +
  74 + if ($model->load(Yii::$app->request->post())) {
  75 + $model->slider_id = $slider_id;
  76 + $model->save();
  77 + return $this->redirect(['view', 'slider_id'=>$slider_id, 'id' => $model->slider_image_id]);
  78 + } else {
  79 +
  80 + $slider = Slider::findOne($slider_id);
  81 +
  82 + return $this->render('create', [
  83 + 'slider_id' => $slider_id,
  84 + 'model' => $model,
  85 + 'slider' => $slider,
  86 + ]);
  87 + }
  88 + }
  89 +
  90 + /**
  91 + * Updates an existing SliderImage model.
  92 + * If update is successful, the browser will be redirected to the 'view' page.
  93 + * @param $slider_id Slider id
  94 + * @param integer $id
  95 + * @return mixed
  96 + */
  97 + public function actionUpdate($slider_id, $id)
  98 + {
  99 + $model = $this->findModel($slider_id, $id);
  100 +
  101 + if ($model->load(Yii::$app->request->post()) && $model->save()) {
  102 + return $this->redirect(['view', 'slider_id'=>$slider_id, 'id' => $model->slider_image_id]);
  103 + } else {
  104 +
  105 + $slider = Slider::findOne($slider_id);
  106 + return $this->render('update', [
  107 + 'model' => $model,
  108 + 'slider_id' => $slider_id,
  109 + 'slider' => $slider,
  110 + ]);
  111 + }
  112 + }
  113 +
  114 + /**
  115 + * Deletes an existing SliderImage model.
  116 + * If deletion is successful, the browser will be redirected to the 'index' page.
  117 + * @param $slider_id Slider id
  118 + * @param integer $id
  119 + * @return mixed
  120 + */
  121 + public function actionDelete($slider_id, $id)
  122 + {
  123 + $this->findModel($slider_id, $id)->delete();
  124 +
  125 + return $this->redirect(['index','slider_id'=>$slider_id]);
  126 + }
  127 +
  128 + /**
  129 + * Finds the SliderImage model based on its primary key value.
  130 + * If the model is not found, a 404 HTTP exception will be thrown.
  131 + * @param $slider_id Slider id
  132 + * @param integer $id
  133 + * @return SliderImage the loaded model
  134 + * @throws NotFoundHttpException if the model cannot be found
  135 + */
  136 + protected function findModel($slider_id,$id)
  137 + {
  138 + if (($model = SliderImage::find()->where(['slider_image_id'=> $id, 'slider_id'=>$slider_id])->one()) !== null) {
  139 + return $model;
  140 + } else {
  141 + throw new NotFoundHttpException('The requested page does not exist.');
  142 + }
  143 + }
  144 +}
... ...
backend/models/.gitkeep 100644 → 100755
backend/runtime/.gitignore 100644 → 100755
backend/views/banner/_form.php 0 → 100755
  1 +<?php
  2 +
  3 +use common\modules\file\widgets\ImageUploader;
  4 +use kartik\select2\Select2;
  5 +use yii\helpers\Html;
  6 +use yii\widgets\ActiveForm;
  7 +
  8 +/* @var $this yii\web\View */
  9 +/* @var $model common\models\Banner */
  10 +/* @var $form yii\widgets\ActiveForm */
  11 +?>
  12 +
  13 +<div class="banner-form">
  14 +
  15 + <?php $form = ActiveForm::begin(); ?>
  16 +
  17 +
  18 + <?= $form->field($model, 'alt')->textInput(['maxlength' => true]) ?>
  19 +
  20 + <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
  21 +
  22 + <?= $form->field($model, 'url')->textInput(['maxlength' => true]) ?>
  23 +
  24 + <?= $form->field($model, 'status')->widget(Select2::className(),([
  25 + 'name' => 'status',
  26 + 'hideSearch' => true,
  27 + 'data' => [1 => 'Active', 2 => 'Inactive'],
  28 + 'options' => ['placeholder' => 'Select status...'],
  29 + 'pluginOptions' => [
  30 + 'allowClear' => true
  31 + ]
  32 + ])) ?>
  33 +
  34 + <?= $form->field($model, 'width')->textInput(['maxlength' => true]) ?>
  35 +
  36 + <?= $form->field($model, 'height')->textInput(['maxlength' => true]) ?>
  37 +
  38 + <p id="save_image_widget_settings" class = "btn btn-primary" >Применить настройки</p>
  39 +
  40 + <div id="image_widget_block">
  41 + <?php if(!empty($model->image)){
  42 + echo ImageUploader::widget([
  43 + 'model'=> $model,
  44 + 'field'=>'image',
  45 + 'size' => [
  46 + [
  47 + 'width'=>$model->width,
  48 + 'height'=>$model->height,
  49 + ],
  50 + ],
  51 + 'gallery' =>$model->image,
  52 + 'name' => "Загрузить баннер"
  53 + ]);
  54 + }?>
  55 + </div>
  56 +
  57 + <div class="form-group">
  58 + <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
  59 + </div>
  60 +
  61 + <?php ActiveForm::end(); ?>
  62 +
  63 +</div>
  64 +<script>
  65 + $('#save_image_widget_settings').click(function(){
  66 + var width = $('#banner-width').val();
  67 + var height = $('#banner-height').val();
  68 + save_image_widget_settings( width, height, function(data){
  69 + $('#image_widget_block').html = '';
  70 + $('#image_widget_block').html(data.html);
  71 + });
  72 + });
  73 + function save_image_widget_settings( width, height, callback )
  74 + {
  75 + $.ajax({
  76 + url: '/admin/banner/save-image-settings',
  77 + data :
  78 + {
  79 + 'width' : width,
  80 + 'height' : height
  81 + },
  82 + type : 'POST',
  83 + dataType: 'json',
  84 + success: function (data)
  85 + {
  86 + if(callback)
  87 + callback(data);
  88 + },
  89 + error: function()
  90 + {
  91 + console.info('error');
  92 + }
  93 + });
  94 + }
  95 +</script>
... ...
backend/views/banner/_search.php 0 → 100755
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\widgets\ActiveForm;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model common\models\BannerSearch */
  8 +/* @var $form yii\widgets\ActiveForm */
  9 +?>
  10 +
  11 +<div class="banner-search">
  12 +
  13 + <?php $form = ActiveForm::begin([
  14 + 'action' => ['index'],
  15 + 'method' => 'get',
  16 + ]); ?>
  17 +
  18 + <?= $form->field($model, 'banner_id') ?>
  19 +
  20 +
  21 + <?= $form->field($model, 'image') ?>
  22 +
  23 + <?= $form->field($model, 'alt') ?>
  24 +
  25 + <?= $form->field($model, 'title') ?>
  26 +
  27 + <?php // echo $form->field($model, 'url') ?>
  28 +
  29 + <?php // echo $form->field($model, 'status') ?>
  30 +
  31 + <div class="form-group">
  32 + <?= Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']) ?>
  33 + <?= Html::resetButton(Yii::t('app', 'Reset'), ['class' => 'btn btn-default']) ?>
  34 + </div>
  35 +
  36 + <?php ActiveForm::end(); ?>
  37 +
  38 +</div>
... ...
backend/views/banner/create.php 0 → 100755
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model common\models\Banner */
  8 +
  9 +$this->title = Yii::t('app', 'Create Banner');
  10 +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Banners'), 'url' => ['index']];
  11 +$this->params['breadcrumbs'][] = $this->title;
  12 +?>
  13 +<div class="banner-create">
  14 +
  15 + <h1><?= Html::encode($this->title) ?></h1>
  16 +
  17 + <?= $this->render('_form', [
  18 + 'model' => $model,
  19 + ]) ?>
  20 +
  21 +</div>
... ...
backend/views/banner/index.php 0 → 100755
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\grid\GridView;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $searchModel common\models\BannerSearch */
  8 +/* @var $dataProvider yii\data\ActiveDataProvider */
  9 +
  10 +$this->title = Yii::t('app', 'Banners');
  11 +$this->params['breadcrumbs'][] = $this->title;
  12 +?>
  13 +<div class="banner-index">
  14 +
  15 + <h1><?= Html::encode($this->title) ?></h1>
  16 + <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
  17 +
  18 + <p>
  19 + <?= Html::a(Yii::t('app', 'Create Banner'), ['create'], ['class' => 'btn btn-success']) ?>
  20 + </p>
  21 + <?= GridView::widget([
  22 + 'dataProvider' => $dataProvider,
  23 + 'filterModel' => $searchModel,
  24 + 'columns' => [
  25 + ['class' => 'yii\grid\SerialColumn'],
  26 +
  27 + 'banner_id',
  28 + 'image',
  29 + 'alt',
  30 + 'title',
  31 + // 'url:url',
  32 + // 'status',
  33 +
  34 + ['class' => 'yii\grid\ActionColumn'],
  35 + ],
  36 + ]); ?>
  37 +</div>
... ...
backend/views/banner/update.php 0 → 100755
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +
  5 +/* @var $this yii\web\View */
  6 +/* @var $model common\models\Banner */
  7 +
  8 +$this->title = Yii::t('app', 'Update {modelClass}: ', [
  9 + 'modelClass' => 'Banner',
  10 +]) . $model->title;
  11 +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Banners'), 'url' => ['index']];
  12 +$this->params['breadcrumbs'][] = ['label' => $model->title, 'url' => ['view', 'id' => $model->banner_id]];
  13 +$this->params['breadcrumbs'][] = Yii::t('app', 'Update');
  14 +?>
  15 +<div class="banner-update">
  16 +
  17 + <h1><?= Html::encode($this->title) ?></h1>
  18 +
  19 + <?= $this->render('_form', [
  20 + 'model' => $model,
  21 + ]) ?>
  22 +
  23 +</div>
... ...
backend/views/banner/view.php 0 → 100755
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\widgets\DetailView;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model common\models\Banner */
  8 +
  9 +$this->title = $model->title;
  10 +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Banners'), 'url' => ['index']];
  11 +$this->params['breadcrumbs'][] = $this->title;
  12 +?>
  13 +<div class="banner-view">
  14 +
  15 + <h1><?= Html::encode($this->title) ?></h1>
  16 +
  17 + <p>
  18 + <?= Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->banner_id], ['class' => 'btn btn-primary']) ?>
  19 + <?= Html::a(Yii::t('app', 'Delete'), ['delete', 'id' => $model->banner_id], [
  20 + 'class' => 'btn btn-danger',
  21 + 'data' => [
  22 + 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'),
  23 + 'method' => 'post',
  24 + ],
  25 + ]) ?>
  26 + </p>
  27 +
  28 + <?= DetailView::widget([
  29 + 'model' => $model,
  30 + 'attributes' => [
  31 + 'banner_id',
  32 + 'image',
  33 + 'alt',
  34 + 'title',
  35 + 'url:url',
  36 + 'status',
  37 + ],
  38 + ]) ?>
  39 +
  40 +</div>
... ...
backend/views/blog/_form.php 100644 → 100755
backend/views/blog/_search.php 100644 → 100755
backend/views/blog/create.php 100644 → 100755
backend/views/blog/index.php 100644 → 100755
backend/views/blog/update.php 100644 → 100755
backend/views/blog/view.php 100644 → 100755
backend/views/brand/_form.php 100644 → 100755
backend/views/brand/_search.php 100644 → 100755
backend/views/brand/create.php 100644 → 100755
backend/views/brand/index.php 100644 → 100755
backend/views/brand/update.php 100644 → 100755
backend/views/brand/view.php 100644 → 100755
backend/views/category/_form.php 100644 → 100755
backend/views/category/_search.php 100644 → 100755
backend/views/category/create.php 100644 → 100755
backend/views/category/index.php 100644 → 100755
backend/views/category/update.php 100644 → 100755
backend/views/category/view.php 100644 → 100755
backend/views/event/_form.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\jui\DatePicker;
  4 +use yii\helpers\Html;
  5 +use yii\widgets\ActiveForm;
  6 +use mihaildev\ckeditor\CKEditor;
  7 +use mihaildev\elfinder\ElFinder;
  8 +/* @var $this yii\web\View */
  9 +/* @var $model common\models\Event */
  10 +/* @var $form yii\widgets\ActiveForm */
  11 +?>
  12 +
  13 +<div class="event-form">
  14 +
  15 + <?php $form = ActiveForm::begin(); ?>
  16 +
  17 + <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
  18 +
  19 + <?= $form->field($model, 'alias')->textInput(['maxlength' => true]) ?>
  20 +
  21 + <?= $form->field($model, 'body')->widget(CKEditor::className(),
  22 + [
  23 + 'editorOptions' => ElFinder::ckeditorOptions('elfinder',[
  24 + 'preset' => 'full', //разработанны стандартные настройки basic, standard, full данную возможность не обязательно использовать
  25 + 'inline' => false, //по умолчанию false]),
  26 + 'filebrowserUploadUrl'=>Yii::$app->getUrlManager()->createUrl('file/uploader/images-upload')
  27 + ]
  28 + )
  29 + ]) ?>
  30 +
  31 +
  32 + <?= $form->field($model, 'end_at')
  33 + ->widget(DatePicker::className(), [
  34 + 'dateFormat' => 'yyyy-MM-dd',
  35 + 'clientOptions' => [ 'minDate' => 1 ],
  36 + ]) ?>
  37 +
  38 +
  39 + <?= \common\modules\file\widgets\ImageUploader::widget([
  40 + 'model'=> $model,
  41 + 'field'=>'image',
  42 + 'size' => [
  43 + [
  44 + 'width'=>200,
  45 + 'height'=>200,
  46 + ],
  47 + [
  48 + 'width'=>940,
  49 + 'height'=>480,
  50 + ]
  51 + ],
  52 + 'multi'=>false,
  53 + 'gallery' => $model->image,
  54 + 'name' => 'Загрузить изображение'
  55 + ]);
  56 + ?>
  57 +
  58 + <?= $form->field($model, 'meta_title')->textInput(['maxlength' => true]) ?>
  59 +
  60 + <?= $form->field($model, 'description')->textInput(['maxlength' => true]) ?>
  61 +
  62 + <?= $form->field($model, 'h1')->textInput(['maxlength' => true]) ?>
  63 +
  64 + <?= $form->field($model, 'seo_text')->textarea(['rows' => 6]) ?>
  65 +
  66 +
  67 +
  68 + <div class="form-group">
  69 + <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
  70 + </div>
  71 +
  72 + <?php ActiveForm::end(); ?>
  73 +
  74 +</div>
... ...
backend/views/event/_search.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\widgets\ActiveForm;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model common\models\EventSearch */
  8 +/* @var $form yii\widgets\ActiveForm */
  9 +?>
  10 +
  11 +<div class="event-search">
  12 +
  13 + <?php $form = ActiveForm::begin([
  14 + 'action' => ['index'],
  15 + 'method' => 'get',
  16 + ]); ?>
  17 +
  18 + <?= $form->field($model, 'event_id') ?>
  19 +
  20 + <?= $form->field($model, 'name') ?>
  21 +
  22 + <?= $form->field($model, 'alias') ?>
  23 +
  24 + <?= $form->field($model, 'body') ?>
  25 +
  26 + <?= $form->field($model, 'image') ?>
  27 +
  28 + <?php // echo $form->field($model, 'meta_title') ?>
  29 +
  30 + <?php // echo $form->field($model, 'description') ?>
  31 +
  32 + <?php // echo $form->field($model, 'h1') ?>
  33 +
  34 + <?php // echo $form->field($model, 'seo_text') ?>
  35 +
  36 + <?php // echo $form->field($model, 'created_at') ?>
  37 +
  38 + <?php // echo $form->field($model, 'updated_at') ?>
  39 +
  40 + <?php // echo $form->field($model, 'end_at') ?>
  41 +
  42 + <div class="form-group">
  43 + <?= Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']) ?>
  44 + <?= Html::resetButton(Yii::t('app', 'Reset'), ['class' => 'btn btn-default']) ?>
  45 + </div>
  46 +
  47 + <?php ActiveForm::end(); ?>
  48 +
  49 +</div>
... ...
backend/views/event/create.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model common\models\Event */
  8 +
  9 +$this->title = Yii::t('app', 'Create Event');
  10 +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Events'), 'url' => ['index']];
  11 +$this->params['breadcrumbs'][] = $this->title;
  12 +?>
  13 +<div class="event-create">
  14 +
  15 + <h1><?= Html::encode($this->title) ?></h1>
  16 +
  17 + <?= $this->render('_form', [
  18 + 'model' => $model,
  19 + ]) ?>
  20 +
  21 +</div>
... ...
backend/views/event/index.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\grid\GridView;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $searchModel common\models\EventSearch */
  8 +/* @var $dataProvider yii\data\ActiveDataProvider */
  9 +
  10 +$this->title = Yii::t('app', 'Events');
  11 +$this->params['breadcrumbs'][] = $this->title;
  12 +?>
  13 +<div class="event-index">
  14 +
  15 + <h1><?= Html::encode($this->title) ?></h1>
  16 + <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
  17 +
  18 + <p>
  19 + <?= Html::a(Yii::t('app', 'Create Event'), ['create'], ['class' => 'btn btn-success']) ?>
  20 + </p>
  21 + <?= GridView::widget([
  22 + 'dataProvider' => $dataProvider,
  23 + 'filterModel' => $searchModel,
  24 + 'columns' => [
  25 + ['class' => 'yii\grid\SerialColumn'],
  26 +
  27 + 'event_id',
  28 + 'name',
  29 + 'alias',
  30 + [
  31 + 'format' => 'image',
  32 + 'attribute'=>'image',
  33 + ],
  34 + // 'meta_title',
  35 + // 'description',
  36 + // 'h1',
  37 + // 'seo_text:ntext',
  38 + // 'created_at',
  39 + // 'updated_at',
  40 + // 'end_at',
  41 +
  42 + ['class' => 'yii\grid\ActionColumn'],
  43 + ],
  44 + ]); ?>
  45 +</div>
... ...
backend/views/event/update.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +
  5 +/* @var $this yii\web\View */
  6 +/* @var $model common\models\Event */
  7 +
  8 +$this->title = Yii::t('app', 'Update {modelClass}: ', [
  9 + 'modelClass' => 'Event',
  10 +]) . $model->name;
  11 +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Events'), 'url' => ['index']];
  12 +$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->event_id]];
  13 +$this->params['breadcrumbs'][] = Yii::t('app', 'Update');
  14 +?>
  15 +<div class="event-update">
  16 +
  17 + <h1><?= Html::encode($this->title) ?></h1>
  18 +
  19 + <?= $this->render('_form', [
  20 + 'model' => $model,
  21 + ]) ?>
  22 +
  23 +</div>
... ...
backend/views/event/view.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\widgets\DetailView;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model common\models\Event */
  8 +
  9 +$this->title = $model->name;
  10 +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Events'), 'url' => ['index']];
  11 +$this->params['breadcrumbs'][] = $this->title;
  12 +?>
  13 +<div class="event-view">
  14 +
  15 + <h1><?= Html::encode($this->title) ?></h1>
  16 +
  17 + <p>
  18 + <?= Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->event_id], ['class' => 'btn btn-primary']) ?>
  19 + <?= Html::a(Yii::t('app', 'Delete'), ['delete', 'id' => $model->event_id], [
  20 + 'class' => 'btn btn-danger',
  21 + 'data' => [
  22 + 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'),
  23 + 'method' => 'post',
  24 + ],
  25 + ]) ?>
  26 + </p>
  27 +
  28 + <?= DetailView::widget([
  29 + 'model' => $model,
  30 + 'attributes' => [
  31 + 'event_id',
  32 + 'name',
  33 + 'alias',
  34 + 'body:ntext',
  35 + [
  36 + 'format' => 'image',
  37 + 'attribute'=>'image',
  38 + ],
  39 + 'meta_title',
  40 + 'description',
  41 + 'h1',
  42 + 'seo_text:ntext',
  43 + 'created_at',
  44 + 'updated_at',
  45 + 'end_at',
  46 + ],
  47 + ]) ?>
  48 +
  49 +</div>
... ...
backend/views/layouts/admin.php 100644 → 100755
backend/views/layouts/control-sidebar.php 100644 → 100755
backend/views/layouts/footer.php 100644 → 100755
backend/views/layouts/header.php 100644 → 100755
backend/views/layouts/main-sidebar.php 100644 → 100755
... ... @@ -35,6 +35,14 @@ use yii\widgets\Menu;
35 35 ]
36 36 ],
37 37 [
  38 + 'label' => 'Слайдер/Банеры',
  39 + 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-barcode"></i> <span>{label}</span></a>',
  40 + 'items' => [
  41 + ['label' => 'Слайдер', 'url' => ['/slider/index']],
  42 + ['label' => 'Банер', 'url' => ['/banner/index']],
  43 + ]
  44 + ],
  45 + [
38 46 'label' => 'Характеристики',
39 47 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-search"></i> <span>{label}</span></a>',
40 48 'url' => ['/rubrication/tax-group'],
... ... @@ -43,6 +51,17 @@ use yii\widgets\Menu;
43 51 ['label' => 'Зависимости', 'url' => ['/relation/manage']]
44 52 ]
45 53 ],
  54 + ['label' => 'Статические страницы', 'url' => ['/page/index']],
  55 + ['label' => 'Акции', 'url' => ['/event/index']],
  56 + ['label' => 'Услуги', 'url' => ['/service/index']],
  57 + [
  58 + 'label' => 'SEO',
  59 + 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-search"></i> <span>{label}</span></a>',
  60 + 'items' => [
  61 + ['label' => 'URL', 'url' => ['/seo/index']],
  62 + ['label' => 'Шаблоны', 'url' => ['/seo-category/index']]
  63 + ]
  64 + ],
46 65 // ['label' => 'Rubrication', 'url' => ['/rubrication/tax-group']],
47 66 // ['label' => 'Relation', 'url' => ['/relation/manage']],
48 67 ],
... ...
backend/views/layouts/main.php 100644 → 100755
backend/views/layouts/none.php 100644 → 100755
backend/views/orders/_form.php 100644 → 100755
backend/views/orders/_search.php 100644 → 100755
backend/views/orders/create.php 100644 → 100755
backend/views/orders/index.php 100644 → 100755
backend/views/orders/update.php 100644 → 100755
backend/views/orders/view.php 100644 → 100755
backend/views/page/_form.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\widgets\ActiveForm;
  5 +use mihaildev\ckeditor\CKEditor;
  6 +use mihaildev\elfinder\ElFinder;
  7 +/* @var $this yii\web\View */
  8 +/* @var $model backend\models\Page */
  9 +/* @var $form yii\widgets\ActiveForm */
  10 +?>
  11 +
  12 +<div class="page-form">
  13 +
  14 + <?php $form = ActiveForm::begin(); ?>
  15 +
  16 + <?= $form->field($model, 'name')->textInput(['maxlength' => 255]) ?>
  17 +
  18 + <?= $form->field($model, 'alias')->textInput(['maxlength' => 250]) ?>
  19 +
  20 + <?= $form->field($model, 'title')->textInput(['maxlength' => 250]) ?>
  21 +
  22 + <?= $form->field($model, 'body')->widget(CKEditor::className(),
  23 + [
  24 + 'editorOptions' => ElFinder::ckeditorOptions('elfinder',[
  25 + 'preset' => 'full', //разработанны стандартные настройки basic, standard, full данную возможность не обязательно использовать
  26 + 'inline' => false, //по умолчанию false]),
  27 + 'allowedContent' => true,
  28 + 'filebrowserUploadUrl'=>Yii::$app->getUrlManager()->createUrl('file/uploader/images-upload')
  29 + ]
  30 + )
  31 + ]) ?>
  32 +
  33 + <?= $form->field($model, 'meta_title')->textInput(['maxlength' => 250]) ?>
  34 +
  35 + <?= $form->field($model, 'description')->textInput(['maxlength' => 250]) ?>
  36 +
  37 + <?= $form->field($model, 'h1')->textInput(['maxlength' => 255]) ?>
  38 +
  39 + <?= $form->field($model, 'seo_text')->textarea(['rows' => 6]) ?>
  40 +
  41 + <div class="form-group">
  42 + <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
  43 + </div>
  44 +
  45 + <?php ActiveForm::end(); ?>
  46 +
  47 +</div>
... ...
backend/views/page/_search.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\widgets\ActiveForm;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model backend\models\PageSearch */
  8 +/* @var $form yii\widgets\ActiveForm */
  9 +?>
  10 +
  11 +<div class="page-search">
  12 +
  13 + <?php $form = ActiveForm::begin([
  14 + 'action' => ['index'],
  15 + 'method' => 'get',
  16 + ]); ?>
  17 +
  18 + <?= $form->field($model, 'id') ?>
  19 +
  20 + <?= $form->field($model, 'name') ?>
  21 +
  22 + <?= $form->field($model, 'alias') ?>
  23 +
  24 + <?= $form->field($model, 'title') ?>
  25 +
  26 + <?= $form->field($model, 'body') ?>
  27 +
  28 + <?php // echo $form->field($model, 'meta_title') ?>
  29 +
  30 + <?php // echo $form->field($model, 'description') ?>
  31 +
  32 + <?php // echo $form->field($model, 'h1') ?>
  33 +
  34 + <?php // echo $form->field($model, 'seo_text') ?>
  35 +
  36 + <div class="form-group">
  37 + <?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
  38 + <?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
  39 + </div>
  40 +
  41 + <?php ActiveForm::end(); ?>
  42 +
  43 +</div>
... ...
backend/views/page/create.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model backend\models\Page */
  8 +
  9 +$this->title = 'Create Page';
  10 +$this->params['breadcrumbs'][] = ['label' => 'Pages', 'url' => ['index']];
  11 +$this->params['breadcrumbs'][] = $this->title;
  12 +?>
  13 +<div class="page-create">
  14 +
  15 + <h1><?= Html::encode($this->title) ?></h1>
  16 +
  17 + <?= $this->render('_form', [
  18 + 'model' => $model,
  19 + ]) ?>
  20 +
  21 +</div>
... ...
backend/views/page/index.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\grid\GridView;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $searchModel backend\models\PageSearch */
  8 +/* @var $dataProvider yii\data\ActiveDataProvider */
  9 +
  10 +$this->title = 'Статические страницы';
  11 +$this->params['breadcrumbs'][] = $this->title;
  12 +?>
  13 +<div class="page-index">
  14 +
  15 + <h1><?= Html::encode($this->title) ?></h1>
  16 + <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
  17 +
  18 + <p>
  19 + <?= Html::a('Создать', ['create'], ['class' => 'btn btn-success']) ?>
  20 + </p>
  21 +
  22 + <?= GridView::widget([
  23 + 'dataProvider' => $dataProvider,
  24 + 'filterModel' => $searchModel,
  25 + 'columns' => [
  26 + ['class' => 'yii\grid\SerialColumn'],
  27 +
  28 + 'id',
  29 + 'name',
  30 + 'alias',
  31 + 'title',
  32 + // 'meta_title',
  33 + // 'description',
  34 + // 'h1',
  35 + // 'seo_text:ntext',
  36 +
  37 + ['class' => 'yii\grid\ActionColumn'],
  38 + ],
  39 + ]); ?>
  40 +
  41 +</div>
... ...
backend/views/page/update.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +
  5 +/* @var $this yii\web\View */
  6 +/* @var $model backend\models\Page */
  7 +
  8 +$this->title = 'Update Page: ' . ' ' . $model->name;
  9 +$this->params['breadcrumbs'][] = ['label' => 'Pages', 'url' => ['index']];
  10 +$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]];
  11 +$this->params['breadcrumbs'][] = 'Обновление';
  12 +?>
  13 +<div class="page-update">
  14 +
  15 + <h1><?= Html::encode($this->title) ?></h1>
  16 +
  17 + <?= $this->render('_form', [
  18 + 'model' => $model,
  19 + ]) ?>
  20 +
  21 +</div>
... ...
backend/views/page/view.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\widgets\DetailView;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model backend\models\Page */
  8 +
  9 +$this->title = $model->name;
  10 +$this->params['breadcrumbs'][] = ['label' => 'Pages', 'url' => ['index']];
  11 +$this->params['breadcrumbs'][] = $this->title;
  12 +?>
  13 +<div class="page-view">
  14 +
  15 + <h1><?= Html::encode($this->title) ?></h1>
  16 +
  17 + <p>
  18 + <?= Html::a('Обновить', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
  19 + <?=Html::a('Удалить', ['delete', 'id' => $model->id], [
  20 + 'class' => 'btn btn-danger',
  21 + 'data' => [
  22 + 'confirm' => 'Вы уверены что хотите удалить этот элемент?',
  23 + 'method' => 'post',
  24 + ],
  25 + ]) ?>
  26 + </p>
  27 +
  28 + <?= DetailView::widget([
  29 + 'model' => $model,
  30 + 'attributes' => [
  31 + 'id',
  32 + 'name',
  33 + 'alias',
  34 + 'title',
  35 + 'meta_title',
  36 + 'description',
  37 + 'h1',
  38 + 'seo_text:ntext',
  39 + ],
  40 + ]) ?>
  41 +
  42 +</div>
... ...
backend/views/seo-category/_form.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\widgets\ActiveForm;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model common\models\SeoCategory */
  8 +/* @var $form yii\widgets\ActiveForm */
  9 +?>
  10 +
  11 +<div class="seo-category-form">
  12 +
  13 + <?php $form = ActiveForm::begin(); ?>
  14 +
  15 + <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
  16 +
  17 + <?= $form->field($model, 'controller')->textInput(['maxlength' => true]) ?>
  18 +
  19 + <?= $form->field($model, 'status')->textInput() ?>
  20 +
  21 + <div class="form-group">
  22 + <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
  23 + </div>
  24 +
  25 + <?php ActiveForm::end(); ?>
  26 +
  27 +</div>
... ...
backend/views/seo-category/_search.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\widgets\ActiveForm;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model common\models\SeoCategorySearch */
  8 +/* @var $form yii\widgets\ActiveForm */
  9 +?>
  10 +
  11 +<div class="seo-category-search">
  12 +
  13 + <?php $form = ActiveForm::begin([
  14 + 'action' => ['index'],
  15 + 'method' => 'get',
  16 + ]); ?>
  17 +
  18 + <?= $form->field($model, 'seo_category_id') ?>
  19 +
  20 + <?= $form->field($model, 'name') ?>
  21 +
  22 + <?= $form->field($model, 'controller') ?>
  23 +
  24 + <?= $form->field($model, 'status') ?>
  25 +
  26 + <div class="form-group">
  27 + <?= Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']) ?>
  28 + <?= Html::resetButton(Yii::t('app', 'Reset'), ['class' => 'btn btn-default']) ?>
  29 + </div>
  30 +
  31 + <?php ActiveForm::end(); ?>
  32 +
  33 +</div>
... ...
backend/views/seo-category/create.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model common\models\SeoCategory */
  8 +
  9 +$this->title = Yii::t('app', 'Create Seo Category');
  10 +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seo Categories'), 'url' => ['index']];
  11 +$this->params['breadcrumbs'][] = $this->title;
  12 +?>
  13 +<div class="seo-category-create">
  14 +
  15 + <h1><?= Html::encode($this->title) ?></h1>
  16 +
  17 + <?= $this->render('_form', [
  18 + 'model' => $model,
  19 + ]) ?>
  20 +
  21 +</div>
... ...
backend/views/seo-category/index.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\grid\GridView;
  5 +use yii\helpers\Url;
  6 +
  7 +/* @var $this yii\web\View */
  8 +/* @var $searchModel common\models\SeoCategorySearch */
  9 +/* @var $dataProvider yii\data\ActiveDataProvider */
  10 +
  11 +$this->title = Yii::t('app', 'Seo Categories');
  12 +$this->params['breadcrumbs'][] = $this->title;
  13 +?>
  14 +<div class="seo-category-index">
  15 +
  16 + <h1><?= Html::encode($this->title) ?></h1>
  17 + <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
  18 +
  19 + <p>
  20 + <?= Html::a(Yii::t('app', 'Create Seo Category'), ['create'], ['class' => 'btn btn-success']) ?>
  21 + </p>
  22 + <?= GridView::widget([
  23 + 'dataProvider' => $dataProvider,
  24 + 'filterModel' => $searchModel,
  25 + 'columns' => [
  26 + ['class' => 'yii\grid\SerialColumn'],
  27 +
  28 + 'seo_category_id',
  29 + 'name',
  30 + 'controller',
  31 + 'status',
  32 +
  33 + [
  34 + 'class' => 'yii\grid\ActionColumn',
  35 + 'template' => '{update}&nbsp;{image}&nbsp;{delete}',
  36 + 'buttons' => [
  37 + 'update' => function ($url, $model)
  38 + {
  39 + return Html::a (
  40 + '<span class="glyphicon glyphicon-pencil"></span>',
  41 + Url::toRoute(['seo-category/update', 'id' => $model->seo_category_id]),
  42 + [
  43 + 'title' => "Редактировать",
  44 + ]
  45 + );
  46 + },
  47 + 'image' => function ($url, $model)
  48 + {
  49 + return Html::a (
  50 + '<span class="glyphicon glyphicon-picture"></span>',
  51 + Url::toRoute(['seo-dynamic/index', 'seo_category_id' => $model->seo_category_id]),
  52 + [
  53 + 'title' => "слайды",
  54 + ]
  55 + );
  56 + },
  57 + 'delete' => function ($url, $model)
  58 + {
  59 + return Html::a (
  60 + '<span class="glyphicon glyphicon-trash"></span>',
  61 + Url::toRoute(['seo-category/delete', 'id' => $model->seo_category_id]),
  62 + [
  63 + 'title' => "Удалить",
  64 + ]
  65 + );
  66 + },
  67 + ],
  68 + 'contentOptions' => ['style' => 'width: 70px;'],
  69 + ],
  70 + ],
  71 + ]); ?>
  72 +</div>
... ...
backend/views/seo-category/update.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +
  5 +/* @var $this yii\web\View */
  6 +/* @var $model common\models\SeoCategory */
  7 +
  8 +$this->title = Yii::t('app', 'Update {modelClass}: ', [
  9 + 'modelClass' => 'Seo Category',
  10 +]) . $model->name;
  11 +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seo Categories'), 'url' => ['index']];
  12 +$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->seo_category_id]];
  13 +$this->params['breadcrumbs'][] = Yii::t('app', 'Update');
  14 +?>
  15 +<div class="seo-category-update">
  16 +
  17 + <h1><?= Html::encode($this->title) ?></h1>
  18 +
  19 + <?= $this->render('_form', [
  20 + 'model' => $model,
  21 + ]) ?>
  22 +
  23 +</div>
... ...
backend/views/seo-category/view.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\widgets\DetailView;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model common\models\SeoCategory */
  8 +
  9 +$this->title = $model->name;
  10 +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seo Categories'), 'url' => ['index']];
  11 +$this->params['breadcrumbs'][] = $this->title;
  12 +?>
  13 +<div class="seo-category-view">
  14 +
  15 + <h1><?= Html::encode($this->title) ?></h1>
  16 +
  17 + <p>
  18 + <?= Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->seo_category_id], ['class' => 'btn btn-primary']) ?>
  19 + <?= Html::a(Yii::t('app', 'Delete'), ['delete', 'id' => $model->seo_category_id], [
  20 + 'class' => 'btn btn-danger',
  21 + 'data' => [
  22 + 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'),
  23 + 'method' => 'post',
  24 + ],
  25 + ]) ?>
  26 + </p>
  27 +
  28 + <?= DetailView::widget([
  29 + 'model' => $model,
  30 + 'attributes' => [
  31 + 'seo_category_id',
  32 + 'name',
  33 + 'controller',
  34 + 'status',
  35 + ],
  36 + ]) ?>
  37 +
  38 +</div>
... ...
backend/views/seo-dynamic/_form.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\widgets\ActiveForm;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model common\models\SeoDynamic */
  8 +/* @var $form yii\widgets\ActiveForm */
  9 +?>
  10 +
  11 +<div class="seo-dynamic-form">
  12 +
  13 + <?php $form = ActiveForm::begin(); ?>
  14 +
  15 + <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
  16 +
  17 + <?= $form->field($model, 'action')->textInput(['maxlength' => true]) ?>
  18 +
  19 + <?= $form->field($model, 'fields')->textInput(['maxlength' => true]) ?>
  20 +
  21 + <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
  22 +
  23 + <?= $form->field($model, 'h1')->textInput(['maxlength' => true]) ?>
  24 +
  25 + <?= $form->field($model, 'description')->textInput(['maxlength' => true]) ?>
  26 +
  27 + <?= $form->field($model, 'seo_text')->textarea(['rows' => 6]) ?>
  28 +
  29 + <?= $form->field($model, 'status')->textInput() ?>
  30 +
  31 + <div class="form-group">
  32 + <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
  33 + </div>
  34 +
  35 + <?php ActiveForm::end(); ?>
  36 +
  37 +</div>
... ...
backend/views/seo-dynamic/_search.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\widgets\ActiveForm;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model common\models\SeoDynamicSearch */
  8 +/* @var $form yii\widgets\ActiveForm */
  9 +?>
  10 +
  11 +<div class="seo-dynamic-search">
  12 +
  13 + <?php $form = ActiveForm::begin([
  14 + 'action' => ['index'],
  15 + 'method' => 'get',
  16 + ]); ?>
  17 +
  18 + <?= $form->field($model, 'seo_dynamic_id') ?>
  19 +
  20 + <?= $form->field($model, 'seo_category_id') ?>
  21 +
  22 + <?= $form->field($model, 'name') ?>
  23 +
  24 + <?= $form->field($model, 'action') ?>
  25 +
  26 + <?= $form->field($model, 'fields') ?>
  27 +
  28 + <?php // echo $form->field($model, 'title') ?>
  29 +
  30 + <?php // echo $form->field($model, 'h1') ?>
  31 +
  32 + <?php // echo $form->field($model, 'description') ?>
  33 +
  34 + <?php // echo $form->field($model, 'seo_text') ?>
  35 +
  36 + <?php // echo $form->field($model, 'status') ?>
  37 +
  38 + <div class="form-group">
  39 + <?= Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']) ?>
  40 + <?= Html::resetButton(Yii::t('app', 'Reset'), ['class' => 'btn btn-default']) ?>
  41 + </div>
  42 +
  43 + <?php ActiveForm::end(); ?>
  44 +
  45 +</div>
... ...
backend/views/seo-dynamic/create.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\helpers\Url;
  5 +
  6 +
  7 +/* @var $this yii\web\View */
  8 +/* @var $model common\models\SeoDynamic */
  9 +
  10 +$this->title = Yii::t('app', 'Create Seo Dynamic');
  11 +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seo Dynamics'), 'url' => Url::toRoute(['index','seo_category_id'=>$seo_category_id])];
  12 +$this->params['breadcrumbs'][] = $this->title;
  13 +?>
  14 +<div class="seo-dynamic-create">
  15 +
  16 + <h1><?= Html::encode($this->title) ?></h1>
  17 +
  18 + <?= $this->render('_form', [
  19 + 'model' => $model,
  20 + ]) ?>
  21 +
  22 +</div>
... ...
backend/views/seo-dynamic/index.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\grid\GridView;
  5 +use yii\helpers\Url;
  6 +
  7 +/* @var $this yii\web\View */
  8 +/* @var $searchModel common\models\SeoDynamicSearch */
  9 +/* @var $dataProvider yii\data\ActiveDataProvider */
  10 +
  11 +$this->title = Yii::t('app', 'Seo Dynamics');
  12 +$this->params['breadcrumbs'][] = $this->title;
  13 +?>
  14 +<div class="seo-dynamic-index">
  15 +
  16 + <h1><?= Html::encode($this->title) ?></h1>
  17 + <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
  18 +
  19 + <p>
  20 + <?= Html::a(Yii::t('app', 'Create Seo Dynamic'), Url::toRoute(['create','seo_category_id'=>$seo_category_id]), ['class' => 'btn btn-success']) ?>
  21 + </p>
  22 + <?= GridView::widget([
  23 + 'dataProvider' => $dataProvider,
  24 + 'filterModel' => $searchModel,
  25 + 'columns' => [
  26 + ['class' => 'yii\grid\SerialColumn'],
  27 +
  28 + 'seo_dynamic_id',
  29 + 'seo_category_id',
  30 + 'name',
  31 + 'action',
  32 + 'fields',
  33 + // 'title',
  34 + // 'h1',
  35 + // 'description',
  36 + // 'seo_text:ntext',
  37 + // 'status',
  38 +
  39 + [
  40 + 'class' => 'yii\grid\ActionColumn',
  41 + 'buttons' => [
  42 + 'view' => function ($url, $model)
  43 + {
  44 + return Html::a (
  45 + '<span class="glyphicon glyphicon-eye-open"></span>',
  46 + Url::toRoute(['view','seo_category_id'=> $model->seo_category_id, 'id' => $model->seo_dynamic_id]),
  47 + [
  48 + 'title' => "Просмотр",
  49 + ]
  50 + );
  51 + },
  52 + 'update' => function ($url, $model)
  53 + {
  54 + return Html::a (
  55 + '<span class="glyphicon glyphicon-pencil"></span>',
  56 + Url::toRoute(['update','seo_category_id'=> $model->seo_category_id, 'id' => $model->seo_dynamic_id]),
  57 + [
  58 + 'title' => "Редактировать",
  59 + ]
  60 + );
  61 + },
  62 + 'delete' => function ($url, $model)
  63 + {
  64 +
  65 + return Html::a('<span class="glyphicon glyphicon-trash"></span>', Url::toRoute(['delete','seo_category_id'=> $model->seo_category_id, 'id' => $model->seo_dynamic_id]), [
  66 + 'title' => Yii::t('yii', 'Delete'),
  67 + 'data-confirm' => Yii::t('yii', 'Are you sure to delete this item?'),
  68 + 'data-method' => 'post',
  69 + ]);
  70 +
  71 + },
  72 + ],
  73 + ],
  74 + ],
  75 + ]); ?>
  76 +</div>
... ...
backend/views/seo-dynamic/update.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\helpers\Url;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model common\models\SeoDynamic */
  8 +
  9 +$this->title = Yii::t('app', 'Update {modelClass}: ', [
  10 + 'modelClass' => 'Seo Dynamic',
  11 +]) . $model->name;
  12 +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seo Dynamics'), 'url' => Url::toRoute(['index','seo_category_id'=>$seo_category_id])];
  13 +$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => Url::toRoute(['view', 'seo_category_id'=>$seo_category_id, 'id' => $model->seo_dynamic_id])];
  14 +$this->params['breadcrumbs'][] = Yii::t('app', 'Update');
  15 +?>
  16 +<div class="seo-dynamic-update">
  17 +
  18 + <h1><?= Html::encode($this->title) ?></h1>
  19 +
  20 + <?= $this->render('_form', [
  21 + 'model' => $model,
  22 + ]) ?>
  23 +
  24 +</div>
... ...
backend/views/seo-dynamic/view.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\widgets\DetailView;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model common\models\SeoDynamic */
  8 +
  9 +$this->title = $model->name;
  10 +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seo Dynamics'), 'url' => ['index']];
  11 +$this->params['breadcrumbs'][] = $this->title;
  12 +?>
  13 +<div class="seo-dynamic-view">
  14 +
  15 + <h1><?= Html::encode($this->title) ?></h1>
  16 +
  17 + <p>
  18 + <?= Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->seo_dynamic_id], ['class' => 'btn btn-primary']) ?>
  19 + <?= Html::a(Yii::t('app', 'Delete'), ['delete', 'id' => $model->seo_dynamic_id], [
  20 + 'class' => 'btn btn-danger',
  21 + 'data' => [
  22 + 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'),
  23 + 'method' => 'post',
  24 + ],
  25 + ]) ?>
  26 + </p>
  27 +
  28 + <?= DetailView::widget([
  29 + 'model' => $model,
  30 + 'attributes' => [
  31 + 'seo_dynamic_id',
  32 + 'seo_category_id',
  33 + 'name',
  34 + 'action',
  35 + 'fields',
  36 + 'title',
  37 + 'h1',
  38 + 'description',
  39 + 'seo_text:ntext',
  40 + 'status',
  41 + ],
  42 + ]) ?>
  43 +
  44 +</div>
... ...
backend/views/seo/_form.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\widgets\ActiveForm;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model common\models\Seo */
  8 +/* @var $form yii\widgets\ActiveForm */
  9 +?>
  10 +
  11 +<div class="seo-form">
  12 +
  13 + <?php $form = ActiveForm::begin(); ?>
  14 +
  15 + <?= $form->field($model, 'url')->textInput(['maxlength' => true]) ?>
  16 +
  17 + <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
  18 +
  19 + <?= $form->field($model, 'description')->textInput(['maxlength' => true]) ?>
  20 +
  21 + <?= $form->field($model, 'h1')->textInput(['maxlength' => true]) ?>
  22 +
  23 + <?= $form->field($model, 'seo_text')->textarea(['rows' => 6]) ?>
  24 +
  25 + <div class="form-group">
  26 + <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
  27 + </div>
  28 +
  29 + <?php ActiveForm::end(); ?>
  30 +
  31 +</div>
... ...
backend/views/seo/_search.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\widgets\ActiveForm;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model common\models\SeoSearch */
  8 +/* @var $form yii\widgets\ActiveForm */
  9 +?>
  10 +
  11 +<div class="seo-search">
  12 +
  13 + <?php $form = ActiveForm::begin([
  14 + 'action' => ['index'],
  15 + 'method' => 'get',
  16 + ]); ?>
  17 +
  18 + <?= $form->field($model, 'seo_id') ?>
  19 +
  20 + <?= $form->field($model, 'url') ?>
  21 +
  22 + <?= $form->field($model, 'title') ?>
  23 +
  24 + <?= $form->field($model, 'description') ?>
  25 +
  26 + <?= $form->field($model, 'h1') ?>
  27 +
  28 + <?php // echo $form->field($model, 'seo_text') ?>
  29 +
  30 + <div class="form-group">
  31 + <?= Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']) ?>
  32 + <?= Html::resetButton(Yii::t('app', 'Reset'), ['class' => 'btn btn-default']) ?>
  33 + </div>
  34 +
  35 + <?php ActiveForm::end(); ?>
  36 +
  37 +</div>
... ...
backend/views/seo/create.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model common\models\Seo */
  8 +
  9 +$this->title = Yii::t('app', 'Create Seo');
  10 +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seos'), 'url' => ['index']];
  11 +$this->params['breadcrumbs'][] = $this->title;
  12 +?>
  13 +<div class="seo-create">
  14 +
  15 + <h1><?= Html::encode($this->title) ?></h1>
  16 +
  17 + <?= $this->render('_form', [
  18 + 'model' => $model,
  19 + ]) ?>
  20 +
  21 +</div>
... ...
backend/views/seo/index.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\grid\GridView;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $searchModel common\models\SeoSearch */
  8 +/* @var $dataProvider yii\data\ActiveDataProvider */
  9 +
  10 +$this->title = Yii::t('app', 'Seo');
  11 +$this->params['breadcrumbs'][] = $this->title;
  12 +?>
  13 +<div class="seo-index">
  14 +
  15 + <h1><?= Html::encode($this->title) ?></h1>
  16 + <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
  17 +
  18 + <p>
  19 + <?= Html::a(Yii::t('app', 'Create Seo'), ['create'], ['class' => 'btn btn-success']) ?>
  20 + </p>
  21 + <?= GridView::widget([
  22 + 'dataProvider' => $dataProvider,
  23 + 'filterModel' => $searchModel,
  24 + 'columns' => [
  25 + ['class' => 'yii\grid\SerialColumn'],
  26 +
  27 + 'seo_id',
  28 + 'url:url',
  29 + 'title',
  30 + 'description',
  31 + 'h1',
  32 + // 'seo_text:ntext',
  33 +
  34 + ['class' => 'yii\grid\ActionColumn'],
  35 + ],
  36 + ]); ?>
  37 +</div>
... ...
backend/views/seo/update.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +
  5 +/* @var $this yii\web\View */
  6 +/* @var $model common\models\Seo */
  7 +
  8 +$this->title = Yii::t('app', 'Update {modelClass}: ', [
  9 + 'modelClass' => 'Seo',
  10 +]) . $model->title;
  11 +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seos'), 'url' => ['index']];
  12 +$this->params['breadcrumbs'][] = ['label' => $model->title, 'url' => ['view', 'id' => $model->seo_id]];
  13 +$this->params['breadcrumbs'][] = Yii::t('app', 'Update');
  14 +?>
  15 +<div class="seo-update">
  16 +
  17 + <h1><?= Html::encode($this->title) ?></h1>
  18 +
  19 + <?= $this->render('_form', [
  20 + 'model' => $model,
  21 + ]) ?>
  22 +
  23 +</div>
... ...
backend/views/seo/view.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\widgets\DetailView;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model common\models\Seo */
  8 +
  9 +$this->title = $model->title;
  10 +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seos'), 'url' => ['index']];
  11 +$this->params['breadcrumbs'][] = $this->title;
  12 +?>
  13 +<div class="seo-view">
  14 +
  15 + <h1><?= Html::encode($this->title) ?></h1>
  16 +
  17 + <p>
  18 + <?= Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->seo_id], ['class' => 'btn btn-primary']) ?>
  19 + <?= Html::a(Yii::t('app', 'Delete'), ['delete', 'id' => $model->seo_id], [
  20 + 'class' => 'btn btn-danger',
  21 + 'data' => [
  22 + 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'),
  23 + 'method' => 'post',
  24 + ],
  25 + ]) ?>
  26 + </p>
  27 +
  28 + <?= DetailView::widget([
  29 + 'model' => $model,
  30 + 'attributes' => [
  31 + 'seo_id',
  32 + 'url:url',
  33 + 'title',
  34 + 'description',
  35 + 'h1',
  36 + 'seo_text:ntext',
  37 + ],
  38 + ]) ?>
  39 +
  40 +</div>
... ...
backend/views/service/_form.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\widgets\ActiveForm;
  5 +use mihaildev\ckeditor\CKEditor;
  6 +use mihaildev\elfinder\ElFinder;
  7 +use yii\jui\DatePicker;
  8 +/* @var $this yii\web\View */
  9 +/* @var $model common\models\Service */
  10 +/* @var $form yii\widgets\ActiveForm */
  11 +?>
  12 +
  13 +<div class="service-form">
  14 +
  15 + <?php $form = ActiveForm::begin(); ?>
  16 +
  17 + <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
  18 +
  19 + <?= $form->field($model, 'alias')->textInput(['maxlength' => true]) ?>
  20 +
  21 + <?= $form->field($model, 'body')->widget(CKEditor::className(),
  22 + [
  23 + 'editorOptions' => ElFinder::ckeditorOptions('elfinder',[
  24 + 'preset' => 'full', //разработанны стандартные настройки basic, standard, full данную возможность не обязательно использовать
  25 + 'inline' => false, //по умолчанию false]),
  26 + 'filebrowserUploadUrl'=>Yii::$app->getUrlManager()->createUrl('file/uploader/images-upload')
  27 + ]
  28 + )
  29 + ]) ?>
  30 +
  31 +
  32 + <?= \common\modules\file\widgets\ImageUploader::widget([
  33 + 'model'=> $model,
  34 + 'field'=>'image',
  35 + 'size' => [
  36 + [
  37 + 'width'=>200,
  38 + 'height'=>200,
  39 + ],
  40 + [
  41 + 'width'=>940,
  42 + 'height'=>480,
  43 + ]
  44 + ],
  45 + 'multi'=>false,
  46 + 'gallery' => $model->image,
  47 + 'name' => 'Загрузить изображение'
  48 + ]);
  49 + ?>
  50 +
  51 + <?= $form->field($model, 'meta_title')->textInput(['maxlength' => true]) ?>
  52 +
  53 + <?= $form->field($model, 'description')->textInput(['maxlength' => true]) ?>
  54 +
  55 + <?= $form->field($model, 'h1')->textInput(['maxlength' => true]) ?>
  56 +
  57 + <?= $form->field($model, 'seo_text')->textarea(['rows' => 6]) ?>
  58 +
  59 +
  60 + <div class="form-group">
  61 + <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
  62 + </div>
  63 +
  64 + <?php ActiveForm::end(); ?>
  65 +
  66 +</div>
... ...
backend/views/service/_search.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\widgets\ActiveForm;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model common\models\ServiceSearch */
  8 +/* @var $form yii\widgets\ActiveForm */
  9 +?>
  10 +
  11 +<div class="service-search">
  12 +
  13 + <?php $form = ActiveForm::begin([
  14 + 'action' => ['index'],
  15 + 'method' => 'get',
  16 + ]); ?>
  17 +
  18 + <?= $form->field($model, 'service_id') ?>
  19 +
  20 + <?= $form->field($model, 'name') ?>
  21 +
  22 + <?= $form->field($model, 'alias') ?>
  23 +
  24 + <?= $form->field($model, 'image') ?>
  25 +
  26 + <?php // echo $form->field($model, 'meta_title') ?>
  27 +
  28 + <?php // echo $form->field($model, 'description') ?>
  29 +
  30 + <?php // echo $form->field($model, 'h1') ?>
  31 +
  32 + <?php // echo $form->field($model, 'seo_text') ?>
  33 +
  34 + <?php // echo $form->field($model, 'created_at') ?>
  35 +
  36 + <?php // echo $form->field($model, 'updated_at') ?>
  37 +
  38 + <div class="form-group">
  39 + <?= Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']) ?>
  40 + <?= Html::resetButton(Yii::t('app', 'Reset'), ['class' => 'btn btn-default']) ?>
  41 + </div>
  42 +
  43 + <?php ActiveForm::end(); ?>
  44 +
  45 +</div>
... ...
backend/views/service/create.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model common\models\Service */
  8 +
  9 +$this->title = Yii::t('app', 'Create Service');
  10 +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Services'), 'url' => ['index']];
  11 +$this->params['breadcrumbs'][] = $this->title;
  12 +?>
  13 +<div class="service-create">
  14 +
  15 + <h1><?= Html::encode($this->title) ?></h1>
  16 +
  17 + <?= $this->render('_form', [
  18 + 'model' => $model,
  19 + ]) ?>
  20 +
  21 +</div>
... ...
backend/views/service/index.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\grid\GridView;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $searchModel common\models\ServiceSearch */
  8 +/* @var $dataProvider yii\data\ActiveDataProvider */
  9 +
  10 +$this->title = Yii::t('app', 'Services');
  11 +$this->params['breadcrumbs'][] = $this->title;
  12 +?>
  13 +<div class="service-index">
  14 +
  15 + <h1><?= Html::encode($this->title) ?></h1>
  16 + <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
  17 +
  18 + <p>
  19 + <?= Html::a(Yii::t('app', 'Create Service'), ['create'], ['class' => 'btn btn-success']) ?>
  20 + </p>
  21 + <?= GridView::widget([
  22 + 'dataProvider' => $dataProvider,
  23 + 'filterModel' => $searchModel,
  24 + 'columns' => [
  25 + ['class' => 'yii\grid\SerialColumn'],
  26 +
  27 + 'service_id',
  28 + 'name',
  29 + 'alias',
  30 + [
  31 + 'format' => 'image',
  32 + 'attribute'=>'image',
  33 + ],
  34 + // 'meta_title',
  35 + // 'description',
  36 + // 'h1',
  37 + // 'seo_text:ntext',
  38 + // 'created_at',
  39 + // 'updated_at',
  40 +
  41 + ['class' => 'yii\grid\ActionColumn'],
  42 + ],
  43 + ]); ?>
  44 +</div>
... ...
backend/views/service/update.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +
  5 +/* @var $this yii\web\View */
  6 +/* @var $model common\models\Service */
  7 +
  8 +$this->title = Yii::t('app', 'Update {modelClass}: ', [
  9 + 'modelClass' => 'Service',
  10 +]) . $model->name;
  11 +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Services'), 'url' => ['index']];
  12 +$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->service_id]];
  13 +$this->params['breadcrumbs'][] = Yii::t('app', 'Update');
  14 +?>
  15 +<div class="service-update">
  16 +
  17 + <h1><?= Html::encode($this->title) ?></h1>
  18 +
  19 + <?= $this->render('_form', [
  20 + 'model' => $model,
  21 + ]) ?>
  22 +
  23 +</div>
... ...
backend/views/service/view.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\helpers\Html;
  4 +use yii\widgets\DetailView;
  5 +
  6 +/* @var $this yii\web\View */
  7 +/* @var $model common\models\Service */
  8 +
  9 +$this->title = $model->name;
  10 +$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Services'), 'url' => ['index']];
  11 +$this->params['breadcrumbs'][] = $this->title;
  12 +?>
  13 +<div class="service-view">
  14 +
  15 + <h1><?= Html::encode($this->title) ?></h1>
  16 +
  17 + <p>
  18 + <?= Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->service_id], ['class' => 'btn btn-primary']) ?>
  19 + <?= Html::a(Yii::t('app', 'Delete'), ['delete', 'id' => $model->service_id], [
  20 + 'class' => 'btn btn-danger',
  21 + 'data' => [
  22 + 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'),
  23 + 'method' => 'post',
  24 + ],
  25 + ]) ?>
  26 + </p>
  27 +
  28 + <?= DetailView::widget([
  29 + 'model' => $model,
  30 + 'attributes' => [
  31 + 'service_id',
  32 + 'name',
  33 + 'alias',
  34 + [
  35 + 'format' => 'image',
  36 + 'attribute'=>'image',
  37 + ],
  38 + 'meta_title',
  39 + 'description',
  40 + 'h1',
  41 + 'seo_text:ntext',
  42 + 'created_at',
  43 + 'updated_at',
  44 + ],
  45 + ]) ?>
  46 +
  47 +</div>
... ...