From 7b9523621b6f2c35f48432e8d95d9a3f8dbb49eb Mon Sep 17 00:00:00 2001 From: stes Date: Thu, 3 Aug 2017 16:23:20 +0300 Subject: [PATCH] price and count update --- controllers/OrderController.php | 8 ++++++++ views/order/index.php | 11 ++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/controllers/OrderController.php b/controllers/OrderController.php index 6319945..1a1b35a 100755 --- a/controllers/OrderController.php +++ b/controllers/OrderController.php @@ -379,4 +379,12 @@ throw new NotFoundHttpException('The requested page does not exist.'); } } + + public function actionPrint($id){ + $this->layout = false; + $model = $this->findModel($id); + return $this->renderPartial('@backend/views/layouts/print', [ + 'model' => $model + ]); + } } diff --git a/views/order/index.php b/views/order/index.php index 5f79067..9d41cdf 100755 --- a/views/order/index.php +++ b/views/order/index.php @@ -54,7 +54,16 @@ }, ], - [ 'class' => 'yii\grid\ActionColumn' ], + [ 'class' => 'yii\grid\ActionColumn', + 'template' => '{view} {update} {delete}{print}', + 'buttons' => [ + 'print' => function ($url) { + return Html::a( + '', + $url); + }, + ] + ], ], ] ); ?> -- libgit2 0.21.4