@@ -13,7 +13,7 @@ |
||
| 13 | 13 | } else { |
| 14 | 14 | $dataManager = new \Ui\DataManager($options['relation']['type'] == 'relModel' ? $options['relation']['relModel'] : $options['relation']['model'], 'manager'); |
| 15 | 15 | $dataManager->predraw(); |
| 16 | - echo '<h3>' . $dataManager->table->name . '</h3>'; |
|
| 16 | + echo '<h3>'.$dataManager->table->name.'</h3>'; |
|
| 17 | 17 | echo '<h4 class=" text-muted">Чтобы добавить связи, сначала создайте объект</h4>'; |
| 18 | 18 | echo '<p class=" text-muted">Просто заполните доступные поля и нажмите кнопку внизу формы. После этого дополнительные поля разблокируются</p>'; |
| 19 | 19 | } |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | |
| 2 | 2 | <?php |
| 3 | 3 | echo empty($options['noContainer']) ? '<div class="form-group">' : ''; |
| 4 | -echo $label !== false ? "<label>{$label}" . (!empty($options['required']) ? ' <span class="required-star">*</span>' : '') . "</label>" : ''; |
|
| 4 | +echo $label !== false ? "<label>{$label}".(!empty($options['required']) ? ' <span class="required-star">*</span>' : '')."</label>" : ''; |
|
| 5 | 5 | ?> |
| 6 | 6 | <div class="row"> |
| 7 | 7 | <div class="col-xs-6"> |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -$id = 'activeForm-' . Tools::randomString(); |
|
| 2 | +$id = 'activeForm-'.Tools::randomString(); |
|
| 3 | 3 | $formInputs = $activeForm->inputs; |
| 4 | 4 | foreach ($formInputs as $inputName => $inputParams) { |
| 5 | 5 | if (is_object($inputParams)) { |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | if (!$dataManager->checkAccess()) { |
| 3 | - echo 'you not have access to "' . $dataManager->modelName . '" manager with name: "' . $dataManager->managerName . '"'; |
|
| 3 | + echo 'you not have access to "'.$dataManager->modelName.'" manager with name: "'.$dataManager->managerName.'"'; |
|
| 4 | 4 | return false; |
| 5 | 5 | } |
| 6 | 6 | ?> |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $options = [ |
| 62 | 62 | 'where' => !empty($filters['getRows']['where']) ? $filters['getRows']['where'] : '' |
| 63 | 63 | ]; |
| 64 | - if (isset($cols[$relations[$colInfo['colParams']['relation']]['model']::colPrefix() . 'name'])) { |
|
| 64 | + if (isset($cols[$relations[$colInfo['colParams']['relation']]['model']::colPrefix().'name'])) { |
|
| 65 | 65 | $options['order'] = 'name'; |
| 66 | 66 | } |
| 67 | 67 | $items = $relations[$colInfo['colParams']['relation']]['model']::getList($options); |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | $html = ''; |
| 4 | 4 | foreach ($buttons as $button) { |
| 5 | 5 | if (!empty($button['class'])) { |
| 6 | - $button['class'] = 'btn btn-primary btn-sm ' . $button['class']; |
|
| 6 | + $button['class'] = 'btn btn-primary btn-sm '.$button['class']; |
|
| 7 | 7 | } else { |
| 8 | 8 | $button['class'] = 'btn btn-primary btn-sm'; |
| 9 | 9 | } |
@@ -3,7 +3,7 @@ discard block |
||
| 3 | 3 | 'id' => $dataManager->managerId, |
| 4 | 4 | 'class' => 'dataManager', |
| 5 | 5 | 'data-params' => $params, |
| 6 | - 'data-modelname' => ($model ? get_class($model) : $dataManager->modelName) . ($model && $model->pk() ? ':' . $model->pk() : ''), |
|
| 6 | + 'data-modelname' => ($model ? get_class($model) : $dataManager->modelName).($model && $model->pk() ? ':'.$model->pk() : ''), |
|
| 7 | 7 | 'data-managername' => $dataManager->managerName, |
| 8 | 8 | 'data-cols' => $dataManager->cols, |
| 9 | 9 | 'data-options' => $dataManager->managerOptions |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | 'style' => '' |
| 23 | 23 | ]; |
| 24 | 24 | if (!empty($dataManager->managerOptions['categorys'])) { |
| 25 | - $mainCol['style'].='margin-left:260px;'; |
|
| 25 | + $mainCol['style'] .= 'margin-left:260px;'; |
|
| 26 | 26 | echo '<div class ="pull-left dataManager-categorys" style = "width:250px;">'; |
| 27 | 27 | $this->widget('Ui\DataManager/categorys', compact('dataManager')); |
| 28 | 28 | echo '</div>'; |
@@ -1,28 +1,28 @@ |
||
| 1 | 1 | <ul class="<?= $class; ?>"><?php |
| 2 | 2 | if ($pagesInstance->params['page'] > 1) { |
| 3 | 3 | $getArr['page'] = $pagesInstance->params['page'] - 1; |
| 4 | - echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>←</a></li>"; |
|
| 4 | + echo "<li><a href = '{$pagesInstance->options['url']}?".http_build_query($getArr)."'>←</a></li>"; |
|
| 5 | 5 | } |
| 6 | 6 | |
| 7 | 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']) { |
|
| 8 | + if (($i >= $pagesInstance->params['page'] - 3 && $i <= $pagesInstance->params['page'] + 3) || $i == 1 || $i == $pagesInstance->params['pages']) { |
|
| 9 | 9 | echo '<li '; |
| 10 | 10 | if ($pagesInstance->params['page'] == $i) |
| 11 | 11 | echo 'class = "active"'; |
| 12 | 12 | echo ">"; |
| 13 | 13 | $getArr['page'] = $i; |
| 14 | - echo "<a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>{$i}</a></li>"; |
|
| 14 | + echo "<a href = '{$pagesInstance->options['url']}?".http_build_query($getArr)."'>{$i}</a></li>"; |
|
| 15 | 15 | } |
| 16 | 16 | elseif ($i == $pagesInstance->params['page'] - 7 && $i > 1) { |
| 17 | 17 | $getArr['page'] = round($pagesInstance->params['page'] / 2); |
| 18 | - echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>...</a></li>"; |
|
| 18 | + echo "<li><a href = '{$pagesInstance->options['url']}?".http_build_query($getArr)."'>...</a></li>"; |
|
| 19 | 19 | } elseif ($i == $pagesInstance->params['page'] + 7 && $i < $pagesInstance->params['pages']) { |
| 20 | 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>"; |
|
| 21 | + echo "<li><a href = '{$pagesInstance->options['url']}?".http_build_query($getArr)."'>...</a></li>"; |
|
| 22 | 22 | } |
| 23 | 23 | } |
| 24 | 24 | if ($pagesInstance->params['page'] < $pagesInstance->params['pages']) { |
| 25 | 25 | $getArr['page'] = $pagesInstance->params['page'] + 1; |
| 26 | - echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>→</a></li>"; |
|
| 26 | + echo "<li><a href = '{$pagesInstance->options['url']}?".http_build_query($getArr)."'>→</a></li>"; |
|
| 27 | 27 | } |
| 28 | 28 | ?></ul> |
| 29 | 29 | \ No newline at end of file |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | if (is_array($html)) { |
| 5 | 5 | extract($html); |
| 6 | 6 | } |
| 7 | - echo "<td " . (!empty($class) ? "class='{$class}'" : '') . ">{$html}</td>"; |
|
| 7 | + echo "<td ".(!empty($class) ? "class='{$class}'" : '').">{$html}</td>"; |
|
| 8 | 8 | } |
| 9 | 9 | ?> |
| 10 | 10 | </tr> |
| 11 | 11 | \ No newline at end of file |
@@ -31,9 +31,9 @@ discard block |
||
| 31 | 31 | { |
| 32 | 32 | foreach ($data as $key => $item) { |
| 33 | 33 | if (is_array($item)) { |
| 34 | - $this->genUserDataTree($item, $treeKey ? $treeKey . "[{$key}]" : $key); |
|
| 34 | + $this->genUserDataTree($item, $treeKey ? $treeKey."[{$key}]" : $key); |
|
| 35 | 35 | } else { |
| 36 | - $this->userDataTree[$treeKey ? $treeKey . "[{$key}]" : $key] = $item; |
|
| 36 | + $this->userDataTree[$treeKey ? $treeKey."[{$key}]" : $key] = $item; |
|
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | { |
| 43 | 43 | $params = compact('header', 'options'); |
| 44 | 44 | $params['form'] = $this; |
| 45 | - \App::$cur->view->widget('Ui\\' . $this->options['widgetsDir'] . '/begin', $params); |
|
| 45 | + \App::$cur->view->widget('Ui\\'.$this->options['widgetsDir'].'/begin', $params); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
@@ -65,18 +65,18 @@ discard block |
||
| 65 | 65 | } else { |
| 66 | 66 | $params['options']['class'] .= ' htmleditor'; |
| 67 | 67 | } |
| 68 | - \App::$cur->view->widget('Ui\\' . $this->options['widgetsDir'] . '/textarea', $params); |
|
| 68 | + \App::$cur->view->widget('Ui\\'.$this->options['widgetsDir'].'/textarea', $params); |
|
| 69 | 69 | break; |
| 70 | 70 | case 'map': |
| 71 | 71 | $params = compact('name', 'label', 'options'); |
| 72 | 72 | $params['form'] = $this; |
| 73 | 73 | \App::$cur->libs->loadLib('yandexMap'); |
| 74 | - \App::$cur->view->widget('Ui\\' . $this->options['widgetsDir'] . '/map', $params); |
|
| 74 | + \App::$cur->view->widget('Ui\\'.$this->options['widgetsDir'].'/map', $params); |
|
| 75 | 75 | break; |
| 76 | 76 | default : |
| 77 | 77 | $params = compact('name', 'label', 'options'); |
| 78 | 78 | $params['form'] = $this; |
| 79 | - \App::$cur->view->widget('Ui\\' . $this->options['widgetsDir'] . '/' . $type, $params); |
|
| 79 | + \App::$cur->view->widget('Ui\\'.$this->options['widgetsDir'].'/'.$type, $params); |
|
| 80 | 80 | } |
| 81 | 81 | } |
| 82 | 82 | |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | { |
| 91 | 91 | $params = compact('btnText', 'attributs'); |
| 92 | 92 | $params['form'] = $this; |
| 93 | - \App::$cur->view->widget('Ui\\' . $this->options['widgetsDir'] . '/end', $params); |
|
| 93 | + \App::$cur->view->widget('Ui\\'.$this->options['widgetsDir'].'/end', $params); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | } |