@@ -3,9 +3,9 @@ |
||
3 | 3 | <div class="cart-order_page"> |
4 | 4 | <h2>Быстрое оформление заказа</h2> |
5 | 5 | <?php |
6 | - if (!$cart || !$cart->cartItems) |
|
7 | - echo "<h1>Ваша корзина пуста</h1>"; |
|
8 | - else { |
|
6 | + if (!$cart || !$cart->cartItems) { |
|
7 | + echo "<h1>Ваша корзина пуста</h1>"; |
|
8 | + } else { |
|
9 | 9 | $sums = []; |
10 | 10 | $cartDelivery = $cart->delivery; |
11 | 11 | $deliveryPrice = 0; |
@@ -3,13 +3,13 @@ discard block |
||
3 | 3 | <div class="cart-order_page"> |
4 | 4 | <h2>Быстрое оформление заказа</h2> |
5 | 5 | <?php |
6 | - if (!$cart || !$cart->cartItems) |
|
7 | - echo "<h1>Ваша корзина пуста</h1>"; |
|
8 | - else { |
|
9 | - $form = new Ui\Form; |
|
10 | - $form->action = "/ecommerce/cart"; |
|
11 | - $form->begin(); |
|
12 | - ?> |
|
6 | + if (!$cart || !$cart->cartItems) |
|
7 | + echo "<h1>Ваша корзина пуста</h1>"; |
|
8 | + else { |
|
9 | + $form = new Ui\Form; |
|
10 | + $form->action = "/ecommerce/cart"; |
|
11 | + $form->begin(); |
|
12 | + ?> |
|
13 | 13 | <div class="row"> |
14 | 14 | <div class="col-sm-4"> |
15 | 15 | <div class="order_page-info"> |
@@ -86,14 +86,14 @@ discard block |
||
86 | 86 | </thead> |
87 | 87 | <tbody> |
88 | 88 | <?php |
89 | - if (class_exists('Money\Currency')) { |
|
90 | - $defaultCurrency = Money\Currency::get(\App::$cur->ecommerce->config['defaultCurrency']); |
|
91 | - } else { |
|
92 | - $defaultCurrency = ''; |
|
93 | - } |
|
94 | - foreach ($cart->cartItems as $cartItem) { |
|
95 | - $path = $cartItem->item->image ? $cartItem->item->image->path : '/static/system/images/no-image.png'; |
|
96 | - ?> |
|
89 | + if (class_exists('Money\Currency')) { |
|
90 | + $defaultCurrency = Money\Currency::get(\App::$cur->ecommerce->config['defaultCurrency']); |
|
91 | + } else { |
|
92 | + $defaultCurrency = ''; |
|
93 | + } |
|
94 | + foreach ($cart->cartItems as $cartItem) { |
|
95 | + $path = $cartItem->item->image ? $cartItem->item->image->path : '/static/system/images/no-image.png'; |
|
96 | + ?> |
|
97 | 97 | <tr class="cart_item_id<?= $cartItem->id; ?> item" data-cart_item_id = '<?php echo $cartItem->id; ?>' data-priceam = '<?php echo $cartItem->price->price; ?>' data-item_offer_price_id = '<?php echo $cartItem->price->id; ?>'> |
98 | 98 | <td class="text-center image"> |
99 | 99 | <a href="/ecommerce/view/<?php echo $cartItem->item->id; ?>"> |
@@ -119,41 +119,41 @@ discard block |
||
119 | 119 | </td> |
120 | 120 | </tr> |
121 | 121 | <?php |
122 | - } |
|
123 | - ?> |
|
122 | + } |
|
123 | + ?> |
|
124 | 124 | </tbody> |
125 | 125 | <tfoot> |
126 | 126 | <?php |
127 | - $colspan = $cart->hasDiscount() ? 5 : 4; |
|
128 | - ?> |
|
127 | + $colspan = $cart->hasDiscount() ? 5 : 4; |
|
128 | + ?> |
|
129 | 129 | <tr class="order_page-sum"> |
130 | 130 | <td colspan="<?= $colspan; ?>" class="text-right">Сумма:</td> |
131 | 131 | <td colspan="2" class="text-right"><?= $cart->itemsSum(); ?></td> |
132 | 132 | </tr> |
133 | 133 | <?php |
134 | - if ($cart->hasDiscount()) { |
|
135 | - ?> |
|
134 | + if ($cart->hasDiscount()) { |
|
135 | + ?> |
|
136 | 136 | <tr class="order_page-discountSum"> |
137 | 137 | <td colspan="<?= $colspan; ?>" class="text-right">Скидка:</td> |
138 | 138 | <td colspan="2" class="text-right"><?= $cart->discountSum(); ?></td> |
139 | 139 | </tr> |
140 | 140 | <?php |
141 | - } |
|
142 | - if ($cart->delivery) { |
|
143 | - ?> |
|
141 | + } |
|
142 | + if ($cart->delivery) { |
|
143 | + ?> |
|
144 | 144 | <tr class="order_page-deliverySum"> |
145 | 145 | <td colspan="<?= $colspan; ?>" class="text-right"><?= $cart->delivery->name; ?>:</td> |
146 | 146 | <td colspan="2" class="text-right"><?php |
147 | - if ($cart->delivery && $cart->delivery->price_text) { |
|
148 | - echo $cart->delivery->price_text; |
|
149 | - } else { |
|
150 | - echo $cart->deliverySum(); |
|
151 | - } |
|
152 | - ?></td> |
|
147 | + if ($cart->delivery && $cart->delivery->price_text) { |
|
148 | + echo $cart->delivery->price_text; |
|
149 | + } else { |
|
150 | + echo $cart->deliverySum(); |
|
151 | + } |
|
152 | + ?></td> |
|
153 | 153 | </tr> |
154 | 154 | <?php |
155 | - } |
|
156 | - ?> |
|
155 | + } |
|
156 | + ?> |
|
157 | 157 | <tr class="order_page-total"> |
158 | 158 | <td colspan="<?= $colspan; ?>" class="text-right">Итого:</td> |
159 | 159 | <td colspan="2" class="text-right"><?= $cart->finalSum(); ?></td> |
@@ -165,8 +165,8 @@ discard block |
||
165 | 165 | <div class="clearfix"></div> |
166 | 166 | <div class="order_page-finish"> |
167 | 167 | <?php |
168 | - $form->input('textarea', 'comment', 'Вы можете добавить комментарий к своему заказу', ['value' => (!empty($_POST['comment'])) ? $_POST['comment'] : '']); |
|
169 | - ?> |
|
168 | + $form->input('textarea', 'comment', 'Вы можете добавить комментарий к своему заказу', ['value' => (!empty($_POST['comment'])) ? $_POST['comment'] : '']); |
|
169 | + ?> |
|
170 | 170 | <div class="order_page-orderBtn"> |
171 | 171 | <button name ="action" value ="order" data-loading-text="Подождите.." class="btn btn-primary">Подтверждение заказа</button> |
172 | 172 | </div> |
@@ -175,9 +175,9 @@ discard block |
||
175 | 175 | </div> |
176 | 176 | </div> |
177 | 177 | <?php |
178 | - $form->end(false); |
|
179 | - } |
|
180 | - ?> |
|
178 | + $form->end(false); |
|
179 | + } |
|
180 | + ?> |
|
181 | 181 | </div> |
182 | 182 | </div> |
183 | 183 | </div> |
184 | 184 | \ No newline at end of file |
@@ -101,7 +101,7 @@ |
||
101 | 101 | </a> |
102 | 102 | </td> |
103 | 103 | <td class="text-left name"> |
104 | - <a href="/ecommerce/view/<?= $cartItem->item->id; ?>"><?= $cartItem->item->name() . ($cartItem->price->offer->name && $cartItem->price->offer->name != $cartItem->item->name() ? ' (' . $cartItem->price->offer->name . ')' : ''); ?></a> |
|
104 | + <a href="/ecommerce/view/<?= $cartItem->item->id; ?>"><?= $cartItem->item->name().($cartItem->price->offer->name && $cartItem->price->offer->name != $cartItem->item->name() ? ' ('.$cartItem->price->offer->name.')' : ''); ?></a> |
|
105 | 105 | </td> |
106 | 106 | <td class="text-left quantity"> |
107 | 107 | <?php $this->widget('Ecommerce\cart/ranger', compact('form', 'cart', 'cartItem')); ?> |
@@ -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 | <div class="content"> |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | ?> |
35 | 35 | </div> |
36 | 36 | <?php |
37 | - $pages->draw(); |
|
38 | - ?> |
|
37 | + $pages->draw(); |
|
38 | + ?> |
|
39 | 39 | </div> |
40 | 40 | </div> |
41 | 41 | </div> |
@@ -2,11 +2,11 @@ |
||
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 | <div class="content"> |
@@ -9,18 +9,20 @@ |
||
9 | 9 | $menu = \Menu\Menu::get($code, 'code'); |
10 | 10 | if ($menu) { |
11 | 11 | foreach ($menu->items(['where' => ['parent_id', 0], 'order' => ['weight', 'asc']]) as $item) { |
12 | - if (urldecode($_SERVER['REQUEST_URI']) == $item->href) |
|
13 | - $active = ' class = "active" '; |
|
14 | - else |
|
15 | - $active = ''; |
|
12 | + if (urldecode($_SERVER['REQUEST_URI']) == $item->href) { |
|
13 | + $active = ' class = "active" '; |
|
14 | + } else { |
|
15 | + $active = ''; |
|
16 | + } |
|
16 | 17 | echo "<li {$active}><a href = '{$item->href}'>{$item->name}</a>"; |
17 | 18 | if ($item->childs(['order' => ['weight', 'asc']])) { |
18 | 19 | echo "<ul>"; |
19 | 20 | foreach ($item->childs as $item) { |
20 | - if (urldecode($_SERVER['REQUEST_URI']) == $item->href) |
|
21 | - $active = ' class = "active" '; |
|
22 | - else |
|
23 | - $active = ''; |
|
21 | + if (urldecode($_SERVER['REQUEST_URI']) == $item->href) { |
|
22 | + $active = ' class = "active" '; |
|
23 | + } else { |
|
24 | + $active = ''; |
|
25 | + } |
|
24 | 26 | echo "<li {$active}><a href = '{$item->href}'>{$item->name}</a>"; |
25 | 27 | } |
26 | 28 | echo "</ul>"; |
@@ -43,7 +43,7 @@ |
||
43 | 43 | 'manager' => [ |
44 | 44 | 'map' => [ |
45 | 45 | ['name', 'code'], |
46 | - ['delivery', 'electronic','discount'] |
|
46 | + ['delivery', 'electronic', 'discount'] |
|
47 | 47 | ] |
48 | 48 | ] |
49 | 49 | ]; |
@@ -2,24 +2,24 @@ |
||
2 | 2 | <div class="col-md-4"> |
3 | 3 | <ul class="nav nav-pills nav-stacked"> |
4 | 4 | <?php |
5 | - $hiddenId = Tools::randomString(); |
|
6 | - foreach ($payTypes as $payType) { |
|
7 | - if ((!empty($_POST['payType']) && $_POST['payType'] == $payType->id) || ($cart->payType && $payType->id == $cart->payType->id)) { |
|
8 | - $checked = 'checked'; |
|
9 | - } else { |
|
10 | - $checked = ''; |
|
11 | - } |
|
12 | - echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $payType->id . '\';inji.Ecommerce.Cart.calcSum();return false;">'; |
|
13 | - echo $payType->name; |
|
14 | - echo '</a></li>'; |
|
15 | - } |
|
16 | - $form->input('hidden', "payType", '', [ |
|
17 | - 'value' => $cart->paytype_id, |
|
18 | - 'attributes' => [ |
|
19 | - 'id' => $hiddenId |
|
20 | - ], |
|
21 | - ]); |
|
22 | - ?> |
|
5 | + $hiddenId = Tools::randomString(); |
|
6 | + foreach ($payTypes as $payType) { |
|
7 | + if ((!empty($_POST['payType']) && $_POST['payType'] == $payType->id) || ($cart->payType && $payType->id == $cart->payType->id)) { |
|
8 | + $checked = 'checked'; |
|
9 | + } else { |
|
10 | + $checked = ''; |
|
11 | + } |
|
12 | + echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $payType->id . '\';inji.Ecommerce.Cart.calcSum();return false;">'; |
|
13 | + echo $payType->name; |
|
14 | + echo '</a></li>'; |
|
15 | + } |
|
16 | + $form->input('hidden', "payType", '', [ |
|
17 | + 'value' => $cart->paytype_id, |
|
18 | + 'attributes' => [ |
|
19 | + 'id' => $hiddenId |
|
20 | + ], |
|
21 | + ]); |
|
22 | + ?> |
|
23 | 23 | </ul> |
24 | 24 | </div> |
25 | 25 | <div class="col-md-8"> |
@@ -9,7 +9,7 @@ |
||
9 | 9 | } else { |
10 | 10 | $checked = ''; |
11 | 11 | } |
12 | - echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $payType->id . '\';inji.Ecommerce.Cart.calcSum();return false;">'; |
|
12 | + echo '<li'.($checked ? ' class="active"' : '').'><a href = "#" onclick = "document.getElementById(\''.$hiddenId.'\').value=\''.$payType->id.'\';inji.Ecommerce.Cart.calcSum();return false;">'; |
|
13 | 13 | echo $payType->name; |
14 | 14 | echo '</a></li>'; |
15 | 15 | } |
@@ -2,24 +2,24 @@ |
||
2 | 2 | <div class="col-md-4"> |
3 | 3 | <ul class="nav nav-pills nav-stacked"> |
4 | 4 | <?php |
5 | - $hiddenId = Tools::randomString(); |
|
6 | - foreach ($deliverys as $delivery) { |
|
7 | - if ((!empty($_POST['delivery']) && $_POST['delivery'] == $delivery->id) || ($cart->delivery && $delivery->id == $cart->delivery->id)) { |
|
8 | - $checked = 'checked'; |
|
9 | - } else { |
|
10 | - $checked = ''; |
|
11 | - } |
|
12 | - echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $delivery->id . '\';inji.Ecommerce.Cart.calcSum();return false;">'; |
|
13 | - echo $delivery->name; |
|
14 | - echo '</a></li>'; |
|
15 | - } |
|
16 | - $form->input('hidden', "delivery", '', [ |
|
17 | - 'value' => $cart->delivery_id, |
|
18 | - 'attributes' => [ |
|
19 | - 'id' => $hiddenId |
|
20 | - ], |
|
21 | - ]); |
|
22 | - ?> |
|
5 | + $hiddenId = Tools::randomString(); |
|
6 | + foreach ($deliverys as $delivery) { |
|
7 | + if ((!empty($_POST['delivery']) && $_POST['delivery'] == $delivery->id) || ($cart->delivery && $delivery->id == $cart->delivery->id)) { |
|
8 | + $checked = 'checked'; |
|
9 | + } else { |
|
10 | + $checked = ''; |
|
11 | + } |
|
12 | + echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $delivery->id . '\';inji.Ecommerce.Cart.calcSum();return false;">'; |
|
13 | + echo $delivery->name; |
|
14 | + echo '</a></li>'; |
|
15 | + } |
|
16 | + $form->input('hidden', "delivery", '', [ |
|
17 | + 'value' => $cart->delivery_id, |
|
18 | + 'attributes' => [ |
|
19 | + 'id' => $hiddenId |
|
20 | + ], |
|
21 | + ]); |
|
22 | + ?> |
|
23 | 23 | </ul> |
24 | 24 | </div> |
25 | 25 | <div class="col-md-8"> |
@@ -39,8 +39,7 @@ |
||
39 | 39 | $form->input($field->type, "deliveryFields[{$field->id}]", $field->name, ['required' => $field->required]); |
40 | 40 | } |
41 | 41 | } |
42 | - } |
|
43 | - else { |
|
42 | + } else { |
|
44 | 43 | echo "<h4>Выберите способ доставки</h4>"; |
45 | 44 | } |
46 | 45 | ?> |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | } else { |
10 | 10 | $checked = ''; |
11 | 11 | } |
12 | - echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $delivery->id . '\';inji.Ecommerce.Cart.calcSum();return false;">'; |
|
12 | + echo '<li'.($checked ? ' class="active"' : '').'><a href = "#" onclick = "document.getElementById(\''.$hiddenId.'\').value=\''.$delivery->id.'\';inji.Ecommerce.Cart.calcSum();return false;">'; |
|
13 | 13 | echo $delivery->name; |
14 | 14 | echo '</a></li>'; |
15 | 15 | } |
@@ -27,10 +27,10 @@ discard block |
||
27 | 27 | if ($cart->delivery) { |
28 | 28 | echo "<h4>Информация о доставке</h4>"; |
29 | 29 | if ($cart->delivery->price_text || $cart->delivery->price) { |
30 | - echo "<div>Стоимость доставки: <b>" . ($cart->delivery->price_text ? $cart->delivery->price_text : ( $cart->delivery->price . ' ' . ($cart->delivery->currency ? $cart->delivery->currency->acronym() : 'руб.') )) . '</b></div>'; |
|
30 | + echo "<div>Стоимость доставки: <b>".($cart->delivery->price_text ? $cart->delivery->price_text : ($cart->delivery->price.' '.($cart->delivery->currency ? $cart->delivery->currency->acronym() : 'руб.'))).'</b></div>'; |
|
31 | 31 | } |
32 | 32 | if ((float) $cart->delivery->max_cart_price) { |
33 | - echo '<div>При заказе товаров на сумму от ' . $cart->delivery->max_cart_price . ' руб - бесплатно</div>'; |
|
33 | + echo '<div>При заказе товаров на сумму от '.$cart->delivery->max_cart_price.' руб - бесплатно</div>'; |
|
34 | 34 | } |
35 | 35 | echo $cart->delivery->info; |
36 | 36 | if ($cart->delivery->fields) { |
@@ -19,22 +19,22 @@ discard block |
||
19 | 19 | <div class="filter"> |
20 | 20 | <label><?= $option->name; ?></label> |
21 | 21 | <?php |
22 | - switch ($option->type) { |
|
23 | - case 'radio': |
|
22 | + switch ($option->type) { |
|
23 | + case 'radio': |
|
24 | 24 | foreach ($option->items as $item) { |
25 | - $this->widget('Ui\Form/' . $option->type, [ |
|
26 | - 'label' => $item->name, |
|
27 | - 'name' => "filters[options][{$option->id}]", |
|
28 | - !empty($_GET['filters']['options'][$option->id]) && $_GET['filters']['options'][$option->id] == $item->id ? 'checked' : false, |
|
29 | - 'options' => [ |
|
30 | - 'value' => $item->id, |
|
31 | - ] |
|
32 | - ]); |
|
33 | - } |
|
34 | - break; |
|
35 | - case 'select': |
|
25 | + $this->widget('Ui\Form/' . $option->type, [ |
|
26 | + 'label' => $item->name, |
|
27 | + 'name' => "filters[options][{$option->id}]", |
|
28 | + !empty($_GET['filters']['options'][$option->id]) && $_GET['filters']['options'][$option->id] == $item->id ? 'checked' : false, |
|
29 | + 'options' => [ |
|
30 | + 'value' => $item->id, |
|
31 | + ] |
|
32 | + ]); |
|
33 | + } |
|
34 | + break; |
|
35 | + case 'select': |
|
36 | 36 | foreach ($option->items as $item) { |
37 | - ?> |
|
37 | + ?> |
|
38 | 38 | <div class="radio"> |
39 | 39 | <label> |
40 | 40 | <input type="radio" name = 'filters[options][<?= $option->id; ?>]' value ="<?= $item->id; ?>" <?= !empty($_GET['filters']['options'][$option->id]) && $_GET['filters']['options'][$option->id] == $item->id ? 'checked' : ''; ?>> |
@@ -42,18 +42,18 @@ discard block |
||
42 | 42 | </label> |
43 | 43 | </div> |
44 | 44 | <?php |
45 | - } |
|
46 | - break; |
|
47 | - default: |
|
45 | + } |
|
46 | + break; |
|
47 | + default: |
|
48 | 48 | $this->widget('Ui\Form/' . $option->type, [ |
49 | - 'label' => $option->name, |
|
50 | - 'name' => "filters[options][{$option->id}]", |
|
51 | - 'options' => [ |
|
52 | - 'value' => !empty($_GET['filters']['options'][$option->id]) ? $_GET['filters']['options'][$option->id] : '', |
|
53 | - ] |
|
54 | - ]); |
|
55 | - } |
|
56 | - ?> |
|
49 | + 'label' => $option->name, |
|
50 | + 'name' => "filters[options][{$option->id}]", |
|
51 | + 'options' => [ |
|
52 | + 'value' => !empty($_GET['filters']['options'][$option->id]) ? $_GET['filters']['options'][$option->id] : '', |
|
53 | + ] |
|
54 | + ]); |
|
55 | + } |
|
56 | + ?> |
|
57 | 57 | </div> |
58 | 58 | <?php |
59 | 59 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | switch ($option->type) { |
23 | 23 | case 'radio': |
24 | 24 | foreach ($option->items as $item) { |
25 | - $this->widget('Ui\Form/' . $option->type, [ |
|
25 | + $this->widget('Ui\Form/'.$option->type, [ |
|
26 | 26 | 'label' => $item->name, |
27 | 27 | 'name' => "filters[options][{$option->id}]", |
28 | 28 | !empty($_GET['filters']['options'][$option->id]) && $_GET['filters']['options'][$option->id] == $item->id ? 'checked' : false, |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | } |
46 | 46 | break; |
47 | 47 | default: |
48 | - $this->widget('Ui\Form/' . $option->type, [ |
|
48 | + $this->widget('Ui\Form/'.$option->type, [ |
|
49 | 49 | 'label' => $option->name, |
50 | 50 | 'name' => "filters[options][{$option->id}]", |
51 | 51 | 'options' => [ |
@@ -5,15 +5,15 @@ |
||
5 | 5 | <h3>Вход</h3> |
6 | 6 | <div class="form-group"> |
7 | 7 | <?php |
8 | - $socials = Users\Social::getList(['where' => ['active', 1]]); |
|
9 | - if ($socials) { |
|
10 | - echo 'Войти через: '; |
|
11 | - foreach (Users\Social::getList(['where' => ['active', 1]]) as $social) { |
|
12 | - $text = $social->image ? '<img src ="' . Statics::file($social->image->path, '25x25', 'q') . '">' : $social->name(); |
|
13 | - echo "<a href = '/users/social/auth/{$social->code}'>{$text}</a> "; |
|
14 | - } |
|
15 | - } |
|
16 | - ?> |
|
8 | + $socials = Users\Social::getList(['where' => ['active', 1]]); |
|
9 | + if ($socials) { |
|
10 | + echo 'Войти через: '; |
|
11 | + foreach (Users\Social::getList(['where' => ['active', 1]]) as $social) { |
|
12 | + $text = $social->image ? '<img src ="' . Statics::file($social->image->path, '25x25', 'q') . '">' : $social->name(); |
|
13 | + echo "<a href = '/users/social/auth/{$social->code}'>{$text}</a> "; |
|
14 | + } |
|
15 | + } |
|
16 | + ?> |
|
17 | 17 | </div> |
18 | 18 | <form action = '' method = 'POST' > |
19 | 19 | <div class ='row'> |
@@ -9,7 +9,7 @@ |
||
9 | 9 | if ($socials) { |
10 | 10 | echo 'Войти через: '; |
11 | 11 | foreach (Users\Social::getList(['where' => ['active', 1]]) as $social) { |
12 | - $text = $social->image ? '<img src ="' . Statics::file($social->image->path, '25x25', 'q') . '">' : $social->name(); |
|
12 | + $text = $social->image ? '<img src ="'.Statics::file($social->image->path, '25x25', 'q').'">' : $social->name(); |
|
13 | 13 | echo "<a href = '/users/social/auth/{$social->code}'>{$text}</a> "; |
14 | 14 | } |
15 | 15 | } |