Completed
Push — master ( e7c2e1...989877 )
by Alexey
05:39
created
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.
system/modules/Widgets/appAdminControllers/content/widgetChooser.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@
 block discarded – undo
29 29
 <select class ='form-control' id = 'widgetChooser' onchange="selectChange(this);">
30 30
   <option value = ''>Выберите виджет</option>
31 31
   <?php
32
-  foreach ($widgets as $code => $options) {
33
-      $name = is_string($options) ? $options : $options['name'];
34
-      echo "<option value = '{$code}' data-filename='{$code}'>{$name}</option>";
35
-  }
36
-  ?>
32
+    foreach ($widgets as $code => $options) {
33
+        $name = is_string($options) ? $options : $options['name'];
34
+        echo "<option value = '{$code}' data-filename='{$code}'>{$name}</option>";
35
+    }
36
+    ?>
37 37
 </select>
38 38
 <?php
39 39
 foreach ($widgets as $code => $options) {
Please login to merge, or discard this patch.
system/modules/Ecommerce/appControllers/content/Cart/orderDetail.php 1 patch
Indentation   +87 added lines, -87 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@  discard block
 block discarded – undo
8 8
         </tr>
9 9
       </thead>
10 10
       <?php
11
-      $orderDeatilCols = [
12
-          'id' => '№ Заказа',
13
-          'complete_data' => 'Дата заказа'
14
-      ];
15
-      ?>
11
+        $orderDeatilCols = [
12
+            'id' => '№ Заказа',
13
+            'complete_data' => 'Дата заказа'
14
+        ];
15
+        ?>
16 16
       <tbody>
17 17
         <tr>
18 18
           <td class="text-left" style="width: 50%;">              
@@ -65,91 +65,91 @@  discard block
 block discarded – undo
65 65
         </thead>
66 66
         <tbody>
67 67
           <?php
68
-          $sums = [];
69
-          foreach ($cart->cartItems as $cartItem) {
70
-              $item = $cartItem->item;
71
-              $itemName = $item->name();
72
-              if (!isset($sums[$cartItem->price->currency_id])) {
73
-                  $sums[$cartItem->price->currency_id] = $cartItem->price->price;
74
-              } else {
75
-                  $sums[$cartItem->price->currency_id] += $cartItem->price->price;
76
-              }
77
-              ?>
68
+            $sums = [];
69
+            foreach ($cart->cartItems as $cartItem) {
70
+                $item = $cartItem->item;
71
+                $itemName = $item->name();
72
+                if (!isset($sums[$cartItem->price->currency_id])) {
73
+                    $sums[$cartItem->price->currency_id] = $cartItem->price->price;
74
+                } else {
75
+                    $sums[$cartItem->price->currency_id] += $cartItem->price->price;
76
+                }
77
+                ?>
78 78
               <tr>
79 79
                 <td class="text-left"><?= $itemName; ?></td>
80 80
                 <td class="text-right"><?= $cartItem->count; ?></td>
81 81
                 <td class="text-right"><?= $cartItem->price->price; ?> 
82 82
                   <?php
83
-                  if (App::$cur->money) {
84
-                      $currency = Money\Currency::get($cartItem->price->currency_id);
85
-                      if ($currency) {
86
-                          echo $currency->acronym();
87
-                      } else {
88
-                          echo 'руб.';
89
-                      }
90
-                  } else {
91
-                      echo 'руб.';
92
-                  }
93
-                  ?></td>
83
+                    if (App::$cur->money) {
84
+                        $currency = Money\Currency::get($cartItem->price->currency_id);
85
+                        if ($currency) {
86
+                            echo $currency->acronym();
87
+                        } else {
88
+                            echo 'руб.';
89
+                        }
90
+                    } else {
91
+                        echo 'руб.';
92
+                    }
93
+                    ?></td>
94 94
                 <td class="text-right"><?= ($cartItem->price->price * $cartItem->count); ?>
95 95
                   <?php
96
-                  if (App::$cur->money) {
97
-                      $currency = Money\Currency::get($cartItem->price->currency_id);
98
-                      if ($currency) {
99
-                          echo $currency->acronym();
100
-                      } else {
101
-                          echo 'руб.';
102
-                      }
103
-                  } else {
104
-                      echo 'руб.';
105
-                  }
106
-                  ?></td>
96
+                    if (App::$cur->money) {
97
+                        $currency = Money\Currency::get($cartItem->price->currency_id);
98
+                        if ($currency) {
99
+                            echo $currency->acronym();
100
+                        } else {
101
+                            echo 'руб.';
102
+                        }
103
+                    } else {
104
+                        echo 'руб.';
105
+                    }
106
+                    ?></td>
107 107
                 <td class="text-right" style="white-space: nowrap;">
108 108
                   <a onclick = 'inji.Ecommerce.Cart.addItem(<?= $item->getPrice()->id; ?>, 1);
109 109
                           return false;' data-original-title="Добавить в корзину" href="#" data-toggle="tooltip" title="" class="btn btn-primary"><i class="glyphicon glyphicon-shopping-cart"></i></a>
110 110
               </tr>
111 111
               <?php
112
-          }
113
-          ?>
112
+            }
113
+            ?>
114 114
         </tbody>
115 115
         <tfoot>
116 116
           <tr>
117 117
             <td colspan="2"></td>
118 118
             <td class="text-right"><b>Сумма</b></td>
119 119
             <td class="text-right"><?php
120
-              foreach ($sums as $currency_id => $sum) {
121
-                  if (!$sum) {
122
-                      continue;
123
-                  }
124
-                  echo number_format($sum, 2, '.', ' ');
125
-                  if (App::$cur->money) {
126
-                      $currency = Money\Currency::get($currency_id);
127
-                      if ($currency) {
128
-                          echo '&nbsp;' . $currency->acronym();
129
-                      } else {
130
-                          echo '&nbsp;руб.';
131
-                      }
132
-                  } else {
133
-                      echo '&nbsp;руб.';
134
-                  }
135
-                  echo '<br />';
136
-              }
137
-              ?></td>
120
+                foreach ($sums as $currency_id => $sum) {
121
+                    if (!$sum) {
122
+                        continue;
123
+                    }
124
+                    echo number_format($sum, 2, '.', ' ');
125
+                    if (App::$cur->money) {
126
+                        $currency = Money\Currency::get($currency_id);
127
+                        if ($currency) {
128
+                            echo '&nbsp;' . $currency->acronym();
129
+                        } else {
130
+                            echo '&nbsp;руб.';
131
+                        }
132
+                    } else {
133
+                        echo '&nbsp;руб.';
134
+                    }
135
+                    echo '<br />';
136
+                }
137
+                ?></td>
138 138
             <td></td>
139 139
           </tr>
140 140
           <?php
141
-          $deliveryCurrency = $cart->delivery ? $cart->delivery->currency_id : 0;
142
-          $deliveryPrice = $cart->delivery->price;
143
-          if (!isset($sums[$deliveryCurrency])) {
144
-              $sums[$deliveryCurrency] = $deliveryPrice;
145
-          } else {
146
-              $sums[$deliveryCurrency] += $deliveryPrice;
147
-          }
148
-          $delCurrency = false;
149
-          if (App::$cur->money) {
150
-              $delCurrency = Money\Currency::get($deliveryPrice);
151
-          }
152
-          ?>
141
+            $deliveryCurrency = $cart->delivery ? $cart->delivery->currency_id : 0;
142
+            $deliveryPrice = $cart->delivery->price;
143
+            if (!isset($sums[$deliveryCurrency])) {
144
+                $sums[$deliveryCurrency] = $deliveryPrice;
145
+            } else {
146
+                $sums[$deliveryCurrency] += $deliveryPrice;
147
+            }
148
+            $delCurrency = false;
149
+            if (App::$cur->money) {
150
+                $delCurrency = Money\Currency::get($deliveryPrice);
151
+            }
152
+            ?>
153 153
           <tr>
154 154
             <td colspan="2"></td>
155 155
             <td class="text-right"><b><?= $cart->delivery ? $cart->delivery->name : 'Доставка'; ?></b></td>
@@ -160,24 +160,24 @@  discard block
 block discarded – undo
160 160
             <td colspan="2"></td>
161 161
             <td class="text-right"><b>Итого</b></td>
162 162
             <td class="text-right"><?php
163
-              foreach ($sums as $currency_id => $sum) {
164
-                  if (!$sum) {
165
-                      continue;
166
-                  }
167
-                  echo number_format($sum, 2, '.', ' ');
168
-                  if (App::$cur->money) {
169
-                      $currency = Money\Currency::get($currency_id);
170
-                      if ($currency) {
171
-                          echo '&nbsp;' . $currency->acronym();
172
-                      } else {
173
-                          echo '&nbsp;руб.';
174
-                      }
175
-                  } else {
176
-                      echo '&nbsp;руб.';
177
-                  }
178
-                  echo '<br />';
179
-              }
180
-              ?></td>
163
+                foreach ($sums as $currency_id => $sum) {
164
+                    if (!$sum) {
165
+                        continue;
166
+                    }
167
+                    echo number_format($sum, 2, '.', ' ');
168
+                    if (App::$cur->money) {
169
+                        $currency = Money\Currency::get($currency_id);
170
+                        if ($currency) {
171
+                            echo '&nbsp;' . $currency->acronym();
172
+                        } else {
173
+                            echo '&nbsp;руб.';
174
+                        }
175
+                    } else {
176
+                        echo '&nbsp;руб.';
177
+                    }
178
+                    echo '<br />';
179
+                }
180
+                ?></td>
181 181
             <td></td>
182 182
           </tr>
183 183
         </tfoot>
Please login to merge, or discard this patch.