Viewing File: /home/ubuntu/vedadeals-backend-base/resources/views/admin/banners/index.blade.php

@extends('layouts.admin') 

@section('title') 
  {{ tr('banners') }} 
@endsection

@section('content-header', tr('banners'))

 @section('breadcrumb')
<li class="breadcrumb-item text-muted"> <a href="{{ route('admin.banners.index') }}" class="text-muted">{{tr('banners')}}</a></li>
<li class="breadcrumb-item"> <span class="bullet bg-gray-300 w-5px h-2px"></span> </li>
<li class="breadcrumb-item active">{{ tr('view_banners') }}</li> 
@endsection 

@section('content')
<div class="card card-flush">
    <div class="card-body"> 
        @include('admin.banners._search')

        @if(isset(request()->search_key))
            <p class="text-danger"> {{ tr('search_results_for') }} : &nbsp;"{{ request()->search_key }}" </p>
        @endif
    
        <table class="table align-middle table-row-dashed fs-6">
            @if($banners->isNotEmpty())
            <thead>
                <!--begin::Table row-->
                <tr class="text-start text-muted fw-bolder fs-7 text-uppercase gs-0">
                    <th class="min-w-1px" nowrap=""> {{ tr('s_no') }} </th>
                    <th class="min-w-1px"> {{ tr('title') }} </th>
                    <th class="min-w-1px"> {{ tr('link') }} </th>
                    <th class="min-w-1px"> {{ tr('user_product') }} </th>
                    <th class="min-w-1px"> {{ tr('type') }} </th>
                    <th class="min-w-1px"> {{ tr('status') }} </th>
                    <th class="min-w-1px"> {{ tr('action') }} </th>
                </tr>
            </thead>
            <tbody class="text-gray-600 fw-bold"> 
                @foreach($banners as $i => $banner)
                <tr>
                    <td>{{ $i+$banners->firstItem() }}</td>
                    <td> <a href="{{ route('admin.banners.view', ['banner_id' => $banner->id]) }}" class="menu-link" title="{{$banner->title}}">
                        {{ $banner->title ? shrink_text($banner->title, 40) : tr('na') }} </a> </td>
                    <td> <a href="{{ $banner->link }}" target="_blank" class="menu-link {{ $banner->link ? '' : 'link-disabled' }}" title="{{$banner->link}}">
                        {{ $banner->link ? shrink_text($banner->link, 40) : tr('na') }} </a> </td>
                    <td> <a href="{{ route('admin.products.view', ['product_id' => $banner->product_id]) }}" class="menu-link {{ $banner->product_id ? '' : 'link-disabled' }}" title="{{$banner->title}}">
                        {{ $banner->product_id ? $banner->product->name : tr('na') }} </a> </td>
                    <td> <span class="badge py-3 px-4 fs-7 {{ $banner->type == BANNER ? 'badge-light-dark' : 'badge-light-danger' }} "> 
                                {{ $banner->type == BANNER ? tr('banner') : tr('product') }}
                        </span> </td>
                    <td> <span class="badge py-3 px-4 fs-7 {{ $banner->status ? 'badge-light-success' : 'badge-light-warning' }} "> 
                                {{ $banner->status ? tr('approved') : tr('declined') }}
                        </span> </td>
                    <td class="" nowrap=""> <a href="" class="btn btn-light btn-active-light-primary btn-sm" data-kt-menu-trigger="click" data-kt-menu-placement="bottom-end">
                            {{ tr('action') }} <span class="svg-icon svg-icon-5 m-0 rotate-180"> <i class="las la-angle-down"></i> </span> </a>
                        <div class="menu menu-sub menu-sub-dropdown menu-column menu-rounded menu-gray-600 menu-state-bg-light-primary fw-bold fs-7 w-125px py-4" data-kt-menu="true">
                            <div class="menu-item px-3"> <a href="{{ route('admin.banners.view', ['banner_id' => $banner->id]) }}" class="menu-link px-3">{{ tr('view') }}</a> </div>
                            <div class="menu-item px-3"> <a href="{{ Setting::get('is_demo_control_enabled') ? '#' : route('admin.banners.edit', ['banner_id' => $banner->id]) }}" class="menu-link px-3">{{ tr('edit') }}</a> </div>
                            <div class="menu-item px-3"> <a data-bs-toggle="{{ Setting::get('is_demo_control_enabled') ? '#' : 'modal' }}" data-bs-target="#delete_{{$banner->id}}" class="menu-link px-3" data-kt-banners-table-filter="delete_row">{{ tr('delete') }}</a> </div>
                            <div class="menu-item px-3"> <a data-bs-toggle="{{ Setting::get('is_demo_control_enabled') ? '#' : 'modal' }}" data-bs-target="#change_status_{{$banner->id}}" class="menu-link px-3">{{ $banner->status ? tr('decline') : tr('approve') }}</a> </div>
                        </div>
                    </td>
                </tr>
                @include('admin.banners.modals') 
                @endforeach 
            @else
                 <tr>
                    <div class="card overlay border mt-8">
                        <div class="card-body p-0">
                            <div class="overlay-wrapper h-100px bgi-no-repeat bgi-size-contain bgi-position-center" style="background-image:url('{{ asset('imagesS/no_results_found.png') }}')"><h2 class="text-center pt-12"> {{ tr('no_data_found') }} </h2></div>
                        </div>
                    </div>
                </tr> 
            @endif
             </tbody>
        </table>
        <ul class="pagination pagination-outline justify-content-end">
            <li class="page-item"> {{ $banners->appends(request()->input())->links('pagination::bootstrap-4') }} </li>
        </ul>
    </div>
</div>
</div>
</div>
@endsection
Back to Directory File Manager