Current File : //home/tradevaly/public_html/resources/views/backend/pages/Banner/manufacture.blade.php |
@extends('backend.ayaan.master')
@push('title') Banners @endpush
@section('css')
<!-- DataTables -->
<link href="{{ asset('/assets/libs/datatables/datatables.min.css') }}" rel="stylesheet" type="text/css" />
@endsection
@section('manufacture')
active
@endsection
@section('content')
@component('components.breadcrumb')
@slot('li_1') Dashboards @endslot
@slot('title') Banners @endslot
@endcomponent
<div class="row">
<div class="col-lg-3">
<div class="card all_banner">
<div class="card-body">
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link" href="{{route('admin.component.banner.index')}}">Home Page</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{route('admin.component.banner.category')}}">Category Page</a>
</li>
<li class="nav-item">
<a class="nav-link " href="{{route('admin.component.banner.buyers')}}">Buyers Page</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{route('admin.component.banner.product')}}">Product Page</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{route('admin.component.banner.company')}}">Company Page</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="{{route('admin.component.banner.manufacture')}}">Manufacture Page</a>
</li>
</ul>
</div>
</div>
</div>
<div class="col-9">
<div class="card ">
<div class="card-body">
<div class="row mb-2">
<div class="col-sm-4">
<h3>Manufacture Page Banners</h3>
{{ session()->put('page','manufacture_page')}}
</div>
<div class="col-sm-8">
<div class="text-sm-end">
<a href="{{url('b2b/component/banner/add')}}"
class="btn btn-success btn-rounded waves-effect waves-light mb-2 me-2"><i
class="mdi mdi-plus me-1"></i> Add New Banner</a>
</div>
</div><!-- end col-->
</div>
<div class="table-responsive">
<table id="datatable-buttons" class="table table-bordered dt-responsive nowrap w-100">
<table class="table">
<thead>
<tr>
<th class="text-center">#</th>
<th>{{translate('Image')}}</th>
<th>{{translate('link')}}</th>
<th>{{translate('Position')}}</th>
<th>Status</th>
<th class="text-right">{{translate('Actions')}}</th>
</tr>
</thead>
<tbody>
@php
$i = 0;
@endphp
@foreach ($banners as $banner)
<tr>
<?php $i++; ?>
<td class="text-center">{{$i}}</td>
<td><img style="height: 80px; width:150px; border-radius:10%;" src="{{asset('storage/images/admin/banner/'.$banner['image'])}}" alt=""></td>
<td width="300px">{{ Str::limit($banner['link'],70) }}</td>
<td>{{$banner['position']}}</td>
<td>
@if ($banner['status']==0)
<a class="btn btn-info updateBannerStatus" title="Turn off / On" id="banner-{{$banner->id}}" banner_id="{{$banner->id}}" style="color: #fff">
<i class="fas fa-toggle-off"></i>
</a>
@else
<a class="btn btn-info updateBannerStatus" title="Turn off / On" id="banner-{{$banner->id}}" banner_id="{{$banner->id}}" style="color: #fff">
<i class="fas fa-toggle-on"></i>
</a>
@endif
</td>
<td class="td-actions text-right">
<a href="{{url('b2b/component/banner/home/page/edit',$banner->id)}}" class="btn btn-info" title="Edit">
<i class="fas fa-pencil-alt"></i>
</a>
<a href="{{url('b2b/component/banner/delete',$banner->id)}}" name="banner" class="btn btn-danger confirmDelete" title="Delete" style="color: #fff">
<i class="fas fa-trash"></i>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- end row -->
@endsection
@section('script')
<!-- Required datatable js -->
<script src="{{ asset('/assets/libs/datatables/datatables.min.js') }}"></script>
<script src="{{ asset('/assets/libs/jszip/jszip.min.js') }}"></script>
<script src="{{ asset('/assets/libs/pdfmake/pdfmake.min.js') }}"></script>
<!-- Datatable init js -->
<script type="text/javascript">
$(function () {
$(document).ready(function () {
var table = $('#datatable-buttons').DataTable({
lengthChange: false,
processing: true,
dom: 'Bfrtip',
serverSide: false,
buttons: ['copy', 'excel', 'pdf', 'colvis']
});
table.buttons().container().appendTo('#datatable-buttons_wrapper .col-md-6:eq(0)');
$(".dataTables_length select").addClass('form-select form-select-sm');
});
});
</script>
@endsection