Commit dbdd0d43a6e6d4eafcb79f576b24945885a0aa5f

Authored by Alexey Boroda
1 parent de382cfb

-Images and spoiler features

Showing 2 changed files with 26 additions and 5 deletions   Show diff stats
views/order/_form.php
... ... @@ -379,7 +379,24 @@ JS;
379 379 [
380 380 'class' => SerialColumn::className(),
381 381 ],
382   - 'sku',
  382 + [
  383 + 'attribute' => 'sku',
  384 + 'content' => function($model) {
  385 + return Html::a(
  386 + $model->sku,
  387 + '#',
  388 + [
  389 + 'onclick' => 'event.preventDefault();',
  390 + 'data-toggle' => 'popover',
  391 + 'data-placement' => 'right',
  392 + 'data-html' => 'true',
  393 + 'data-content' => Html::img($model->productVariant->imageUrl, [
  394 + 'class' => 'img-rounded',
  395 + ]),
  396 + ]
  397 + );
  398 + },
  399 + ],
383 400 [
384 401 'attribute' => 'product_name',
385 402 'content' => function($model) {
... ...
views/order/index.php
... ... @@ -37,7 +37,7 @@ JS;
37 37 ?>
38 38 <h1>Заказы</h1>
39 39 <p>
40   - <?= Html::a(\Yii::t('app', 'Добавить заказ'), [ 'create' ], [ 'class' => 'btn btn-success' ]) ?>
  40 + <?= Html::a(\Yii::t('app', 'Добавить заказ'), [ 'create' ], [ 'class' => 'btn btn-success btn-lg' ]) ?>
41 41 </p>
42 42 <?php Pjax::begin(); ?>
43 43 <?php
... ... @@ -50,7 +50,7 @@ JS;
50 50 );
51 51 ?>
52 52  
53   -<p>
  53 +
54 54  
55 55 <?php echo Html::submitButton(
56 56 \Yii::t('app', 'Искать'),
... ... @@ -59,8 +59,12 @@ JS;
59 59 ]
60 60 ) ?>
61 61  
62   -</p>
63   -<div class="row">
  62 +<?php echo Html::button(\Yii::t('app', 'Скрыть/Показать'), [
  63 + 'data-toggle' => 'collapse',
  64 + 'data-target' => '#search-fields',
  65 + 'class' => 'btn btn-default'
  66 +])?>
  67 +<div class="row collapse in" id="search-fields">
64 68 <div class="col-md-4">
65 69 <?php
66 70 echo $searchForm->field($searchModel, 'label')
... ...