Server IP : 66.29.132.124 / Your IP : 3.133.127.131 Web Server : LiteSpeed System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : wavevlvu ( 1524) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/wavevlvu/book24.ng/modules/Location/Views/admin/ |
Upload File : |
@extends('admin.layouts.app') @section('content') <div class="container-fluid"> <div class="d-flex justify-content-between mb20"> <h1 class="title-bar">{{__("Location")}}</h1> </div> @include('admin.message') <div class="row"> <div class="col-md-4 mb40"> <div class="panel"> <div class="panel-title">{{__("Add Location")}}</div> <div class="panel-body panel-index"> <form action="{{route('location.admin.store',['id'=>'-1','lang'=>request()->query('lang')])}}" method="post"> @csrf @include('Location::admin/form',['parents'=>$rows]) <div class="form-group form-index-hide"> <label class="control-label">{{__("Location Map")}}</label> <div class="control-map-group"> <div id="map_content"></div> <div class="g-control d-none" > <div class="form-group"> <label>{{__("Map Lat")}}:</label> <input type="text" name="map_lat" class="form-control" value="{{$row->map_lat}}"> </div> <div class="form-group"> <label>{{__("Map Lng")}}:</label> <input type="text" name="map_lng" class="form-control" value="{{$row->map_lng}}"> </div> <div class="form-group"> <label>{{__("Map Zoom")}}:</label> <input type="text" name="map_zoom" class="form-control" value="{{$row->map_zoom ?? "8"}}"> </div> </div> </div> <p><i>{{__('Click onto map to place Location address')}}</i></p> </div> <div class=""> <button class="btn btn-primary" type="submit">{{__("Add new")}}</button> </div> </form> </div> </div> </div> <div class="col-md-8"> <div class="filter-div d-flex justify-content-between "> <div class="col-left"> @if(!empty($rows)) <form method="post" action="{{route("location.admin.bulkEdit")}}" class="filter-form filter-form-left d-flex justify-content-start"> {{csrf_field()}} <select name="action" class="form-control"> <option value="">{{__(" Bulk Action ")}}</option> <option value="publish">{{__(" Publish ")}}</option> <option value="draft">{{__(" Move to Draft ")}}</option> <option value="delete">{{__(" Delete ")}}</option> </select> <button data-confirm="{{__("Do you want to delete?")}}" class="btn-info btn btn-icon dungdt-apply-form-btn" type="button">{{__('Apply')}}</button> </form> @endif </div> <div class="col-left"> <form method="get" action="{{route('location.admin.index')}}" class="filter-form filter-form-right d-flex justify-content-end" role="search"> <input type="text" name="s" value="{{ Request()->s }}" class="form-control" placeholder="{{__("Search by name")}}"> <button class="btn-info btn btn-icon btn_search" id="search-submit" type="submit">{{__('Search')}}</button> </form> </div> </div> <div class="panel"> <div class="panel-body"> <form action="" class="bravo-form-item"> <table class="table table-hover"> <thead> <tr> <th width="60px"><input type="checkbox" class="check-all"></th> <th>{{__("Name")}}</th> <th class="slug d-none d-md-block">{{__("Slug")}}</th> <th class="status">{{__("Status")}}</th> <th class="date d-none d-md-block" >{{__("Date")}}</th> </tr> </thead> <tbody> @if( count($rows) > 0) <?php $traverse = function ($categories, $prefix = '') use (&$traverse) { foreach ($categories as $row) { ?> <tr> <td><input type="checkbox" name="ids[]" value="{{$row->id}}" class="check-item"> </td> <td class="title"> <a href="{{route('location.admin.edit',['id'=>$row->id])}}">{{$prefix.' '.$row->name}}</a> </td> <td class="d-none d-md-block">{{$row->slug}}</td> <td><span class="badge badge-{{ $row->status }}">{{ $row->status }}</span></td> <td class="d-none d-md-block">{{display_date($row->updated_at)}}</td> </tr> <?php $traverse($row->children, $prefix . '-'); } }; $traverse($rows); ?> @else <tr> <td colspan="5">{{__("No data")}}</td> </tr> @endif </tbody> </table> </form> </div> </div> </div> </div> </div> @endsection @section ('script.body') {!! \App\Helpers\MapEngine::scripts() !!} <script> jQuery(function ($) { new BravoMapEngine('map_content', { disableScripts:true, fitBounds: true, center: [{{$row->map_lat ?? setting_item('map_lat_default') }}, {{$row->map_lng ?? setting_item('map_lng_default') }}], zoom:{{$row->map_zoom ?? "8"}}, ready: function (engineMap) { @if($row->map_lat && $row->map_lng) engineMap.addMarker([{{$row->map_lat}}, {{$row->map_lng}}], { icon_options: {} }); @endif engineMap.on('click', function (dataLatLng) { engineMap.clearMarkers(); engineMap.addMarker(dataLatLng, { icon_options: {} }); $("input[name=map_lat]").attr("value", dataLatLng[0]); $("input[name=map_lng]").attr("value", dataLatLng[1]); }); engineMap.on('zoom_changed', function (zoom) { $("input[name=map_zoom]").attr("value", zoom); }) } }); }) </script> @endsection