Commit f2d1c773fba0d40d03655c90802eed614fc89744

Authored by Alexey Boroda
1 parent 43127bab

-Images popup fix and feed fix

Showing 2 changed files with 53 additions and 44 deletions   Show diff stats
views/order/_form.php
@@ -142,7 +142,12 @@ JS; @@ -142,7 +142,12 @@ JS;
142 142
143 ?> 143 ?>
144 144
145 -<?php $form = ActiveForm::begin([ 'id' => 'main-form' ]); ?> 145 +<?php $form = ActiveForm::begin(
  146 + [
  147 + 'id' => 'main-form',
  148 +// 'options' => [ 'class' => 'form-inline' ],
  149 + ]
  150 +); ?>
146 <div class="container"> 151 <div class="container">
147 <div class="form-group"> 152 <div class="form-group">
148 <br> 153 <br>
@@ -379,27 +384,7 @@ JS; @@ -379,27 +384,7 @@ JS;
379 [ 384 [
380 'class' => SerialColumn::className(), 385 'class' => SerialColumn::className(),
381 ], 386 ],
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(  
394 - $model->productVariant->imageUrl,  
395 - [  
396 - 'class' => 'img-rounded',  
397 - ]  
398 - ),  
399 - ]  
400 - );  
401 - },  
402 - ], 387 + 'sku',
403 [ 388 [
404 'attribute' => 'product_name', 389 'attribute' => 'product_name',
405 'content' => function($model) { 390 'content' => function($model) {
@@ -408,9 +393,16 @@ JS; @@ -408,9 +393,16 @@ JS;
408 StringHelper::truncate($model->product_name, 10, '...'), 393 StringHelper::truncate($model->product_name, 10, '...'),
409 '#', 394 '#',
410 [ 395 [
411 - 'data-toggle' => 'tooltip',  
412 - 'title' => $model->product_name,  
413 - 'onclick' => 'event.preventDefault();', 396 + 'onclick' => 'event.preventDefault();',
  397 + 'data-toggle' => 'popover',
  398 + 'data-placement' => 'right',
  399 + 'data-html' => 'true',
  400 + 'data-content' => Html::img(
  401 + $model->productVariant->imageUrl,
  402 + [
  403 + 'class' => 'img-rounded',
  404 + ]
  405 + ) . Html::tag('p', $model->product_name),
414 ] 406 ]
415 ); 407 );
416 } else { 408 } else {
@@ -420,7 +412,7 @@ JS; @@ -420,7 +412,7 @@ JS;
420 ], 412 ],
421 [ 413 [
422 'attribute' => 'productVariant.product.brand.lang.title', 414 'attribute' => 'productVariant.product.brand.lang.title',
423 - 'label' => 'Брэнд', 415 + 'label' => 'Брэнд',
424 ], 416 ],
425 [ 417 [
426 'attribute' => 'productVariant.lang.title', 418 'attribute' => 'productVariant.lang.title',
@@ -434,8 +426,8 @@ JS; @@ -434,8 +426,8 @@ JS;
434 }, 426 },
435 ], 427 ],
436 [ 428 [
437 - 'attribute' => 'productVariant.size',  
438 - 'label' => 'Размер', 429 + 'attribute' => 'productVariant.size',
  430 + 'label' => 'Размер',
439 ], 431 ],
440 'price', 432 'price',
441 [ 433 [
@@ -633,7 +625,8 @@ JS; @@ -633,7 +625,8 @@ JS;
633 ), 625 ),
634 ], 626 ],
635 ] 627 ]
636 - )->label('Артикул'); 628 + )
  629 + ->label('Артикул');
637 630
638 ?> 631 ?>
639 </div> 632 </div>
views/order/index.php
@@ -52,19 +52,30 @@ JS; @@ -52,19 +52,30 @@ JS;
52 52
53 53
54 54
55 - <?php echo Html::submitButton(  
56 - \Yii::t('app', 'Искать'),  
57 - [  
58 - 'class' => 'btn btn-primary',  
59 - ]  
60 - ) ?> 55 +
61 56
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"> 57 +<?php
  58 +// echo Html::button(\Yii::t('app', 'Скрыть/Показать'), [
  59 +// 'data-toggle' => 'collapse',
  60 +// 'data-target' => '#search-fields',
  61 +// 'class' => 'btn btn-default'
  62 +//]);
  63 +//?>
  64 +<div class="box box-primary">
  65 + <div class="box-header with-border">
  66 +<!-- <h3 class="box-title"></h3>-->
  67 + <?php echo Html::submitButton(
  68 + \Yii::t('app', 'Искать'),
  69 + [
  70 + 'class' => 'btn btn-primary',
  71 + ]
  72 + ) ?>
  73 + <div class="box-tools pull-right">
  74 + <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
  75 + </div>
  76 + </div>
  77 +
  78 +<div class="row box-body" id="search-fields">
68 <div class="col-md-4"> 79 <div class="col-md-4">
69 <?php 80 <?php
70 echo $searchForm->field($searchModel, 'label') 81 echo $searchForm->field($searchModel, 'label')
@@ -181,6 +192,8 @@ JS; @@ -181,6 +192,8 @@ JS;
181 </div> 192 </div>
182 </div> 193 </div>
183 194
  195 +</div>
  196 +
184 <p> 197 <p>
185 <?php 198 <?php
186 echo GridView::widget( 199 echo GridView::widget(
@@ -203,9 +216,9 @@ JS; @@ -203,9 +216,9 @@ JS;
203 'content' => function($model) { 216 'content' => function($model) {
204 $manager = $model->manager; 217 $manager = $model->manager;
205 if (empty($manager)) { 218 if (empty($manager)) {
206 - return $model->id; 219 + return Html::a($model->id, ['update', 'id' => $model->id], ['target' => '_blank', 'data-pjax' => '0']);
207 } else { 220 } else {
208 - return $model->id . '<br>' . $manager->username; 221 + return Html::a($model->id, ['update', 'id' => $model->id], ['target' => '_blank', 'data-pjax' => '0']) . '<br>' . $manager->username;
209 } 222 }
210 }, 223 },
211 ], 224 ],
@@ -340,7 +353,10 @@ JS; @@ -340,7 +353,10 @@ JS;
340 return Html::a( 353 return Html::a(
341 Html::tag('span', '', [ 'class' => 'glyphicon glyphicon-pencil' ]), 354 Html::tag('span', '', [ 'class' => 'glyphicon glyphicon-pencil' ]),
342 $url, 355 $url,
343 - [ 'target' => '_blank' ] 356 + [
  357 + 'target' => '_blank',
  358 + 'data-pjax' => '0',
  359 + ]
344 ); 360 );
345 }, 361 },
346 ], 362 ],