Файловый менеджер - Редактировать - /home/clickysoft/public_html/calvary-p2.clickysoft.net/resources/views/front/event/detail.blade.php
Назад
@extends('front.layouts.master') @section('title', 'Event Details') @section('content') <section class="event-detail-sec"> <div class="container-fluid p-0"> <div class="row cs-gutter"> <div class="col-md-12 col-lg-6 col-xl-6 col-sm-12 col-12"> <div class="evd-thunb"> <img src="{{ $event->media[0]?->getUrl() }}" alt="N/A" class="img-fluid wd-100"> </div> <div class="row"> <div class="col-md-12 col-lg-12 col-xl-12 col-sm-12 col-12"> <div class="tdo-main"> <div class="tdo-head"> <h6>Time:</h6> <p>{{ \Carbon\Carbon::parse($event->time_start)->format('h:i A') }} - {{ \Carbon\Carbon::parse($event->time_end)->format('h:i A') }} </p> </div> <div class="tdo-head"> <h6>Date:</h6> <p>{{ \Carbon\Carbon::parse($event->date)->format('l, F d, Y') }}</p> </div> <div class="tdo-head"> <h6>Location:</h6> <p>{{ $event->location }}</p> </div> <div class="tdo-head"> <h6>Organizer:</h6> <p>{{ $event->organizer }}</p> </div> </div> </div> </div> <div class="fall-festival-content"> <div class="ffc-head"> <h3>{{ $event->title }}</h3> {!! $event->description !!} </div> </div> </div> <div class="col-md-12 col-lg-6 col-xl-6 col-sm-12 col-12"> @include('partials.alert') <form id="ticket-form"> <div class="rg-card"> <div class="rg-head"> <h4>Buy Tickets</h4> </div> <div class="rgs-main mt-2"> <div class="fr-1"> <div class="rgs-field"> <input type="text" class="form-control first_name" placeholder="First Name" maxlength="100"> </div> </div> <div class="fr-1"> <div class="rgs-field"> <input type="text" class="form-control last_name" placeholder="Last Name" maxlength="100"> </div> </div> <div class="fr-2"> <div class="rgs-field"> <select class="form-select select-category-input" onchange="handlePrice(this)"> <option value="" class="c-black">Category</option> <option value="{{ $event->adult_price }}" class="c-black">Adult</option> <option value="{{ $event->child_price }}" class="c-black">Child</option> </select> </div> <div class="rgs-field"> <input type="text" placeholder="Price" class="form-control price-input" value="" readonly> </div> </div> <div class="cross"> X </div> </div> <div class="continue-add"> @if (auth()->user()) <button type="button" class="add-person" onclick="gotoCheckout()">Continue</button> <button type="button" class="add-person" onclick="addClone()">Add a Person</button> @else <button type="button" class="add-person" onclick="redirectUserToLogin()">Login</button> @endif </div> <div class="subtotal"> <h5>Total: <span id="sub-total-span">$0.00</span></h5> </div> </div> </form> </div> </div> </div> </section> @if (!empty(count($relatedEvents))) <section class="related-sec"> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="re-main-head"> <h3>Related Events</h3> </div> </div> </div> <div class="row re-gutter red-card-pr"> @foreach ($relatedEvents as $relatedEvent) <div class="col-md-6 col-lg-4 col-xl-4 col-sm-12 col-12"> <div class="re-card"> <div class="re-thumb"> <img src="{{ $relatedEvent->media[0]?->getUrl() }}" alt="N/A" class="img-fluid wd-100"> </div> <div class="re-content"> <div class="re-head"> <span>{{ \Carbon\Carbon::parse($relatedEvent->date)->format('d/m/Y') }}</span> <h5>{{ $relatedEvent->title }}</h5> <p>{!! \Illuminate\Support\Str::limit($relatedEvent->description, 180) !!}</p> </div> <div class="rd-detail-more"> <a href="{{ route('front.event.detail', $relatedEvent->id) }}" class="rg-btn revd-btn">Read More</a> </div> </div> </div> </div> @endforeach <div class="load-more view-all-evd"> <a class="load-more-btn" href="{{ route('front.event.index') }}">View All</a> </div> </div> </div> </section> @endif @endsection @push('front-scripts') <script src="{{ asset('assets/admin/js/axios.min.js') }}"></script> <script src="{{ asset('assets/admin/js/sweetalert.min.js') }}"></script> <script> function redirectUserToLogin() { window.location.href = `{{ route('login') }}`; } function handlePrice(input) { if ($(input).val()) { let selectedOption = "$" + $(input).val(); $(input).parent().next().find('.price-input').first().val(selectedOption); } else { $(input).parent().next().find('.price-input').first().val(""); } reCalculateTotal(); } function reCalculateTotal() { let total = 0; $.each($('.price-input'), function() { if ($(this).val()) { total += parseInt($(this).val().split('$')[1]); } }); $("#sub-total-span").text("$" + total + ".00"); } function gotoCheckout() { showLoader(); let data = []; let needToProcess = true; $.each($(".rgs-main"), function() { if ($(this).find(".first_name").val() === "" || $(this).find(".last_name").val() === "" || $(this) .find(".select-category-input option:selected").text().trim() === "Category") { needToProcess = false; } }); if (needToProcess) { $.each($(".rgs-main"), function() { data.push({ first_name: $(this).find(".first_name").val(), last_name: $(this).find(".last_name").val(), category: $(this).find(".select-category-input option:selected").text().trim() }); }); axios.post('{{ route('front.event.add.ticket', $event->id) }}', { data: data }).then(function(response) { hideLoader(); window.location.href = '{{ route('front.event.checkout', $event->id) }}' }).catch(function(error) { hideLoader(); swal({ title: error.response.data.msg, icon: "error", dangerMode: true, closeOnClickOutside: false }); }); } else { hideLoader(); swal({ title: "All fields are required.", icon: "warning", dangerMode: true, closeOnClickOutside: false }); } } function addClone() { let newClone = $(".rgs-main").last().clone(); $(newClone).find("input").val(""); $(newClone).find("select").val(""); $(".rgs-main").last().after(newClone); } $(document).on('click', '.cross', function() { // Find the index of the clicked element and add 1 let index = $('.cross').index(this); if (index !== 0) { $(this).parent().remove() reCalculateTotal() } }); </script> @endpush
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка