Commit 7b9523621b6f2c35f48432e8d95d9a3f8dbb49eb

Authored by Anastasia
1 parent 18e84626

price and count update

Showing 2 changed files with 18 additions and 1 deletions   Show diff stats
controllers/OrderController.php
@@ -379,4 +379,12 @@ @@ -379,4 +379,12 @@
379 throw new NotFoundHttpException('The requested page does not exist.'); 379 throw new NotFoundHttpException('The requested page does not exist.');
380 } 380 }
381 } 381 }
  382 +
  383 + public function actionPrint($id){
  384 + $this->layout = false;
  385 + $model = $this->findModel($id);
  386 + return $this->renderPartial('@backend/views/layouts/print', [
  387 + 'model' => $model
  388 + ]);
  389 + }
382 } 390 }
views/order/index.php
@@ -54,7 +54,16 @@ @@ -54,7 +54,16 @@
54 }, 54 },
55 ], 55 ],
56 56
57 - [ 'class' => 'yii\grid\ActionColumn' ], 57 + [ 'class' => 'yii\grid\ActionColumn',
  58 + 'template' => '{view} {update} {delete}{print}',
  59 + 'buttons' => [
  60 + 'print' => function ($url) {
  61 + return Html::a(
  62 + '<span class="glyphicon glyphicon-print"></span>',
  63 + $url);
  64 + },
  65 + ]
  66 + ],
58 ], 67 ],
59 ] 68 ]
60 ); ?> 69 ); ?>