Completed
Push — master ( 8717df...fdbe7f )
by Alexey
05:44
created
system/modules/Ui/objects/Tree.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,13 +23,13 @@
 block discarded – undo
23 23
         ?>
24 24
         <ul class="nav nav-list-categorys" data-col='tree_path'>
25 25
           <?php
26
-          $class = get_class($objectRoot);
27
-          $items = $class::getList(['where' => ['parent_id', $objectRoot->pk()]]);
28
-          $count += count($items);
29
-          foreach ($items as $objectChild) {
30
-              $count+=static::showLi($objectChild, 1, $maxDeep, $hrefFunc);
31
-          }
32
-          ?>
26
+            $class = get_class($objectRoot);
27
+            $items = $class::getList(['where' => ['parent_id', $objectRoot->pk()]]);
28
+            $count += count($items);
29
+            foreach ($items as $objectChild) {
30
+                $count+=static::showLi($objectChild, 1, $maxDeep, $hrefFunc);
31
+            }
32
+            ?>
33 33
         </ul>
34 34
         <?php
35 35
         return $count;
Please login to merge, or discard this patch.
system/modules/Ui/widgets/ActiveForm/ActiveForm.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -3,38 +3,38 @@
 block discarded – undo
3 3
 ?>
4 4
 <div id ='<?= $id; ?>' class="uiActiveForm" data-modelname="<?= $activeForm->modelName; ?>" data-formname="<?= $activeForm->formName; ?>" data-inputs='<?= json_encode($activeForm->inputs); ?>'>
5 5
   <?php
6
-  if ($activeForm->parent === null) {
7
-      $form->action = $activeForm->action;
8
-      $form->begin($activeForm->header, ['onsubmit' => $ajax ? 'inji.Ui.forms.submitAjax(this);return false;' : '']);
9
-  } elseif ($activeForm->header) {
10
-      echo "<h3>{$activeForm->header}</h3>";
11
-  }
12
-  if (empty($activeForm->form['noMapCell'])) {
13
-      foreach ($activeForm->form['map'] as $row) {
14
-          $colSize = 12 / count($row);
15
-          echo "<div class ='row'>";
16
-          foreach ($row as $col) {
17
-              echo "<div class = 'col-sm-{$colSize}'>";
18
-              if ($col) {
19
-                  $activeForm->drawCol($col, $activeForm->inputs[$col], $form, $params);
20
-              }
21
-              echo '</div>';
22
-          }
23
-          echo '</div>';
24
-      }
25
-  } else {
26
-      foreach ($activeForm->form['map'] as $row) {
27
-          foreach ($row as $col) {
28
-              if ($col) {
29
-                  $activeForm->drawCol($col, $activeForm->inputs[$col], $form, $params);
30
-              }
31
-          }
32
-      }
33
-  }
34
-  if ($activeForm->parent === null) {
35
-      $form->end($activeForm->model ? ($activeForm->model->pk() ? 'Сохранить' : 'Создать') : 'Отправить');
36
-  }
37
-  ?>
6
+    if ($activeForm->parent === null) {
7
+        $form->action = $activeForm->action;
8
+        $form->begin($activeForm->header, ['onsubmit' => $ajax ? 'inji.Ui.forms.submitAjax(this);return false;' : '']);
9
+    } elseif ($activeForm->header) {
10
+        echo "<h3>{$activeForm->header}</h3>";
11
+    }
12
+    if (empty($activeForm->form['noMapCell'])) {
13
+        foreach ($activeForm->form['map'] as $row) {
14
+            $colSize = 12 / count($row);
15
+            echo "<div class ='row'>";
16
+            foreach ($row as $col) {
17
+                echo "<div class = 'col-sm-{$colSize}'>";
18
+                if ($col) {
19
+                    $activeForm->drawCol($col, $activeForm->inputs[$col], $form, $params);
20
+                }
21
+                echo '</div>';
22
+            }
23
+            echo '</div>';
24
+        }
25
+    } else {
26
+        foreach ($activeForm->form['map'] as $row) {
27
+            foreach ($row as $col) {
28
+                if ($col) {
29
+                    $activeForm->drawCol($col, $activeForm->inputs[$col], $form, $params);
30
+                }
31
+            }
32
+        }
33
+    }
34
+    if ($activeForm->parent === null) {
35
+        $form->end($activeForm->model ? ($activeForm->model->pk() ? 'Сохранить' : 'Создать') : 'Отправить');
36
+    }
37
+    ?>
38 38
 </div>
39 39
 <script>
40 40
     inji.onLoad(function () {
Please login to merge, or discard this patch.
system/modules/Ui/widgets/DataManager/filters.php 1 patch
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -127,40 +127,40 @@
 block discarded – undo
127 127
                     ?>
128 128
                     <div class="filter_form_field filter_select">
129 129
                       <?php
130
-                      if (!empty($_GET['datamanagerFilters'][$col]['value'])) {
131
-                          $value = 1;
132
-                      } elseif (isset($_GET['datamanagerFilters'][$col]['value'])) {
133
-                          $value = 0;
134
-                      } else {
135
-                          $value = '';
136
-                      }
137
-                      $inputOptions = ['value' => $value, 'values' => [
138
-                              '' => 'Не важно',
139
-                              '1' => $colInfo['label'],
140
-                              '0' => 'Нет'
141
-                          ]
142
-                      ];
143
-                      if (!empty($dataManager->managerOptions['userGroupFilter'][\Users\User::$cur->group_id]['getRows'][$col])) {
130
+                        if (!empty($_GET['datamanagerFilters'][$col]['value'])) {
131
+                            $value = 1;
132
+                        } elseif (isset($_GET['datamanagerFilters'][$col]['value'])) {
133
+                            $value = 0;
134
+                        } else {
135
+                            $value = '';
136
+                        }
137
+                        $inputOptions = ['value' => $value, 'values' => [
138
+                                '' => 'Не важно',
139
+                                '1' => $colInfo['label'],
140
+                                '0' => 'Нет'
141
+                            ]
142
+                        ];
143
+                        if (!empty($dataManager->managerOptions['userGroupFilter'][\Users\User::$cur->group_id]['getRows'][$col])) {
144 144
 
145
-                          $inputOptions['disabled'] = true;
146
-                          $colOptions = $dataManager->managerOptions['userGroupFilter'][\Users\User::$cur->group_id]['getRows'][$col];
147
-                          if (!empty($colOptions['userCol'])) {
148
-                              if (strpos($colOptions['userCol'], ':')) {
149
-                                  $rel = substr($colOptions['userCol'], 0, strpos($colOptions['userCol'], ':'));
150
-                                  $param = substr($colOptions['userCol'], strpos($colOptions['userCol'], ':') + 1);
145
+                            $inputOptions['disabled'] = true;
146
+                            $colOptions = $dataManager->managerOptions['userGroupFilter'][\Users\User::$cur->group_id]['getRows'][$col];
147
+                            if (!empty($colOptions['userCol'])) {
148
+                                if (strpos($colOptions['userCol'], ':')) {
149
+                                    $rel = substr($colOptions['userCol'], 0, strpos($colOptions['userCol'], ':'));
150
+                                    $param = substr($colOptions['userCol'], strpos($colOptions['userCol'], ':') + 1);
151 151
 
152
-                                  $inputOptions['value'] = \Users\User::$cur->$rel->$param;
153
-                              } else {
154
-                                  $this->model->$col = \Users\User::$cur->{$preset['userCol']};
155
-                              }
156
-                          } elseif (!empty($colOptions['value'])) {
152
+                                    $inputOptions['value'] = \Users\User::$cur->$rel->$param;
153
+                                } else {
154
+                                    $this->model->$col = \Users\User::$cur->{$preset['userCol']};
155
+                                }
156
+                            } elseif (!empty($colOptions['value'])) {
157 157
 
158
-                              $inputOptions['value'] = $colOptions['value'];
159
-                          }
160
-                      }
161
-                      $inputOptions['class'] = 'input-sm';
162
-                      $form->input('select', "datamanagerFilters[{$col}][value]", $colInfo['label'], $inputOptions);
163
-                      ?>
158
+                                $inputOptions['value'] = $colOptions['value'];
159
+                            }
160
+                        }
161
+                        $inputOptions['class'] = 'input-sm';
162
+                        $form->input('select', "datamanagerFilters[{$col}][value]", $colInfo['label'], $inputOptions);
163
+                        ?>
164 164
                     </div>
165 165
 
166 166
                     <?php
Please login to merge, or discard this patch.
system/modules/Ui/widgets/Pages/pages.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -1,28 +1,28 @@
 block discarded – undo
1 1
 <ul class="<?= $class; ?>"><?php
2
-  if ($pagesInstance->params['page'] > 1) {
3
-      $getArr['page'] = $pagesInstance->params['page'] - 1;
4
-      echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>&larr;</a></li>";
5
-  }
2
+    if ($pagesInstance->params['page'] > 1) {
3
+        $getArr['page'] = $pagesInstance->params['page'] - 1;
4
+        echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>&larr;</a></li>";
5
+    }
6 6
 
7
-  for ($i = 1; $i <= $pagesInstance->params['pages']; $i++) {
8
-      if (( $i >= $pagesInstance->params['page'] - 3 && $i <= $pagesInstance->params['page'] + 3) || $i == 1 || $i == $pagesInstance->params['pages']) {
9
-          echo '<li ';
10
-          if ($pagesInstance->params['page'] == $i)
11
-              echo 'class = "active"';
12
-          echo ">";
13
-          $getArr['page'] = $i;
14
-          echo "<a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>{$i}</a></li>";
15
-      }
16
-      elseif ($i == $pagesInstance->params['page'] - 7 && $i > 1) {
17
-          $getArr['page'] = round($pagesInstance->params['page'] / 2);
18
-          echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>...</a></li>";
19
-      } elseif ($i == $pagesInstance->params['page'] + 7 && $i < $pagesInstance->params['pages']) {
20
-          $getArr['page'] = round(($pagesInstance->params['pages'] - $pagesInstance->params['page']) / 2) + $pagesInstance->params['page'];
21
-          echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>...</a></li>";
22
-      }
23
-  }
24
-  if ($pagesInstance->params['page'] < $pagesInstance->params['pages']) {
25
-      $getArr['page'] = $pagesInstance->params['page'] + 1;
26
-      echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>&rarr;</a></li>";
27
-  }
28
-  ?></ul>
29 7
\ No newline at end of file
8
+    for ($i = 1; $i <= $pagesInstance->params['pages']; $i++) {
9
+        if (( $i >= $pagesInstance->params['page'] - 3 && $i <= $pagesInstance->params['page'] + 3) || $i == 1 || $i == $pagesInstance->params['pages']) {
10
+            echo '<li ';
11
+            if ($pagesInstance->params['page'] == $i)
12
+                echo 'class = "active"';
13
+            echo ">";
14
+            $getArr['page'] = $i;
15
+            echo "<a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>{$i}</a></li>";
16
+        }
17
+        elseif ($i == $pagesInstance->params['page'] - 7 && $i > 1) {
18
+            $getArr['page'] = round($pagesInstance->params['page'] / 2);
19
+            echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>...</a></li>";
20
+        } elseif ($i == $pagesInstance->params['page'] + 7 && $i < $pagesInstance->params['pages']) {
21
+            $getArr['page'] = round(($pagesInstance->params['pages'] - $pagesInstance->params['page']) / 2) + $pagesInstance->params['page'];
22
+            echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>...</a></li>";
23
+        }
24
+    }
25
+    if ($pagesInstance->params['page'] < $pagesInstance->params['pages']) {
26
+        $getArr['page'] = $pagesInstance->params['page'] + 1;
27
+        echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>&rarr;</a></li>";
28
+    }
29
+    ?></ul>
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/Ui/widgets/Table/body.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -5,19 +5,19 @@
 block discarded – undo
5 5
           <div class ='pull-right'>
6 6
             <div class="btn-group">
7 7
               <?php
8
-              $html = '';
9
-              foreach ($table->buttons as $button) {
10
-                  $html .= '<a class = "btn btn-primary btn-sm"';
11
-                  if (!empty($button['href'])) {
12
-                      $html .= " href = '{$button['href']}'";
13
-                  }
14
-                  if (!empty($button['onclick'])) {
15
-                      $html .= " onclick = '{$button['onclick']}'";
16
-                  }
17
-                  $html .= ">{$button['text']}</a> ";
18
-              }
19
-              echo $html;
20
-              ?>
8
+                $html = '';
9
+                foreach ($table->buttons as $button) {
10
+                    $html .= '<a class = "btn btn-primary btn-sm"';
11
+                    if (!empty($button['href'])) {
12
+                        $html .= " href = '{$button['href']}'";
13
+                    }
14
+                    if (!empty($button['onclick'])) {
15
+                        $html .= " onclick = '{$button['onclick']}'";
16
+                    }
17
+                    $html .= ">{$button['text']}</a> ";
18
+                }
19
+                echo $html;
20
+                ?>
21 21
             </div>
22 22
           </div>
23 23
       <?php } ?>
Please login to merge, or discard this patch.
system/modules/Users/appControllers/UsersController.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -168,20 +168,20 @@
 block discarded – undo
168 168
                 <h5 class="<?= $complete ? 'text-success' : 'text-danger'; ?>"><?= $condition->name(); ?></h5>
169 169
                 <ul>
170 170
                   <?php
171
-                  foreach ($condition->items as $item) {
172
-                      $itemComplete = $item->checkComplete($userId);
173
-                      switch ($item->type) {
174
-                          case 'event':
171
+                    foreach ($condition->items as $item) {
172
+                        $itemComplete = $item->checkComplete($userId);
173
+                        switch ($item->type) {
174
+                            case 'event':
175 175
                               $name = \Events\Event::get($item->value, 'event')->name();
176
-                              break;
177
-                      }
178
-                      ?>
176
+                                break;
177
+                        }
178
+                        ?>
179 179
                       <li> 
180 180
                         <b class="<?= $itemComplete ? 'text-success' : 'text-danger'; ?>"><?= $name; ?> <?= $item->recivedCount($userId); ?></b>/<?= $item->count; ?> <br />
181 181
                       </li>
182 182
                       <?php
183
-                  }
184
-                  ?>
183
+                    }
184
+                    ?>
185 185
                 </ul>
186 186
                 <?php
187 187
             }
Please login to merge, or discard this patch.
system/modules/Users/appControllers/content/cabinet.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -24,20 +24,20 @@
 block discarded – undo
24 24
     </div>
25 25
     <div class="col-sm-9">
26 26
       <?php
27
-      if (empty($activeSection) || empty($sections[$activeSection]['fullWidget'])) {
28
-          foreach ($sections as $section) {
29
-              if (!empty($section['smallWidget'])) {
30
-                  $widgetName = is_array($section['smallWidget']) ? $section['smallWidget']['widget'] : $section['smallWidget'];
31
-                  $widgetSize = !empty($section['smallWidget']['size']) ? $section['smallWidget']['size'] : 1;
32
-                  ?>
27
+        if (empty($activeSection) || empty($sections[$activeSection]['fullWidget'])) {
28
+            foreach ($sections as $section) {
29
+                if (!empty($section['smallWidget'])) {
30
+                    $widgetName = is_array($section['smallWidget']) ? $section['smallWidget']['widget'] : $section['smallWidget'];
31
+                    $widgetSize = !empty($section['smallWidget']['size']) ? $section['smallWidget']['size'] : 1;
32
+                    ?>
33 33
                   <div class="col-sm-<?= $widgetSize * 4; ?>" style="margin-bottom: 10px;"><?= $this->widget($widgetName); ?></div>
34 34
                   <?php
35
-              }
36
-          }
37
-      } else {
38
-          $this->widget($sections[$activeSection]['fullWidget']);
39
-      }
40
-      ?>
35
+                }
36
+            }
37
+        } else {
38
+            $this->widget($sections[$activeSection]['fullWidget']);
39
+        }
40
+        ?>
41 41
     </div>
42 42
   </div>
43 43
 </div>
44 44
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/Users/appControllers/content/registration.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 block discarded – undo
8 8
         <div class="form-group">
9 9
           <label>Регистрация через соц.сети</label><br />
10 10
           <?php
11
-          foreach (Users\Social::getList(['where' => ['active', 1]]) as $social) {
12
-              echo "<a href = '/users/social/auth/{$social->code}'>{$social->name()}</a> ";
13
-          }
14
-          ?>
11
+            foreach (Users\Social::getList(['where' => ['active', 1]]) as $social) {
12
+                echo "<a href = '/users/social/auth/{$social->code}'>{$social->name()}</a> ";
13
+            }
14
+            ?>
15 15
         </div>
16 16
         <?php
17 17
     }
@@ -27,15 +27,15 @@  discard block
 block discarded – undo
27 27
           <?php $form->input('date', 'user_birthday', 'Дата рождения'); ?>
28 28
           <?php $form->input('text', 'user_city', 'Город'); ?>
29 29
           <?php
30
-          if (!empty(App::$cur->users->config['invites'])) {
31
-              ?>
30
+            if (!empty(App::$cur->users->config['invites'])) {
31
+                ?>
32 32
               <div class ='form-group'>
33 33
                 <label><?= !empty(App::$cur->users->config['invitesName']) ? App::$cur->users->config['invitesName'] : 'Код приглашения'; ?></label>
34 34
                 <input type ='text' name ='invite_code' class ='form-control' value ="<?= (isset($_POST['invite_code']) ? $_POST['invite_code'] : ((!empty($_COOKIE['invite_code']) ? $_COOKIE['invite_code'] : ((!empty($_GET['invite_code']) ? $_GET['invite_code'] : ''))))); ?>" />
35 35
               </div>   
36 36
               <?php
37
-          }
38
-          ?>
37
+            }
38
+            ?>
39 39
         </div>
40 40
         <div class="col-sm-6">
41 41
           <div class ='form-group'>
Please login to merge, or discard this patch.
system/modules/Users/models/Group.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Group
4
- *
5
- * @author Alexey Krupskiy <[email protected]>
6
- * @link http://inji.ru/
7
- * @copyright 2015 Alexey Krupskiy
8
- * @license https://github.com/injitools/cms-Inji/blob/master/LICENSE
9
- */
3
+     * Group
4
+     *
5
+     * @author Alexey Krupskiy <[email protected]>
6
+     * @link http://inji.ru/
7
+     * @copyright 2015 Alexey Krupskiy
8
+     * @license https://github.com/injitools/cms-Inji/blob/master/LICENSE
9
+     */
10 10
 namespace Users;
11 11
 
12 12
 class Group extends \Model
Please login to merge, or discard this patch.