Commit cc04f5876c3a5aa18e3b2daccae98dc5486f536d
1 parent
98648e80
-Testing deadline and view fix
Showing
1 changed file
with
22 additions
and
22 deletions
Show diff stats
views/order/view.php
... | ... | @@ -64,17 +64,17 @@ |
64 | 64 | } else { |
65 | 65 | $payment = $model->orderPayment->lang->title; |
66 | 66 | } |
67 | - | |
68 | - $js = <<< JS | |
67 | + | |
68 | + $js = <<< JS | |
69 | 69 | $('[data-toggle="popover"]').popover(); |
70 | 70 | JS; |
71 | - $this->registerJs($js, View::POS_READY); | |
71 | + $this->registerJs($js, View::POS_READY); | |
72 | 72 | |
73 | 73 | ?> |
74 | 74 | <div class="order-view"> |
75 | - | |
75 | + | |
76 | 76 | <h1><?= Html::encode($this->title) ?></h1> |
77 | - | |
77 | + | |
78 | 78 | <p> |
79 | 79 | <?= Html::a( |
80 | 80 | 'Обновить', |
... | ... | @@ -94,7 +94,7 @@ JS; |
94 | 94 | [ 'class' => 'btn bg-orange' ] |
95 | 95 | ) ?> |
96 | 96 | </p> |
97 | - | |
97 | + | |
98 | 98 | <div class="box box-default"> |
99 | 99 | <div class="box-header with-border"> |
100 | 100 | <h3 class="box-title">Данные заказа</h3> |
... | ... | @@ -108,7 +108,7 @@ JS; |
108 | 108 | 'model' => $model, |
109 | 109 | 'attributes' => [ |
110 | 110 | 'id', |
111 | - 'deadline', | |
111 | + 'deadline:date', | |
112 | 112 | 'pay', |
113 | 113 | [ |
114 | 114 | 'label' => 'Причина', |
... | ... | @@ -144,8 +144,8 @@ JS; |
144 | 144 | ) ?> |
145 | 145 | </div><!-- /.box-body --> |
146 | 146 | </div><!-- /.box --> |
147 | - | |
148 | - | |
147 | + | |
148 | + | |
149 | 149 | <div class="box box-default"> |
150 | 150 | <div class="box-header with-border"> |
151 | 151 | <h3 class="box-title">Товары</h3> |
... | ... | @@ -166,12 +166,12 @@ JS; |
166 | 166 | [ |
167 | 167 | 'attribute' => 'product_name', |
168 | 168 | 'content' => function (OrderProduct $model) { |
169 | - if (!empty( $model->product_name )) { | |
170 | - | |
171 | - if (empty( $model->productVariant )) { | |
169 | + if (!empty($model->product_name)) { | |
170 | + | |
171 | + if (empty($model->productVariant)) { | |
172 | 172 | return ''; |
173 | 173 | } |
174 | - | |
174 | + | |
175 | 175 | return Html::a( |
176 | 176 | StringHelper::truncate($model->product_name, 10, '...'), |
177 | 177 | '#', |
... | ... | @@ -201,11 +201,11 @@ JS; |
201 | 201 | 'attribute' => 'productVariant.lang.title', |
202 | 202 | 'label' => \Yii::t('app', 'Цвет'), |
203 | 203 | 'content' => function (OrderProduct $model) { |
204 | - | |
205 | - if (empty( $model->productVariant )) { | |
204 | + | |
205 | + if (empty($model->productVariant)) { | |
206 | 206 | return ''; |
207 | 207 | } |
208 | - | |
208 | + | |
209 | 209 | if (preg_match('@.*\.(png|jpg|gif)@i', $model->productVariant->lang->title)) { |
210 | 210 | return ''; |
211 | 211 | } else { |
... | ... | @@ -225,11 +225,11 @@ JS; |
225 | 225 | 'return', |
226 | 226 | [ |
227 | 227 | 'content' => function (OrderProduct $model) { |
228 | - | |
229 | - if (empty( $model->productVariant )) { | |
228 | + | |
229 | + if (empty($model->productVariant)) { | |
230 | 230 | return '<i class="glyphicon glyphicon-remove"></i>'; |
231 | 231 | } |
232 | - | |
232 | + | |
233 | 233 | $content = '<table class="table"><tbody><tr><th>Склад</th><th>кол.</th></tr>'; |
234 | 234 | foreach ($model->productVariant->variantStocks as $stock) { |
235 | 235 | $content .= '<tr><td>' . $stock->stock->title . '</td><td>' . $stock->quantity . '</td></tr>'; |
... | ... | @@ -253,7 +253,7 @@ JS; |
253 | 253 | ?> |
254 | 254 | </div><!-- /.box-body --> |
255 | 255 | </div><!-- /.box --> |
256 | - | |
256 | + | |
257 | 257 | <div class="box box-default"> |
258 | 258 | <div class="box-header with-border"> |
259 | 259 | <h3 class="box-title">История</h3> |
... | ... | @@ -284,8 +284,8 @@ JS; |
284 | 284 | ] |
285 | 285 | ); |
286 | 286 | ?> |
287 | - | |
288 | - | |
287 | + | |
288 | + | |
289 | 289 | </div><!-- /.box-body --> |
290 | 290 | </div><!-- /.box --> |
291 | 291 | ... | ... |