Commit b4c8cb310d86ce3e7a30a759afbd78ca8cfd508e
1 parent
84296a63
add variantSku
Showing
7 changed files
with
15 additions
and
15 deletions
Show diff stats
controllers/SeoController.php
@@ -76,7 +76,7 @@ class SeoController extends Controller | @@ -76,7 +76,7 @@ class SeoController extends Controller | ||
76 | $model = new Seo(); | 76 | $model = new Seo(); |
77 | 77 | ||
78 | if ($model->load(Yii::$app->request->post()) && $model->save()) { | 78 | if ($model->load(Yii::$app->request->post()) && $model->save()) { |
79 | - return $this->redirect(['view', 'id' => $model->seo_id]); | 79 | + return $this->redirect(['view', 'id' => $model->id]); |
80 | } else { | 80 | } else { |
81 | return $this->render('create', [ | 81 | return $this->render('create', [ |
82 | 'model' => $model, | 82 | 'model' => $model, |
@@ -95,7 +95,7 @@ class SeoController extends Controller | @@ -95,7 +95,7 @@ class SeoController extends Controller | ||
95 | $model = $this->findModel($id); | 95 | $model = $this->findModel($id); |
96 | 96 | ||
97 | if ($model->load(Yii::$app->request->post()) && $model->save()) { | 97 | if ($model->load(Yii::$app->request->post()) && $model->save()) { |
98 | - return $this->redirect(['view', 'id' => $model->seo_id]); | 98 | + return $this->redirect(['view', 'id' => $model->id]); |
99 | } else { | 99 | } else { |
100 | return $this->render('update', [ | 100 | return $this->render('update', [ |
101 | 'model' => $model, | 101 | 'model' => $model, |
models/Seo.php
@@ -7,7 +7,7 @@ use Yii; | @@ -7,7 +7,7 @@ use Yii; | ||
7 | /** | 7 | /** |
8 | * This is the model class for table "seo". | 8 | * This is the model class for table "seo". |
9 | * | 9 | * |
10 | - * @property integer $seo_id | 10 | + * @property integer $id |
11 | * @property string $url | 11 | * @property string $url |
12 | * @property string $title | 12 | * @property string $title |
13 | * @property string $meta | 13 | * @property string $meta |
@@ -43,7 +43,7 @@ class Seo extends \yii\db\ActiveRecord | @@ -43,7 +43,7 @@ class Seo extends \yii\db\ActiveRecord | ||
43 | public function attributeLabels() | 43 | public function attributeLabels() |
44 | { | 44 | { |
45 | return [ | 45 | return [ |
46 | - 'seo_id' => Yii::t('app', 'seo_id'), | 46 | + 'id' => Yii::t('app', 'seo_id'), |
47 | 'url' => Yii::t('app', 'url'), | 47 | 'url' => Yii::t('app', 'url'), |
48 | 'title' => Yii::t('app', 'title'), | 48 | 'title' => Yii::t('app', 'title'), |
49 | 'meta' => Yii::t('app', 'meta_title'), | 49 | 'meta' => Yii::t('app', 'meta_title'), |
models/SeoSearch.php
@@ -18,7 +18,7 @@ class SeoSearch extends Seo | @@ -18,7 +18,7 @@ class SeoSearch extends Seo | ||
18 | public function rules() | 18 | public function rules() |
19 | { | 19 | { |
20 | return [ | 20 | return [ |
21 | - [['seo_id'], 'integer'], | 21 | + [['id'], 'integer'], |
22 | [['url', 'title', 'meta', 'description', 'h1', 'seo_text'], 'safe'], | 22 | [['url', 'title', 'meta', 'description', 'h1', 'seo_text'], 'safe'], |
23 | ]; | 23 | ]; |
24 | } | 24 | } |
@@ -59,7 +59,7 @@ class SeoSearch extends Seo | @@ -59,7 +59,7 @@ class SeoSearch extends Seo | ||
59 | 59 | ||
60 | // grid filtering conditions | 60 | // grid filtering conditions |
61 | $query->andFilterWhere([ | 61 | $query->andFilterWhere([ |
62 | - 'seo_id' => $this->seo_id, | 62 | + 'id' => $this->id, |
63 | ]); | 63 | ]); |
64 | 64 | ||
65 | $query->andFilterWhere(['like', 'url', $this->url]) | 65 | $query->andFilterWhere(['like', 'url', $this->url]) |
views/seo/_search.php
@@ -4,7 +4,7 @@ use yii\helpers\Html; | @@ -4,7 +4,7 @@ use yii\helpers\Html; | ||
4 | use yii\widgets\ActiveForm; | 4 | use yii\widgets\ActiveForm; |
5 | 5 | ||
6 | /* @var $this yii\web\View */ | 6 | /* @var $this yii\web\View */ |
7 | -/* @var $model common\models\SeoSearch */ | 7 | +/* @var $model artweb\artbox\seo\models\SeoSearch */ |
8 | /* @var $form yii\widgets\ActiveForm */ | 8 | /* @var $form yii\widgets\ActiveForm */ |
9 | ?> | 9 | ?> |
10 | 10 | ||
@@ -15,7 +15,7 @@ use yii\widgets\ActiveForm; | @@ -15,7 +15,7 @@ use yii\widgets\ActiveForm; | ||
15 | 'method' => 'get', | 15 | 'method' => 'get', |
16 | ]); ?> | 16 | ]); ?> |
17 | 17 | ||
18 | - <?= $form->field($model, 'seo_id') ?> | 18 | + <?= $form->field($model, 'id') ?> |
19 | 19 | ||
20 | <?= $form->field($model, 'url') ?> | 20 | <?= $form->field($model, 'url') ?> |
21 | 21 |
views/seo/index.php
@@ -24,7 +24,7 @@ $this->params['breadcrumbs'][] = $this->title; | @@ -24,7 +24,7 @@ $this->params['breadcrumbs'][] = $this->title; | ||
24 | 'columns' => [ | 24 | 'columns' => [ |
25 | ['class' => 'yii\grid\SerialColumn'], | 25 | ['class' => 'yii\grid\SerialColumn'], |
26 | 26 | ||
27 | - 'seo_id', | 27 | + 'id', |
28 | 'url:url', | 28 | 'url:url', |
29 | 'meta', | 29 | 'meta', |
30 | 'h1', | 30 | 'h1', |
views/seo/update.php
@@ -3,13 +3,13 @@ | @@ -3,13 +3,13 @@ | ||
3 | use yii\helpers\Html; | 3 | use yii\helpers\Html; |
4 | 4 | ||
5 | /* @var $this yii\web\View */ | 5 | /* @var $this yii\web\View */ |
6 | -/* @var $model common\models\Seo */ | 6 | +/* @var $model artweb\artbox\seo\models\Seo */ |
7 | 7 | ||
8 | $this->title = Yii::t('app', 'Update {modelClass}: ', [ | 8 | $this->title = Yii::t('app', 'Update {modelClass}: ', [ |
9 | 'modelClass' => 'Seo', | 9 | 'modelClass' => 'Seo', |
10 | ]) . $model->title; | 10 | ]) . $model->title; |
11 | $this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seos'), 'url' => ['index']]; | 11 | $this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seos'), 'url' => ['index']]; |
12 | -$this->params['breadcrumbs'][] = ['label' => $model->title, 'url' => ['view', 'id' => $model->seo_id]]; | 12 | +$this->params['breadcrumbs'][] = ['label' => $model->title, 'url' => ['view', 'id' => $model->d]]; |
13 | $this->params['breadcrumbs'][] = Yii::t('app', 'Update'); | 13 | $this->params['breadcrumbs'][] = Yii::t('app', 'Update'); |
14 | ?> | 14 | ?> |
15 | <div class="seo-update"> | 15 | <div class="seo-update"> |
views/seo/view.php
@@ -4,7 +4,7 @@ use yii\helpers\Html; | @@ -4,7 +4,7 @@ use yii\helpers\Html; | ||
4 | use yii\widgets\DetailView; | 4 | use yii\widgets\DetailView; |
5 | 5 | ||
6 | /* @var $this yii\web\View */ | 6 | /* @var $this yii\web\View */ |
7 | -/* @var $model common\models\Seo */ | 7 | +/* @var $model artweb\artbox\seo\models\Seo */ |
8 | 8 | ||
9 | $this->title = $model->title; | 9 | $this->title = $model->title; |
10 | $this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seos'), 'url' => ['index']]; | 10 | $this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Seos'), 'url' => ['index']]; |
@@ -15,8 +15,8 @@ $this->params['breadcrumbs'][] = $this->title; | @@ -15,8 +15,8 @@ $this->params['breadcrumbs'][] = $this->title; | ||
15 | <h1><?= Html::encode($this->title) ?></h1> | 15 | <h1><?= Html::encode($this->title) ?></h1> |
16 | 16 | ||
17 | <p> | 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], [ | 18 | + <?= Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?> |
19 | + <?= Html::a(Yii::t('app', 'Delete'), ['delete', 'id' => $model->id], [ | ||
20 | 'class' => 'btn btn-danger', | 20 | 'class' => 'btn btn-danger', |
21 | 'data' => [ | 21 | 'data' => [ |
22 | 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), | 22 | 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), |
@@ -28,7 +28,7 @@ $this->params['breadcrumbs'][] = $this->title; | @@ -28,7 +28,7 @@ $this->params['breadcrumbs'][] = $this->title; | ||
28 | <?= DetailView::widget([ | 28 | <?= DetailView::widget([ |
29 | 'model' => $model, | 29 | 'model' => $model, |
30 | 'attributes' => [ | 30 | 'attributes' => [ |
31 | - 'seo_id', | 31 | + 'id', |
32 | 'url:url', | 32 | 'url:url', |
33 | 'title', | 33 | 'title', |
34 | 'meta', | 34 | 'meta', |