Commit d2e30108c8b0332f3949dfc16c69d53b19c70093
1 parent
65c2fc5f63
Exists in
master
Линки телефонов в карточках офисов
Showing 7 changed files with 33 additions and 19 deletions Side-by-side Diff
app/Http/Controllers/MainController.php
... | ... | @@ -228,6 +228,9 @@ class MainController extends Controller |
228 | 228 | $MailBD->save(); |
229 | 229 | } |
230 | 230 | |
231 | + /* | |
232 | + * Форма записаться на просмотр | |
233 | + */ | |
231 | 234 | public function rec_view_form(FooterFeedbackRequest $request) { |
232 | 235 | $RentTorg = Contact::query()->limit(1)->get(); |
233 | 236 | $MailBD = new ModelMailFeedback(); |
... | ... | @@ -236,6 +239,7 @@ class MainController extends Controller |
236 | 239 | $MailBD->subject = "Пользователь <".$request->NameUser.">"; |
237 | 240 | $MailBD->form = 'Форма записи на просмотр'; |
238 | 241 | $MailBD->text = "От пользователя: ".$request->NameUser." Сообщение: Заказываю просмотр офиса"; |
242 | + $MailBD->text .= "Адрес офиса-объекта: ".url()->previous()." "; | |
239 | 243 | $MailBD->save(); |
240 | 244 | } |
241 | 245 | |
... | ... | @@ -773,7 +777,7 @@ class MainController extends Controller |
773 | 777 | |
774 | 778 | // выводим количество пользователей гостей данной страницы |
775 | 779 | $count_user = DB::table('pages')->where('url', '=', "$url")->get(); |
776 | - return view('house.post', compact('house', 'houses', 'count_user')); | |
780 | + return view('house.post', compact('house', 'houses', 'count_user')); | |
777 | 781 | } |
778 | 782 | |
779 | 783 | /* |
app/Providers/ComposerServiceProvider.php
... | ... | @@ -34,7 +34,7 @@ class ComposerServiceProvider extends ServiceProvider |
34 | 34 | } |
35 | 35 | ); |
36 | 36 | |
37 | - $views = ['layout.site', 'index', 'about']; | |
37 | + $views = ['layout.site', 'index', 'about', 'house.post', 'catalog', 'category_catalog']; | |
38 | 38 | View::composer($views, function($view) { |
39 | 39 | $view->with(['items_contact' => Contact::limit(1)->get()]); |
40 | 40 | }); |
resources/views/admin/houses/form.blade.php
... | ... | @@ -192,7 +192,7 @@ |
192 | 192 | <input type="text" class="form-control_ txt" name="renter" placeholder="Арендатор" |
193 | 193 | required maxlength="100" style="width: 80%" value="{{ old('renter') ?? $house->renter ?? '' }}"><br><br> |
194 | 194 | |
195 | -<label for="price">Цена: </label><br> | |
195 | +<label for="price">Цена (или аренда за месяц): </label><br> | |
196 | 196 | @error('price') |
197 | 197 | <div class="alert alert-danger">{{ $message }}</div> |
198 | 198 | @enderror |
... | ... | @@ -206,7 +206,7 @@ |
206 | 206 | <input type="text" class="form-control_ txt" name="price_m2" placeholder="Цена за метр2" |
207 | 207 | required maxlength="100" style="width: 80%" value="{{ old('price_m2') ?? $house->price_m2 ?? '' }}"><br><br> |
208 | 208 | |
209 | -<label for="rent_in_year">Аренда в год (поле только для аренды): </label><br> | |
209 | +<label for="rent_in_year">Аренда в год (поле только для аренды и арендованные): </label><br> | |
210 | 210 | @error('rent_in_year') |
211 | 211 | <div class="alert alert-danger">{{ $message }}</div> |
212 | 212 | @enderror |
resources/views/catalogs/elemhouse.blade.php
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | <use xlink:href="{{ asset('images/sprite.svg#card-favorites') }}"></use> |
18 | 18 | </svg> |
19 | 19 | </span> |
20 | - <a class="card__label card__label-messenger" href="#"> | |
20 | + <a class="card__label card__label-messenger" href="tel:{{ $items_contact[0]->telephone }}"> | |
21 | 21 | <svg width="25" height="25"> |
22 | 22 | <use xlink:href="{{ asset('images/sprite.svg#card-messenger') }}"></use> |
23 | 23 | </svg></a></div> |
... | ... | @@ -43,6 +43,9 @@ |
43 | 43 | case 'Арендованные': |
44 | 44 | $comment = "<span>в месяц</span>"; |
45 | 45 | break; |
46 | + default: | |
47 | + $comment = "<span>в месяц</span>"; | |
48 | + break; | |
46 | 49 | } |
47 | 50 | ?> |
48 | 51 | <div class="card__price"><span>{{ $house->price }} ₽ </span><? echo $comment; ?> |
resources/views/catalogs/house_mini.blade.php
... | ... | @@ -13,10 +13,13 @@ |
13 | 13 | </svg> |
14 | 14 | <svg width="18" height="18"> |
15 | 15 | <use xlink:href="{{ asset('images/sprite.svg#card-favorites') }}"></use> |
16 | - </svg></span><a class="card__label card__label-messenger" href="#"> | |
16 | + </svg></span> | |
17 | + <a class="card__label card__label-messenger" href="tel:{{ $items_contact[0]->telephone }}"> | |
17 | 18 | <svg width="25" height="25"> |
18 | 19 | <use xlink:href="{{ asset('images/sprite.svg#card-messenger') }}"></use> |
19 | - </svg></a></div> | |
20 | + </svg> | |
21 | + </a> | |
22 | + </div> | |
20 | 23 | </div> |
21 | 24 | <div class="card__cnt"> |
22 | 25 | <div class="card__info"> |
resources/views/house/post.blade.php
... | ... | @@ -38,7 +38,7 @@ |
38 | 38 | </div> |
39 | 39 | <div class="intro__bottom"> |
40 | 40 | <div class="intro__views">{{ $count_user->count() }} человек(а) интересовались этим объектом за последние 24 ч</div> |
41 | - <a class="intro__link-phone btn btn--main" href="tel:+70001234567"><span>Позвонить | |
41 | + <a class="intro__link-phone btn btn--main" href="tel:{{ $items_contact[0]->telephone }}"><span>Позвонить | |
42 | 42 | <svg width="22" height="22"> |
43 | 43 | <use xlink:href="{{ asset('images/sprite.svg#intro-link-phone') }}"></use> |
44 | 44 | </svg></span></a> |
... | ... | @@ -153,8 +153,12 @@ |
153 | 153 | </div> |
154 | 154 | <!---------------------------> |
155 | 155 | <div class="offer__lines"> |
156 | + <? if ($house->format_house == "Продажа") {?> | |
157 | + <div class="offer__line"><span>Цена</span><span>{{ $house->price }} ₽</span></div> | |
158 | + <? } else {?> | |
156 | 159 | <div class="offer__line"><span>Аренда в год за м2</span><span>{{ $house->rent_in_year }} ₽</span></div> |
157 | - <div class="offer__line"><span>Аренда в месяц</span><span>{{ $house->rent_in_month }} ₽</span></div> | |
160 | + <div class="offer__line"><span>Аренда в месяц</span><span>{{ $house->price }} ₽</span></div> | |
161 | + <? } ?> | |
158 | 162 | <div class="offer__line"><span>Схема сделки</span><span>{{ $house->scheme_deal }}</span></div> |
159 | 163 | </div> |
160 | 164 | <div class="offer-side__buttons"><a class="offer-side__btn btn btn--main" href="#" data-btn="viewing"><span>Записаться на просмотр |
... | ... | @@ -163,10 +167,10 @@ |
163 | 167 | </svg></span></a><a class="offer-side__btn btn btn--main" href="#" data-btn="sending"><span>Отправить по Email |
164 | 168 | <svg width="22" height="22"> |
165 | 169 | <use xlink:href="{{ asset('images/sprite.svg#offer-side-btn-email') }}"></use> |
166 | - </svg></span></a><a class="offer-side__btn btn btn--main" href="tel:+70001234567"><span>Позвонить | |
170 | + </svg></span></a><a class="offer-side__btn btn btn--main" href="tel:{{ $items_contact[0]->telephone }}"><span>Позвонить | |
167 | 171 | <svg width="22" height="22"> |
168 | 172 | <use xlink:href="{{ asset('images/sprite.svg#intro-link-phone') }}"></use> |
169 | - </svg></span></a></div><a class="offer-side__download" href="#" download><span>Скачать презентацию | |
173 | + </svg></span></a></div><a class="offer-side__download" href="{{ $house->present }}" download><span>Скачать презентацию | |
170 | 174 | <svg width="60" height="60"> |
171 | 175 | <use xlink:href="{{ asset('images/sprite.svg#offer-side-download') }}"></use> |
172 | 176 | </svg></span></a> |
... | ... | @@ -177,7 +181,7 @@ |
177 | 181 | <div class="offer__line"><span>Площадь, м2</span><span>{{ $house->area }}</span></div> |
178 | 182 | <div class="offer__line"><span>Адрес</span><span>{{ $house->address }}</span></div> |
179 | 183 | <div class="offer__line"><span>Тип объекта</span><span>{{ $house->typearea->name_type }}</span></div> |
180 | - <div class="offer__line"><span>Формат</span><span>{{ $house->format_house }}</span></div> | |
184 | + <div class="offer__line"><span>Формат</span><span>{{ $house->format_house }}</span></div> | |
181 | 185 | <div class="offer__line"><span>Этаж</span><span>{{ $house->floor }} эт.</span></div> |
182 | 186 | <div class="offer__line"><span>Этажность здания</span><span>{{ $house->floor_bild }} эт.</span></div> |
183 | 187 | <div class="offer__line"><span>Арендаторы</span><span>{{ $house->renter }}</span></div> |
... | ... | @@ -216,12 +220,12 @@ |
216 | 220 | <div class="slider__control"> |
217 | 221 | <div class="swiper-button-prev"> |
218 | 222 | <svg width="10" height="17"> |
219 | - <use xlink:href="images/sprite.svg#slider-arrow"></use> | |
223 | + <use xlink:href="{{ asset('images/sprite.svg#slider-arrow') }}"></use> | |
220 | 224 | </svg> |
221 | 225 | </div> |
222 | 226 | <div class="swiper-button-next"> |
223 | 227 | <svg width="10" height="17"> |
224 | - <use xlink:href="images/sprite.svg#slider-arrow"></use> | |
228 | + <use xlink:href="{{ asset('images/sprite.svg#slider-arrow') }}"></use> | |
225 | 229 | </svg> |
226 | 230 | </div> |
227 | 231 | </div> |
resources/views/layout/site.blade.php
... | ... | @@ -35,7 +35,7 @@ |
35 | 35 | </svg></a> |
36 | 36 | <div class="header__contacts"> |
37 | 37 | <div class="header__col"><a class="header__contact" href="mailto:{{ $items_contact[0]->email }}">{{ $items_contact[0]->email }}</a></div> |
38 | - <div class="header__col"><a class="header__contact" href="tel:{{ $items_contact[0]->email }}">{{ $items_contact[0]->telephone }}</a> | |
38 | + <div class="header__col"><a class="header__contact" href="tel:{{ $items_contact[0]->telephone }}">{{ $items_contact[0]->telephone }}</a> | |
39 | 39 | <button class="header__btn-callback" type="button" data-btn="feedback">Обратный звонок</button> |
40 | 40 | </div> |
41 | 41 | </div> |
... | ... | @@ -342,12 +342,12 @@ |
342 | 342 | <div class="offer-side-popup__wrap"> |
343 | 343 | <button class="offer-side-popup__close js_popup_close" type="button"> |
344 | 344 | <svg width="20" height="20"> |
345 | - <use xlink:href="{{ asset('images/sprite.svg#popup-close')}}"></use> | |
345 | + <use xlink:href="images/sprite.svg#popup-close"></use> | |
346 | 346 | </svg> |
347 | 347 | </button> |
348 | 348 | <div class="offer-side-popup__cnt"> |
349 | - <div class="offer-side-popup__item js_offer_side_popup_item active" data-item="1"><img src="{{ asset('images/offer-side-item-img-1.jpg')}}" alt="План объекта"></div> | |
350 | - <div class="offer-side-popup__item js_offer_side_popup_item" data-item="2"><img src="{{ asset('images/offer-side-item-img-2.jpg')}}" alt="План этажа"></div> | |
349 | + <div class="offer-side-popup__item js_offer_side_popup_item active" data-item="1"><img src="images/offer-side-item-img-1.jpg" alt="План объекта"></div> | |
350 | + <div class="offer-side-popup__item js_offer_side_popup_item" data-item="2"><img src="images/offer-side-item-img-2.jpg" alt="План этажа"></div> | |
351 | 351 | </div> |
352 | 352 | <div class="offer-side-popup__tabs"> |
353 | 353 | <button class="offer-side-popup__tab js_offer_side_popup_tab active" type="button" data-tab="1">План объекта</button> |
... | ... | @@ -355,7 +355,7 @@ |
355 | 355 | </div> |
356 | 356 | <button class="offer-side-popup__sizeoff js_popup_close" type="button"> |
357 | 357 | <svg width="18" height="18"> |
358 | - <use xlink:href="{{ asset('images/sprite.svg#popup-sizeoff')}}"></use> | |
358 | + <use xlink:href="images/sprite.svg#popup-sizeoff"></use> | |
359 | 359 | </svg> |
360 | 360 | </button> |
361 | 361 | </div> |