File: /home/imensosw/liftcincy.imenso.co/resources/views/admin/events/index.blade.php
@extends('layouts.admin')
@section("style")
<link href="{{ asset('assets/plugins/datatable/css/dataTables.bootstrap5.min.css')}}" rel="stylesheet" />
@endsection
@section('pageTitle')
<title>{{ trans('panel.site_title') }} {{ trans('event.events') }}</title>
@endsection
@section('content')
<!--start page wrapper -->
<div class="page-wrapper">
<div class="page-content">
<!--breadcrumb-->
<div class="page-breadcrumb d-none d-sm-flex align-items-center mb-3">
<div class="breadcrumb-title pe-3">{{ trans('event.events') }}</div>
<div class="ps-3">
<nav aria-label="breadcrumb">
<ol class="breadcrumb mb-0 p-0">
<li class="breadcrumb-item"><a href="javascript:;"><i class="bx bx-home-alt"></i></a>
</li>
<li class="breadcrumb-item active" aria-current="page">{{ trans('event.event') }} {{ trans('global.list') }}</li>
</ol>
</nav>
</div>
<div class="ms-auto">
<div class="btn-group">
<a href="{{ route("admin.events.create") }}" class="btn btn-outline-primary">{{ trans('global.add') }} {{ trans('event.event') }}</a>
</div>
</div>
<hr/>
</div>
<!--end breadcrumb-->
<div class="card">
<div class="card-body">
@include('layouts/notification')
<div class="table-responsive">
<table class="datatable table table-striped table-bordered" style="width:100%">
<thead>
<tr>
<th>{{trans('event.event')}}</th>
<th>{{trans('new.image')}}</th>
<th>{{trans('new.date')}}</th>
<th>{{trans('new.status')}}</th>
<th>{{trans('new.show_on_home')}}</th>
<th class="text-center sorting-none" width="50"> </th>
</tr>
</thead>
<tbody>
<?php $count = 0; ?>
@if($events->count())
@foreach($events as $key => $event)
<?php $event_img = URL::asset('images/no_img.png'); ?>
<?php
if(!empty($event->feature_image)){
$event_img = URL::asset('Event/'.$event->id.'/'.$event->feature_image);
}
?>
<?php $count++; ?>
<tr data-entry-id="{{ $event->id }}">
<td>{{ $event->event_title }}</td>
<td><img src="{{$event_img}}" class="event_file" height="40" /></td>
<td>{{ $event->start_date }}</td>
<td>@if($event->event_status == 1)
Live
@else
Off
@endif
</td>
<td>@if($event->show_on_home == 1)
Yes
@else
No
@endif
</td>
<td >
<div class="btn-group">
@can('opportunity_show')
<a class="btn btn-xs btn-outline-primary" href="{{ route('admin.events.show', $event->id) }}">
<i class="lni lni-eye"></i>
</a>
@endcan
@can('opportunity_edit')
<a class="btn btn-xs btn-outline-success" href="{{ route('admin.events.edit', $event->id) }}">
<i class="fadeIn animated bx bx-edit-alt"></i>
</a>
@endcan
@can('opportunity_delete')
<form action="{{ route('admin.events.destroy', $event->id) }}" method="POST" style="display: inline-block;">
<input type="hidden" name="_method" value="DELETE">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<button type="button" class="btn btn-xs btn-outline-danger rounded-end" onclick="confirmdelet('{{$event->id}}');"><i class="fadeIn animated bx bx-trash-alt"></i></button>
<button type="submit" class="btn btn-xs btn-outline-danger rounded-end hide d-none delete_button_{{$event->id}}" ><i class="fadeIn animated bx bx-trash-alt"></i></button>
</form>
@endcan
</div>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('script')
<script src="{{ asset('assets/plugins/datatable/js/jquery.dataTables.min.js')}}"></script>
<script src="{{ asset('assets/plugins/datatable/js/dataTables.bootstrap5.min.js')}}"></script>
<script>
$(document).ready(function(){
$('.datatable').DataTable();
});
</script>
@endsection