@@ -2,10 +2,10 @@ discard block |
||
2 | 2 | <div class="row"> |
3 | 3 | <div class="col-md-3"> |
4 | 4 | <?php |
5 | - \Ui\Tree::ul($category->getRoot(), 0, function($category) { |
|
6 | - echo "<a href='{$category->getHref()}'> {$category->name()}</a>"; |
|
7 | - }); |
|
8 | - ?> |
|
5 | + \Ui\Tree::ul($category->getRoot(), 0, function($category) { |
|
6 | + echo "<a href='{$category->getHref()}'> {$category->name()}</a>"; |
|
7 | + }); |
|
8 | + ?> |
|
9 | 9 | </div> |
10 | 10 | <div class="col-md-9"> |
11 | 11 | <h2 class ='category-name'><?= $category->name; ?></h2> |
@@ -15,9 +15,9 @@ discard block |
||
15 | 15 | <div class ="category-materials"> |
16 | 16 | <div class ="row"> |
17 | 17 | <?php |
18 | - $i = 0; |
|
19 | - foreach ($materials as $material) { |
|
20 | - ?> |
|
18 | + $i = 0; |
|
19 | + foreach ($materials as $material) { |
|
20 | + ?> |
|
21 | 21 | <div class = "col-sm-6 category-material"> |
22 | 22 | <a class="category-material-name" href ="<?= $material->getHref(); ?>"><h3><?= $material->name; ?></h3></a> |
23 | 23 | <div class="category-material-preview"><?= $material->preview; ?></div> |
@@ -26,11 +26,11 @@ discard block |
||
26 | 26 | </div> |
27 | 27 | </div> |
28 | 28 | <?php |
29 | - if (!( ++$i % 2)) { |
|
30 | - echo '</div><hr /><div class ="row">'; |
|
31 | - } |
|
32 | - } |
|
33 | - ?> |
|
29 | + if (!( ++$i % 2)) { |
|
30 | + echo '</div><hr /><div class ="row">'; |
|
31 | + } |
|
32 | + } |
|
33 | + ?> |
|
34 | 34 | </div> |
35 | 35 | <?php |
36 | 36 | $pages->draw(); |
@@ -4,17 +4,17 @@ |
||
4 | 4 | <?= Ui\FastEdit::block($material, 'text', null, true); ?> |
5 | 5 | </div> |
6 | 6 | <?php |
7 | - if ($material->links) { |
|
8 | - echo '<ul class = "material-links">'; |
|
9 | - foreach ($material->links as $materialLink) { |
|
10 | - $href = $materialLink->linkedMaterial->alias; |
|
11 | - if ($href == '') { |
|
12 | - $href = '/'; |
|
13 | - } |
|
14 | - $name = $materialLink->name ? $materialLink->name : $materialLink->linkedMaterial->name; |
|
15 | - echo "<li><a href = '{$href}'>{$name}</a></li>"; |
|
16 | - } |
|
17 | - echo '</ul>'; |
|
18 | - } |
|
19 | - ?> |
|
7 | + if ($material->links) { |
|
8 | + echo '<ul class = "material-links">'; |
|
9 | + foreach ($material->links as $materialLink) { |
|
10 | + $href = $materialLink->linkedMaterial->alias; |
|
11 | + if ($href == '') { |
|
12 | + $href = '/'; |
|
13 | + } |
|
14 | + $name = $materialLink->name ? $materialLink->name : $materialLink->linkedMaterial->name; |
|
15 | + echo "<li><a href = '{$href}'>{$name}</a></li>"; |
|
16 | + } |
|
17 | + echo '</ul>'; |
|
18 | + } |
|
19 | + ?> |
|
20 | 20 | </div> |
21 | 21 | \ No newline at end of file |
@@ -2,11 +2,11 @@ discard block |
||
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 | <h2 class="material-name"><?= $material->name; ?></h2> |
@@ -14,19 +14,19 @@ discard block |
||
14 | 14 | <?= Ui\FastEdit::block($material, 'text', null, true); ?> |
15 | 15 | </div> |
16 | 16 | <?php |
17 | - if ($material->links) { |
|
18 | - echo '<ul class = "material-links">'; |
|
19 | - foreach ($material->links as $materialLink) { |
|
20 | - $href = $materialLink->linkedMaterial->alias; |
|
21 | - if ($href == '') { |
|
22 | - $href = '/'; |
|
23 | - } |
|
24 | - $name = $materialLink->name ? $materialLink->name : $materialLink->linkedMaterial->name; |
|
25 | - echo "<li><a href = '{$href}'>{$name}</a></li>"; |
|
26 | - } |
|
27 | - echo '</ul>'; |
|
28 | - } |
|
29 | - ?> |
|
17 | + if ($material->links) { |
|
18 | + echo '<ul class = "material-links">'; |
|
19 | + foreach ($material->links as $materialLink) { |
|
20 | + $href = $materialLink->linkedMaterial->alias; |
|
21 | + if ($href == '') { |
|
22 | + $href = '/'; |
|
23 | + } |
|
24 | + $name = $materialLink->name ? $materialLink->name : $materialLink->linkedMaterial->name; |
|
25 | + echo "<li><a href = '{$href}'>{$name}</a></li>"; |
|
26 | + } |
|
27 | + echo '</ul>'; |
|
28 | + } |
|
29 | + ?> |
|
30 | 30 | </div> |
31 | 31 | </div> |
32 | 32 | </div> |
33 | 33 | \ No newline at end of file |
@@ -131,7 +131,7 @@ |
||
131 | 131 | if ($treePath) { |
132 | 132 | $categorys = Category::getList(['where' => ['id', implode(',', $treePath), 'IN']]); |
133 | 133 | foreach ($categorys as $category) { |
134 | - $href .="/{$category->alias}"; |
|
134 | + $href .= "/{$category->alias}"; |
|
135 | 135 | } |
136 | 136 | } |
137 | 137 | return $href . "/" . ($this->alias ? $this->alias : $this->pk()); |
@@ -7,16 +7,18 @@ |
||
7 | 7 | $code = 'main'; |
8 | 8 | } |
9 | 9 | $menu = \Menu\Menu::get($code, 'code'); |
10 | -if ($menu) |
|
10 | +if ($menu) { |
|
11 | 11 | foreach ($menu->items(['order' => ['weight', 'ASC']]) as $item) { |
12 | 12 | $href = $item->href; |
13 | +} |
|
13 | 14 | if ($item->type == 'materialCategory') { |
14 | 15 | $category = \Materials\Category::get($item->aditional); |
15 | 16 | $href = $category->alias ? "/materials/{$category->alias}" : "/materials/category/{$category->id}"; |
16 | 17 | } |
17 | - if (urldecode($_SERVER['REQUEST_URI']) == $href) |
|
18 | - $active = ' class = "active" '; |
|
19 | - else |
|
20 | - $active = ''; |
|
18 | + if (urldecode($_SERVER['REQUEST_URI']) == $href) { |
|
19 | + $active = ' class = "active" '; |
|
20 | + } else { |
|
21 | + $active = ''; |
|
22 | + } |
|
21 | 23 | echo "<li {$active}><a href = '{$href}'>{$item->name}</a></li>"; |
22 | 24 | } |
@@ -49,7 +49,7 @@ |
||
49 | 49 | if (empty($objectsCols[$param->object_id])) { |
50 | 50 | $modelName = $param->object->model; |
51 | 51 | foreach (array_keys($modelName::$cols) as $colName) { |
52 | - $objectsCols[$param->object_id][$colName] = !empty($modelName::$labels[$colName])?$modelName::$labels[$colName]:$colName; |
|
52 | + $objectsCols[$param->object_id][$colName] = !empty($modelName::$labels[$colName]) ? $modelName::$labels[$colName] : $colName; |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 | $modelName = $param->object->model; |
@@ -6,8 +6,9 @@ |
||
6 | 6 | $systemModules = array_slice(scandir(INJI_SYSTEM_DIR . '/modules'), 2); |
7 | 7 | foreach ($systemModules as $module) { |
8 | 8 | $info = Module::getInfo($module); |
9 | - if (!$info || isset($modules[$module])) |
|
10 | - continue; |
|
9 | + if (!$info || isset($modules[$module])) { |
|
10 | + continue; |
|
11 | + } |
|
11 | 12 | ?> |
12 | 13 | <div class ="form-group"> |
13 | 14 | <div class="checkbox"> |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | if (empty($blocks[$block->wallet->currency_id])) { |
103 | 103 | $blocks[$block->wallet->currency_id] = $block->amount; |
104 | 104 | } else { |
105 | - $blocks[$block->wallet->currency_id]+= $block->amount; |
|
105 | + $blocks[$block->wallet->currency_id] += $block->amount; |
|
106 | 106 | } |
107 | 107 | } |
108 | 108 | return $blocks; |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | $recives = \Money\Reward\Recive::getList(['where' => [['user_id', $user->id], ['reward_id', $reward->id]]]); |
185 | 185 | $amount = 0; |
186 | 186 | foreach ($recives as $recive) { |
187 | - $amount+=$recive->amount; |
|
187 | + $amount += $recive->amount; |
|
188 | 188 | } |
189 | 189 | if ($amount >= $reward->peruser) { |
190 | 190 | continue; |
@@ -8,12 +8,12 @@ discard block |
||
8 | 8 | <th></th> |
9 | 9 | </tr> |
10 | 10 | <?php |
11 | - foreach ($merchants as $merchant) { |
|
12 | - $allowCurrencies = $merchant->allowCurrencies($pay); |
|
13 | - if (!$allowCurrencies) { |
|
14 | - continue; |
|
15 | - } |
|
16 | - ?> |
|
11 | + foreach ($merchants as $merchant) { |
|
12 | + $allowCurrencies = $merchant->allowCurrencies($pay); |
|
13 | + if (!$allowCurrencies) { |
|
14 | + continue; |
|
15 | + } |
|
16 | + ?> |
|
17 | 17 | <tr> |
18 | 18 | <td> |
19 | 19 | <img src="<?= Statics::file($merchant->image ? $merchant->image->path : '/static/system/images/no-image.png', '150x150'); ?>" class="img-responsive" /> |
@@ -21,21 +21,21 @@ discard block |
||
21 | 21 | </td> |
22 | 22 | <td> |
23 | 23 | <?php |
24 | - foreach ($allowCurrencies as $allowCurrency) { |
|
25 | - $className = 'Money\MerchantHelper\\' . $merchant->object_name; |
|
26 | - $sum = $className::getFinalSum($pay, $allowCurrency); |
|
27 | - ?> |
|
24 | + foreach ($allowCurrencies as $allowCurrency) { |
|
25 | + $className = 'Money\MerchantHelper\\' . $merchant->object_name; |
|
26 | + $sum = $className::getFinalSum($pay, $allowCurrency); |
|
27 | + ?> |
|
28 | 28 | <b><?= $allowCurrency['currency']->name(); ?></b> |
29 | 29 | <a class="btn btn-primary" href ="/money/merchants/go/<?= $pay->id; ?>/<?= $merchant->id; ?>/<?= $allowCurrency['currency']->id; ?>">Оплатить <?= $sum; ?> <?= $allowCurrency['currency']->acronym(); ?></a> |
30 | 30 | <?php |
31 | - } |
|
32 | - ?> |
|
31 | + } |
|
32 | + ?> |
|
33 | 33 | </td> |
34 | 34 | <td width="100%"> |
35 | 35 | <?= $merchant->previewImage ? '<img src="' . $merchant->previewImage->path . '" class="img-responsive" />' : ''; ?> |
36 | 36 | </td> |
37 | 37 | </tr> |
38 | 38 | <?php |
39 | - } |
|
40 | - ?> |
|
39 | + } |
|
40 | + ?> |
|
41 | 41 | </table> |
42 | 42 | \ No newline at end of file |