Completed
Push — master ( 6e0e1d...0afdc4 )
by Alexey
04:12
created
system/modules/Materials/appControllers/content/materialWithCategorys.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -2,11 +2,11 @@
 block discarded – undo
2 2
   <div class="row">
3 3
     <div class="col-md-3">
4 4
       <?php
5
-      $category = $material->category;
6
-      \Ui\Tree::ul($category->getRoot(), 0, function($category) {
7
-          echo "<a href='{$category->getHref()}'> {$category->name()}</a>";
8
-      });
9
-      ?>
5
+        $category = $material->category;
6
+        \Ui\Tree::ul($category->getRoot(), 0, function($category) {
7
+            echo "<a href='{$category->getHref()}'> {$category->name()}</a>";
8
+        });
9
+        ?>
10 10
     </div>
11 11
     <div class="col-md-9">
12 12
       <div class="content">
Please login to merge, or discard this patch.
system/modules/Ecommerce/appControllers/content/Cart/index.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -3,13 +3,13 @@  discard block
 block discarded – undo
3 3
     <div class="cart-order_page">
4 4
       <h2>Быстрое оформление заказа</h2>
5 5
       <?php
6
-      if (!$cart || !$cart->cartItems)
7
-          echo "<h1>Ваша корзина пуста</h1>";
8
-      else {
9
-          $form = new Ui\Form;
10
-          $form->action = "/ecommerce/cart";
11
-          $form->begin();
12
-          ?>
6
+        if (!$cart || !$cart->cartItems)
7
+            echo "<h1>Ваша корзина пуста</h1>";
8
+        else {
9
+            $form = new Ui\Form;
10
+            $form->action = "/ecommerce/cart";
11
+            $form->begin();
12
+            ?>
13 13
           <div class="row">
14 14
             <div class="col-sm-4">
15 15
               <div class="order_page-info">
@@ -86,14 +86,14 @@  discard block
 block discarded – undo
86 86
                     </thead>
87 87
                     <tbody>
88 88
                       <?php
89
-                      if (class_exists('Money\Currency')) {
90
-                          $defaultCurrency = Money\Currency::get(\App::$cur->ecommerce->config['defaultCurrency']);
91
-                      } else {
92
-                          $defaultCurrency = '';
93
-                      }
94
-                      foreach ($cart->cartItems as $cartItem) {
95
-                          $path = $cartItem->item->image ? $cartItem->item->image->path : '/static/system/images/no-image.png';
96
-                          ?>
89
+                        if (class_exists('Money\Currency')) {
90
+                            $defaultCurrency = Money\Currency::get(\App::$cur->ecommerce->config['defaultCurrency']);
91
+                        } else {
92
+                            $defaultCurrency = '';
93
+                        }
94
+                        foreach ($cart->cartItems as $cartItem) {
95
+                            $path = $cartItem->item->image ? $cartItem->item->image->path : '/static/system/images/no-image.png';
96
+                            ?>
97 97
                           <tr class="cart_item_id<?= $cartItem->id; ?> item" data-cart_item_id = '<?php echo $cartItem->id; ?>' data-priceam = '<?php echo $cartItem->price->price; ?>' data-item_offer_price_id = '<?php echo $cartItem->price->id; ?>'>
98 98
                             <td class="text-center image">                            
99 99
                               <a href="/ecommerce/view/<?php echo $cartItem->item->id; ?>">
@@ -119,41 +119,41 @@  discard block
 block discarded – undo
119 119
                             </td>
120 120
                           </tr>
121 121
                           <?php
122
-                      }
123
-                      ?>
122
+                        }
123
+                        ?>
124 124
                     </tbody>
125 125
                     <tfoot>
126 126
                       <?php
127
-                      $colspan = $cart->hasDiscount() ? 5 : 4;
128
-                      ?>
127
+                        $colspan = $cart->hasDiscount() ? 5 : 4;
128
+                        ?>
129 129
                       <tr class="order_page-sum">
130 130
                         <td colspan="<?= $colspan; ?>" class="text-right">Сумма:</td>
131 131
                         <td colspan="2" class="text-right"><?= $cart->itemsSum(); ?></td>
132 132
                       </tr>
133 133
                       <?php
134
-                      if ($cart->hasDiscount()) {
135
-                          ?>
134
+                        if ($cart->hasDiscount()) {
135
+                            ?>
136 136
                           <tr class="order_page-discountSum">
137 137
                             <td colspan="<?= $colspan; ?>" class="text-right">Скидка:</td>
138 138
                             <td colspan="2" class="text-right"><?= $cart->discountSum(); ?></td>
139 139
                           </tr>
140 140
                           <?php
141
-                      }
142
-                      if ($cart->delivery) {
143
-                          ?>
141
+                        }
142
+                        if ($cart->delivery) {
143
+                            ?>
144 144
                           <tr class="order_page-deliverySum">
145 145
                             <td colspan="<?= $colspan; ?>" class="text-right"><?= $cart->delivery->name; ?>:</td>
146 146
                             <td colspan="2" class="text-right"><?php
147
-                              if ($cart->delivery && $cart->delivery->price_text) {
148
-                                  echo $cart->delivery->price_text;
149
-                              } else {
150
-                                  echo $cart->deliverySum();
151
-                              }
152
-                              ?></td>
147
+                                if ($cart->delivery && $cart->delivery->price_text) {
148
+                                    echo $cart->delivery->price_text;
149
+                                } else {
150
+                                    echo $cart->deliverySum();
151
+                                }
152
+                                ?></td>
153 153
                           </tr>
154 154
                           <?php
155
-                      }
156
-                      ?>
155
+                        }
156
+                        ?>
157 157
                       <tr class="order_page-total">
158 158
                         <td colspan="<?= $colspan; ?>" class="text-right">Итого:</td>
159 159
                         <td colspan="2" class="text-right"><?= $cart->finalSum(); ?></td>
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
                 <div class="clearfix"></div>
166 166
                 <div class="order_page-finish">
167 167
                   <?php
168
-                  $form->input('textarea', 'comment', 'Вы можете добавить комментарий к своему заказу', ['value' => (!empty($_POST['comment'])) ? $_POST['comment'] : '']);
169
-                  ?>
168
+                    $form->input('textarea', 'comment', 'Вы можете добавить комментарий к своему заказу', ['value' => (!empty($_POST['comment'])) ? $_POST['comment'] : '']);
169
+                    ?>
170 170
                   <div class="order_page-orderBtn">
171 171
                     <button name ="action" value ="order" data-loading-text="Подождите.." class="btn btn-primary">Подтверждение заказа</button>
172 172
                   </div>
@@ -175,9 +175,9 @@  discard block
 block discarded – undo
175 175
             </div>
176 176
           </div>
177 177
           <?php
178
-          $form->end(false);
179
-      }
180
-      ?>
178
+            $form->end(false);
179
+        }
180
+        ?>
181 181
     </div>
182 182
   </div>
183 183
 </div>
184 184
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/cart/payType.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -2,24 +2,24 @@
 block discarded – undo
2 2
   <div class="col-md-4">
3 3
     <ul class="nav nav-pills nav-stacked">
4 4
       <?php
5
-      $hiddenId = Tools::randomString();
6
-      foreach ($payTypes as $payType) {
7
-          if ((!empty($_POST['payType']) && $_POST['payType'] == $payType->id) || ($cart->payType && $payType->id == $cart->payType->id)) {
8
-              $checked = 'checked';
9
-          } else {
10
-              $checked = '';
11
-          }
12
-          echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $payType->id . '\';inji.Ecommerce.Cart.calcSum();return false;">';
13
-          echo $payType->name;
14
-          echo '</a></li>';
15
-      }
16
-      $form->input('hidden', "payType", '', [
17
-          'value' => $cart->paytype_id,
18
-          'attributes' => [
19
-              'id' => $hiddenId
20
-          ],
21
-      ]);
22
-      ?>
5
+        $hiddenId = Tools::randomString();
6
+        foreach ($payTypes as $payType) {
7
+            if ((!empty($_POST['payType']) && $_POST['payType'] == $payType->id) || ($cart->payType && $payType->id == $cart->payType->id)) {
8
+                $checked = 'checked';
9
+            } else {
10
+                $checked = '';
11
+            }
12
+            echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $payType->id . '\';inji.Ecommerce.Cart.calcSum();return false;">';
13
+            echo $payType->name;
14
+            echo '</a></li>';
15
+        }
16
+        $form->input('hidden', "payType", '', [
17
+            'value' => $cart->paytype_id,
18
+            'attributes' => [
19
+                'id' => $hiddenId
20
+            ],
21
+        ]);
22
+        ?>
23 23
     </ul>
24 24
   </div>
25 25
   <div class="col-md-8">
Please login to merge, or discard this patch.
system/modules/Ui/widgets/ActiveForm/ActiveForm.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -9,33 +9,33 @@
 block discarded – undo
9 9
 ?>
10 10
 <div id ='<?= $id; ?>' class="uiActiveForm" data-modelname="<?= $activeForm->modelName; ?>" data-formname="<?= $activeForm->formName; ?>" data-inputs='<?= json_encode($formInputs); ?>'>
11 11
   <?php
12
-  $form->action = $activeForm->action;
13
-  $form->begin($activeForm->header, ['onsubmit' => $ajax ? 'inji.Ui.forms.submitAjax(this);return false;' : ''], ['activeForm' => $activeForm]);
12
+    $form->action = $activeForm->action;
13
+    $form->begin($activeForm->header, ['onsubmit' => $ajax ? 'inji.Ui.forms.submitAjax(this);return false;' : ''], ['activeForm' => $activeForm]);
14 14
 
15
-  if (empty($activeForm->form['noMapCell'])) {
16
-      foreach ($activeForm->form['map'] as $row) {
17
-          $colSize = 12 / count($row);
18
-          echo "<div class ='row'>";
19
-          foreach ($row as $col) {
20
-              echo "<div class = 'col-sm-{$colSize}'>";
21
-              if ($col) {
22
-                  $activeForm->drawCol($col, $activeForm->inputs[$col], $form, $params);
23
-              }
24
-              echo '</div>';
25
-          }
26
-          echo '</div>';
27
-      }
28
-  } else {
29
-      foreach ($activeForm->form['map'] as $row) {
30
-          foreach ($row as $col) {
31
-              if ($col) {
32
-                  $activeForm->drawCol($col, $activeForm->inputs[$col], $form, $params);
33
-              }
34
-          }
35
-      }
36
-  }
37
-  $form->end($activeForm->model ? ($activeForm->model->pk() ? 'Сохранить' : 'Создать') : 'Отправить', [], ['activeForm' => $activeForm]);
38
-  ?>
15
+    if (empty($activeForm->form['noMapCell'])) {
16
+        foreach ($activeForm->form['map'] as $row) {
17
+            $colSize = 12 / count($row);
18
+            echo "<div class ='row'>";
19
+            foreach ($row as $col) {
20
+                echo "<div class = 'col-sm-{$colSize}'>";
21
+                if ($col) {
22
+                    $activeForm->drawCol($col, $activeForm->inputs[$col], $form, $params);
23
+                }
24
+                echo '</div>';
25
+            }
26
+            echo '</div>';
27
+        }
28
+    } else {
29
+        foreach ($activeForm->form['map'] as $row) {
30
+            foreach ($row as $col) {
31
+                if ($col) {
32
+                    $activeForm->drawCol($col, $activeForm->inputs[$col], $form, $params);
33
+                }
34
+            }
35
+        }
36
+    }
37
+    $form->end($activeForm->model ? ($activeForm->model->pk() ? 'Сохранить' : 'Создать') : 'Отправить', [], ['activeForm' => $activeForm]);
38
+    ?>
39 39
 </div>
40 40
 <script>
41 41
     inji.onLoad(function () {
Please login to merge, or discard this patch.
system/modules/Ui/widgets/Form/begin.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
     }
9 9
     ?>>
10 10
       <?php
11
-  }
12
-  ?>
11
+    }
12
+    ?>
13 13
   <?= !empty($header) ? "<h1>{$header}</h1>" : ''; ?>
14 14
     
15 15
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/Ui/widgets/Form/end.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,10 +5,10 @@
 block discarded – undo
5 5
         <div class="form-group">
6 6
           <button class ='btn btn-primary' 
7 7
                   <?php
8
-                  foreach ($attributs as $attribute => $value) {
9
-                      echo " {$attribute} = '{$value}' ";
10
-                  }
11
-                  ?>
8
+                    foreach ($attributs as $attribute => $value) {
9
+                        echo " {$attribute} = '{$value}' ";
10
+                    }
11
+                    ?>
12 12
                   ><?= $btnText; ?></button>
13 13
         </div>
14 14
         <?php
Please login to merge, or discard this patch.
system/modules/Ui/objects/Tree.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -23,17 +23,17 @@
 block discarded – undo
23 23
         ?>
24 24
         <ul class="treeview" data-col='tree_path'>
25 25
           <?php
26
-          if (is_string($objectRoot)) {
27
-              $items = $objectRoot::getList(['where' => ['parent_id', 0]]);
28
-          } else {
29
-              $class = get_class($objectRoot);
30
-              $items = $class::getList(['where' => ['parent_id', $objectRoot->pk()], 'order' => $order]);
31
-          }
32
-          $count += count($items);
33
-          foreach ($items as $objectChild) {
34
-              $count+=static::showLi($objectChild, 1, $maxDeep, $hrefFunc, $order);
35
-          }
36
-          ?>
26
+            if (is_string($objectRoot)) {
27
+                $items = $objectRoot::getList(['where' => ['parent_id', 0]]);
28
+            } else {
29
+                $class = get_class($objectRoot);
30
+                $items = $class::getList(['where' => ['parent_id', $objectRoot->pk()], 'order' => $order]);
31
+            }
32
+            $count += count($items);
33
+            foreach ($items as $objectChild) {
34
+                $count+=static::showLi($objectChild, 1, $maxDeep, $hrefFunc, $order);
35
+            }
36
+            ?>
37 37
         </ul>
38 38
         <?php
39 39
         return $count;
Please login to merge, or discard this patch.
system/modules/Sliders/widgets/slider.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -32,19 +32,19 @@  discard block
 block discarded – undo
32 32
         ?>
33 33
         <div class="item <?= !$i ? 'active' : ''; ?>">
34 34
           <?php
35
-          if ($item->link) {
36
-              echo "<a href = '{$item->link}' style = 'display:inline-block;'>";
37
-          }
38
-          ?>
35
+            if ($item->link) {
36
+                echo "<a href = '{$item->link}' style = 'display:inline-block;'>";
37
+            }
38
+            ?>
39 39
           <img src="<?= Statics::file($item->image->path); ?>" alt="<?= $item->name; ?>">
40 40
           <div class="carousel-caption">
41 41
             <?= $item->description; ?>
42 42
           </div>
43 43
           <?php
44
-          if ($item->link) {
45
-              echo "</a>";
46
-          }
47
-          ?>
44
+            if ($item->link) {
45
+                echo "</a>";
46
+            }
47
+            ?>
48 48
         </div>
49 49
         <?php
50 50
         $i++;
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
   </div>
54 54
 
55 55
   <?php
56
-  if (!isset($arrows) || $arrows) {
57
-      ?>
56
+    if (!isset($arrows) || $arrows) {
57
+        ?>
58 58
       <!-- Controls -->
59 59
       <a class="left carousel-control" href="#sliderWidget-<?= $slider->id; ?>" role="button" data-slide="prev">
60 60
         <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
@@ -65,6 +65,6 @@  discard block
 block discarded – undo
65 65
         <span class="sr-only">Next</span>
66 66
       </a>
67 67
       <?php
68
-  }
69
-  ?>
68
+    }
69
+    ?>
70 70
 </div>
71 71
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/Ui/widgets/DataManager/categorys.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,6 +9,6 @@
 block discarded – undo
9 9
 <a href='#' onclick='inji.Ui.dataManagers.get(this).switchCategory(this);return false;' data-index='<?= $model::index(); ?>' data-path ='/' data-id='0'> Корень</a>
10 10
 <div class="categoryTree">
11 11
   <?php
12
-  $dataManager->drawCategorys();
13
-  ?>
12
+    $dataManager->drawCategorys();
13
+    ?>
14 14
 </div>
15 15
\ No newline at end of file
Please login to merge, or discard this patch.