diff --git a/backend/views/book/_form.php b/backend/views/book/_form.php
index 0c618b5..bc79c0c 100644
--- a/backend/views/book/_form.php
+++ b/backend/views/book/_form.php
@@ -1,6 +1,7 @@
field($model, 'title')
->textInput([ 'maxlength' => true ]) ?>
- =$model->author->name.' '.$model->author->secondname?>
+
+ =ImageHelper::set('@storage/books/'.$model->id.'/'.$model->image)->cropResize(262, 390)->renderImage()?>
+
+ =$model->author->name.' '.$model->author->secondname?>
= $form->field($model, 'description')
->widget(
@@ -84,13 +88,15 @@ window.open('" . Url::to(
]
);
?>
-
+ = $form->field($model, 'price')
+ ->textInput() ?>
= $form->field($model, 'on_main')
->checkbox(
[
'class' => 'switchery',
]
) ?>
+
= Html::submitButton(
$model->isNewRecord ? Yii::t('core', 'Create') : Yii::t('core', 'Update'),
diff --git a/backend/views/book/update.php b/backend/views/book/update.php
index 9abfd51..765aa4f 100644
--- a/backend/views/book/update.php
+++ b/backend/views/book/update.php
@@ -3,7 +3,7 @@
use yiister\gentelella\widgets\Panel;
/* @var $this yii\web\View */
- /* @var $model artbox\core\models\Feedback */
+ /* @var $model \common\models\Book */
$this->title = Yii::t(
'core',
@@ -11,13 +11,13 @@
[
'modelClass' => 'Book',
]
- ) . $model->name;
+ ) . $model->title;
$this->params[ 'breadcrumbs' ][] = [
'label' => Yii::t('app', 'Books'),
'url' => [ 'index' ],
];
$this->params[ 'breadcrumbs' ][] = [
- 'label' => $model->name,
+ 'label' => $model->title,
'url' => [
'view',
'id' => $model->id,
diff --git a/backend/views/layouts/menu_items.php b/backend/views/layouts/menu_items.php
index 439680a..4275f83 100755
--- a/backend/views/layouts/menu_items.php
+++ b/backend/views/layouts/menu_items.php
@@ -45,6 +45,16 @@
'url' => [ '/page-category/index' ],
],
+ [
+ 'label' => \Yii::t('app', 'Books'),
+ 'url' => [ '/book/index' ],
+
+ ],
+ [
+ 'label' => \Yii::t('app', 'Author'),
+ 'url' => [ '/author/index' ],
+
+ ],
],
],
--
libgit2 0.21.4