@@ -1,12 +1,12 @@ |
||
1 | 1 | <div class = 'callbacks'> |
2 | 2 | <h1>Отзывы</h1> |
3 | 3 | <?php |
4 | - $callbacks = Callbacks\Callback::getList(['where' => ['view', '1'], 'order' => ['weight', 'asc']]); |
|
5 | - foreach ($callbacks as $callback) { |
|
6 | - echo "<h3>{$callback->name}<div class = 'time'>{$callback->date_create}</div></h3>"; |
|
7 | - echo "<p>" . nl2br($callback->text) . "</p>"; |
|
8 | - } |
|
9 | - ?> |
|
4 | + $callbacks = Callbacks\Callback::getList(['where' => ['view', '1'], 'order' => ['weight', 'asc']]); |
|
5 | + foreach ($callbacks as $callback) { |
|
6 | + echo "<h3>{$callback->name}<div class = 'time'>{$callback->date_create}</div></h3>"; |
|
7 | + echo "<p>" . nl2br($callback->text) . "</p>"; |
|
8 | + } |
|
9 | + ?> |
|
10 | 10 | </div> |
11 | 11 | <h3>Можете и вы в свободной форме оставить свой отзыв</h3> |
12 | 12 | <?php |
@@ -17,9 +17,9 @@ |
||
17 | 17 | <input class ="form-control" type = 'text' name = 'site_description' value = '<?php if (!empty(\App::$primary->config['site']['description'])) echo \App::$primary->config['site']['description']; ?>' /> |
18 | 18 | </div> |
19 | 19 | <?php |
20 | - $form = new Ui\Form(); |
|
21 | - $form->input('image', 'site_logo', 'Лого сайта', ['value' => !empty(\App::$primary->config['site']['site_logo']) ? \App::$primary->config['site']['site_logo'] : '']); |
|
22 | - ?> |
|
20 | + $form = new Ui\Form(); |
|
21 | + $form->input('image', 'site_logo', 'Лого сайта', ['value' => !empty(\App::$primary->config['site']['site_logo']) ? \App::$primary->config['site']['site_logo'] : '']); |
|
22 | + ?> |
|
23 | 23 | <h2>Дополнительные мета теги</h2> |
24 | 24 | <div class ="form-group"> |
25 | 25 | <button type = 'button' class = 'btn btn-primary ' onclick = 'addMeta()'>Добавить <i class = 'glyphicon glyphicon-plus'></i></button> |
@@ -3,14 +3,14 @@ discard block |
||
3 | 3 | <ul class="nav nav-tabs" role="tablist"> |
4 | 4 | <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">Настройки</a></li> |
5 | 5 | <?php |
6 | - $dataManagers = []; |
|
7 | - foreach ($managers as $manager) { |
|
8 | - $dataManager = new Ui\DataManager($manager); |
|
9 | - $dataManagers[$manager] = $dataManager; |
|
10 | - $code = 'tab_' . str_replace('\\', '_', $manager); |
|
11 | - echo "<li role='presentation'><a href='#{$code}' aria-controls='{$code}' role='tab' data-toggle='tab'>{$dataManager->name}</a></li>"; |
|
12 | - } |
|
13 | - ?> |
|
6 | + $dataManagers = []; |
|
7 | + foreach ($managers as $manager) { |
|
8 | + $dataManager = new Ui\DataManager($manager); |
|
9 | + $dataManagers[$manager] = $dataManager; |
|
10 | + $code = 'tab_' . str_replace('\\', '_', $manager); |
|
11 | + echo "<li role='presentation'><a href='#{$code}' aria-controls='{$code}' role='tab' data-toggle='tab'>{$dataManager->name}</a></li>"; |
|
12 | + } |
|
13 | + ?> |
|
14 | 14 | </ul> |
15 | 15 | <div class="tab-content"> |
16 | 16 | <div role="tabpanel" class="tab-pane fade in active" id="home"> |
@@ -52,17 +52,17 @@ discard block |
||
52 | 52 | </script> |
53 | 53 | </div> |
54 | 54 | <?php |
55 | - foreach ($dataManagers as $manager => $dataManager) { |
|
56 | - $code = 'tab_' . str_replace('\\', '_', $manager); |
|
57 | - ?> |
|
55 | + foreach ($dataManagers as $manager => $dataManager) { |
|
56 | + $code = 'tab_' . str_replace('\\', '_', $manager); |
|
57 | + ?> |
|
58 | 58 | <div role="tabpanel" class="tab-pane fade" id="<?= $code; ?>"> |
59 | 59 | <?php |
60 | 60 | $dataManager->draw(); |
61 | 61 | ?> |
62 | 62 | </div> |
63 | 63 | <?php |
64 | - } |
|
65 | - ?> |
|
64 | + } |
|
65 | + ?> |
|
66 | 66 | </div> |
67 | 67 | |
68 | 68 |
@@ -50,12 +50,12 @@ |
||
50 | 50 | <td> |
51 | 51 | <ul> |
52 | 52 | <?php |
53 | - foreach ($card->levels as $level) { |
|
54 | - ?> |
|
53 | + foreach ($card->levels as $level) { |
|
54 | + ?> |
|
55 | 55 | <li><?= $level->name; ?> - <?= $level->discount->name; ?></li> |
56 | 56 | <?php |
57 | - } |
|
58 | - ?> |
|
57 | + } |
|
58 | + ?> |
|
59 | 59 | </ul> |
60 | 60 | </td> |
61 | 61 | <td> |
@@ -19,87 +19,87 @@ discard block |
||
19 | 19 | </thead> |
20 | 20 | <tbody> |
21 | 21 | <?php |
22 | - foreach ($carts as $cart) { |
|
23 | - $sums = []; |
|
24 | - foreach ($cart->cartItems as $cartItem) { |
|
25 | - $currency_id = $cartItem->price && $cartItem->price->currency ? $cartItem->price->currency->id : (!empty(\App::$cur->ecommerce->config['defaultCurrency']) ? \App::$cur->ecommerce->config['defaultCurrency'] : 0); |
|
26 | - if (empty($sums[$currency_id])) { |
|
27 | - $sums[$currency_id] = $cartItem->final_price * $cartItem->count; |
|
28 | - } else { |
|
29 | - $sums[$currency_id] += $cartItem->final_price * $cartItem->count; |
|
30 | - } |
|
31 | - } |
|
32 | - if ($cart->delivery && $cart->delivery->price) { |
|
33 | - $currency_id = $cart->delivery->currency_id; |
|
34 | - if (empty($sums[$currency_id])) { |
|
35 | - $sums[$currency_id] = $cart->delivery->price; |
|
36 | - } else { |
|
37 | - $sums[$currency_id] += $cart->delivery->price; |
|
38 | - } |
|
39 | - } |
|
40 | - foreach ($cart->extras as $extra) { |
|
41 | - $currency_id = $extra->currency ? $extra->currency->id : \App::$cur->ecommerce->config['defaultCurrency']; |
|
42 | - if (empty($sums[$currency_id])) { |
|
43 | - $sums[$currency_id] = $extra->price * $extra->count; |
|
44 | - } else { |
|
45 | - $sums[$currency_id] += $extra->price * $extra->count; |
|
46 | - } |
|
47 | - } |
|
48 | - ?> |
|
22 | + foreach ($carts as $cart) { |
|
23 | + $sums = []; |
|
24 | + foreach ($cart->cartItems as $cartItem) { |
|
25 | + $currency_id = $cartItem->price && $cartItem->price->currency ? $cartItem->price->currency->id : (!empty(\App::$cur->ecommerce->config['defaultCurrency']) ? \App::$cur->ecommerce->config['defaultCurrency'] : 0); |
|
26 | + if (empty($sums[$currency_id])) { |
|
27 | + $sums[$currency_id] = $cartItem->final_price * $cartItem->count; |
|
28 | + } else { |
|
29 | + $sums[$currency_id] += $cartItem->final_price * $cartItem->count; |
|
30 | + } |
|
31 | + } |
|
32 | + if ($cart->delivery && $cart->delivery->price) { |
|
33 | + $currency_id = $cart->delivery->currency_id; |
|
34 | + if (empty($sums[$currency_id])) { |
|
35 | + $sums[$currency_id] = $cart->delivery->price; |
|
36 | + } else { |
|
37 | + $sums[$currency_id] += $cart->delivery->price; |
|
38 | + } |
|
39 | + } |
|
40 | + foreach ($cart->extras as $extra) { |
|
41 | + $currency_id = $extra->currency ? $extra->currency->id : \App::$cur->ecommerce->config['defaultCurrency']; |
|
42 | + if (empty($sums[$currency_id])) { |
|
43 | + $sums[$currency_id] = $extra->price * $extra->count; |
|
44 | + } else { |
|
45 | + $sums[$currency_id] += $extra->price * $extra->count; |
|
46 | + } |
|
47 | + } |
|
48 | + ?> |
|
49 | 49 | <tr> |
50 | 50 | <td class="text-right">#<?= $cart->id; ?></td> |
51 | 51 | <td class="text-left"><?= $cart->status ? $cart->status->name : 'Наполняется'; ?></td> |
52 | 52 | <td class="text-right"><?= count($cart->cartItems); ?></td> |
53 | 53 | <td class="text-right"><?php |
54 | - if ($sums) { |
|
55 | - foreach ($sums as $currency_id => $sum) { |
|
56 | - if (!$sum) { |
|
57 | - continue; |
|
58 | - } |
|
59 | - echo number_format($sum, 2, '.', ' '); |
|
60 | - if (App::$cur->money) { |
|
61 | - $currency = Money\Currency::get($currency_id); |
|
62 | - if ($currency) { |
|
63 | - echo ' ' . $currency->acronym(); |
|
64 | - } else { |
|
65 | - echo ' р.'; |
|
66 | - } |
|
67 | - } else { |
|
68 | - echo ' р.'; |
|
69 | - } |
|
70 | - echo '<br />'; |
|
71 | - } |
|
72 | - } |
|
73 | - ?></td> |
|
54 | + if ($sums) { |
|
55 | + foreach ($sums as $currency_id => $sum) { |
|
56 | + if (!$sum) { |
|
57 | + continue; |
|
58 | + } |
|
59 | + echo number_format($sum, 2, '.', ' '); |
|
60 | + if (App::$cur->money) { |
|
61 | + $currency = Money\Currency::get($currency_id); |
|
62 | + if ($currency) { |
|
63 | + echo ' ' . $currency->acronym(); |
|
64 | + } else { |
|
65 | + echo ' р.'; |
|
66 | + } |
|
67 | + } else { |
|
68 | + echo ' р.'; |
|
69 | + } |
|
70 | + echo '<br />'; |
|
71 | + } |
|
72 | + } |
|
73 | + ?></td> |
|
74 | 74 | <td class="text-left"><?= $cart->complete_data; ?></td> |
75 | 75 | <td><?php |
76 | - if ($cart->payed) { |
|
77 | - echo 'Оплачено'; |
|
78 | - } elseif (!App::$cur->money) { |
|
79 | - echo 'Не оплачено'; |
|
80 | - } else { |
|
81 | - $handlers = App::$cur->ecommerce->getSnippets('payTypeHandler'); |
|
82 | - $redirect = ['/ecommerce/cart/success']; |
|
83 | - if ($cart->payType && !empty($handlers[$cart->payType->handler]['handler'])) { |
|
84 | - $newRedirect = $handlers[$cart->payType->handler]['handler']($cart); |
|
85 | - } |
|
86 | - if (!empty($newRedirect[0])) { |
|
87 | - echo '<a class="btn btn-warning btn-sm" href = "' . $newRedirect[0] . '">Оплатить</a>'; |
|
88 | - } else { |
|
89 | - echo 'Не оплачено'; |
|
90 | - } |
|
91 | - } |
|
92 | - ?></td> |
|
76 | + if ($cart->payed) { |
|
77 | + echo 'Оплачено'; |
|
78 | + } elseif (!App::$cur->money) { |
|
79 | + echo 'Не оплачено'; |
|
80 | + } else { |
|
81 | + $handlers = App::$cur->ecommerce->getSnippets('payTypeHandler'); |
|
82 | + $redirect = ['/ecommerce/cart/success']; |
|
83 | + if ($cart->payType && !empty($handlers[$cart->payType->handler]['handler'])) { |
|
84 | + $newRedirect = $handlers[$cart->payType->handler]['handler']($cart); |
|
85 | + } |
|
86 | + if (!empty($newRedirect[0])) { |
|
87 | + echo '<a class="btn btn-warning btn-sm" href = "' . $newRedirect[0] . '">Оплатить</a>'; |
|
88 | + } else { |
|
89 | + echo 'Не оплачено'; |
|
90 | + } |
|
91 | + } |
|
92 | + ?></td> |
|
93 | 93 | <td class="text-right"> |
94 | 94 | <?php |
95 | - if ($cart->cart_status_id < 2) { |
|
96 | - ?> |
|
95 | + if ($cart->cart_status_id < 2) { |
|
96 | + ?> |
|
97 | 97 | <a title="Продолжить покупки" href="/ecommerce/cart/continue/<?= $cart->id; ?>" data-toggle="tooltip" title="" class="btn btn-success btn-sm"><i class="glyphicon glyphicon-chevron-right"></i></a> |
98 | 98 | <a title="Удалить заказ" onclick="return confirm('Вы уверены?')" href="/ecommerce/cart/delete/<?= $cart->id; ?>" data-toggle="tooltip" title="" class="btn btn-danger btn-sm"><i class="glyphicon glyphicon-trash"></i></a> |
99 | 99 | <?php |
100 | - } |
|
101 | - if ($cart->cart_status_id >= 2) { |
|
102 | - ?> |
|
100 | + } |
|
101 | + if ($cart->cart_status_id >= 2) { |
|
102 | + ?> |
|
103 | 103 | <a title="Просмотр" href="/ecommerce/cart/orderDetail/<?= $cart->id; ?>" data-toggle="tooltip" title="" class="btn btn-info btn-sm"><i class="glyphicon glyphicon-eye-open"></i></a> |
104 | 104 | <a title="Заказать повторно" href="/ecommerce/cart/refill/<?= $cart->id; ?>" data-toggle="tooltip" title="" class="btn btn-primary btn-sm"><i class="glyphicon glyphicon-refresh"></i></a> |
105 | 105 | <?php |
@@ -108,8 +108,8 @@ discard block |
||
108 | 108 | </td> |
109 | 109 | </tr> |
110 | 110 | <?php |
111 | - } |
|
112 | - ?> |
|
111 | + } |
|
112 | + ?> |
|
113 | 113 | </tbody> |
114 | 114 | </table> |
115 | 115 | </div> |
@@ -15,7 +15,7 @@ |
||
15 | 15 | $args = func_get_args(); |
16 | 16 | $path = $this->module->getPath($args); |
17 | 17 | if($path){ |
18 | - $this->StaticLoader->giveFile($path); |
|
18 | + $this->StaticLoader->giveFile($path); |
|
19 | 19 | } |
20 | 20 | } |
21 | 21 |
@@ -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 |
@@ -12,13 +12,13 @@ discard block |
||
12 | 12 | <h3>Уровни начислений</h3> |
13 | 13 | <ul> |
14 | 14 | <?php |
15 | - foreach ($reward->levels(['order' => ['level', 'asc']]) as $level) { |
|
16 | - ?> |
|
15 | + foreach ($reward->levels(['order' => ['level', 'asc']]) as $level) { |
|
16 | + ?> |
|
17 | 17 | |
18 | 18 | <li><?= !$level->level ? 'Личный' : $level->level; ?>. <?= $types[$level->type]['viewer']($level); ?></li> |
19 | 19 | <?php |
20 | - } |
|
21 | - ?> |
|
20 | + } |
|
21 | + ?> |
|
22 | 22 | |
23 | 23 | </ul> |
24 | 24 | </div> |
@@ -34,20 +34,20 @@ discard block |
||
34 | 34 | <h4 class="<?= $complete ? 'text-success' : 'text-danger'; ?>"><?= $condition->name(); ?></h4> |
35 | 35 | <ul> |
36 | 36 | <?php |
37 | - foreach ($condition->items as $item) { |
|
38 | - $itemComplete = $item->checkComplete(); |
|
39 | - switch ($item->type) { |
|
40 | - case 'event': |
|
37 | + foreach ($condition->items as $item) { |
|
38 | + $itemComplete = $item->checkComplete(); |
|
39 | + switch ($item->type) { |
|
40 | + case 'event': |
|
41 | 41 | $name = \Events\Event::get($item->value, 'event')->name(); |
42 | - break; |
|
43 | - } |
|
44 | - ?> |
|
42 | + break; |
|
43 | + } |
|
44 | + ?> |
|
45 | 45 | <li> |
46 | 46 | <b class="<?= $itemComplete ? 'text-success' : 'text-danger'; ?>"><?= $name; ?> <?= $item->recivedCount(); ?></b>/<?= $item->count; ?> <br /> |
47 | 47 | </li> |
48 | 48 | <?php |
49 | - } |
|
50 | - ?> |
|
49 | + } |
|
50 | + ?> |
|
51 | 51 | </ul> |
52 | 52 | <?php |
53 | 53 | } |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <h3>Мои кошельки</h3> |
2 | 2 | <div class="row"> |
3 | 3 | <?php |
4 | - $blocked = App::$cur->money->getUserBlocks(); |
|
5 | - $wallets = App::$cur->money->getUserWallets(); |
|
6 | - $rates = Money\Currency\ExchangeRate::getList(); |
|
7 | - foreach ($wallets as $wallet) { |
|
8 | - ?> |
|
4 | + $blocked = App::$cur->money->getUserBlocks(); |
|
5 | + $wallets = App::$cur->money->getUserWallets(); |
|
6 | + $rates = Money\Currency\ExchangeRate::getList(); |
|
7 | + foreach ($wallets as $wallet) { |
|
8 | + ?> |
|
9 | 9 | <div class="col-sm-4"> |
10 | 10 | <h4><?= $wallet->currency->name(); ?></h4> |
11 | 11 | <b><?= $wallet->showAmount(); ?></b> <?= $wallet->currency->acronym(); ?><br /> |
@@ -30,8 +30,8 @@ discard block |
||
30 | 30 | ?> |
31 | 31 | </div> |
32 | 32 | <?php |
33 | - } |
|
34 | - ?> |
|
33 | + } |
|
34 | + ?> |
|
35 | 35 | </div> |
36 | 36 | <?php |
37 | 37 | $transfers = Money\Transfer::getList(['where' => [ |