/
home
/
sjslayjy
/
public_html
/
theweavenest
/
resources
/
views
/
Admin
/
Upload File
HOME
@extends('admin/layout') @section('page_title', 'Product') @section('product_select', 'active') @section('container') @if(session()->has('message')) <div class="sufee-alert alert with-close alert-success alert-dismissible fade show"> {{ session('message') }} <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> @endif <div> <a href="{{ url('admin/product/manage_product') }}"> <button type="button" class="btn btn-success"> Add New Product </button> </a> </div> <div class="row m-t-30"> <div class="col-md-12"> <!-- DATA TABLE--> <div class="table-responsive m-b-40"> <table id="product_table" class="table table-borderless table-data3"> <thead> <tr> <th>ID</th> <th>Name</th> <th>Slug</th> <th>Image</th> <th>Action</th> </tr> </thead> <tbody> @foreach($data as $list) <tr> <td>{{ $list->id }}</td> <td>{{ $list->name }}</td> <td>{{ $list->slug }}</td> <td> @if($list->image != '') <img width="100px" src="{{ asset('storage/media/'.$list->image) }}" /> @endif </td> <td> <a href="{{ url('admin/product/manage_product/' . $list->id) }}" class="btn btn-success btn-icon"> <i class="fa fa-pencil"></i> </a> @if($list->status == 1) <a href="{{ url('admin/product/status/0/' . $list->id) }}" class="btn btn-primary btn-icon"> <i class="fa fa-check"></i> </a> @elseif($list->status == 0) <a href="{{ url('admin/product/status/1/' . $list->id) }}" class="btn btn-warning btn-icon"> <i class="fa fa-times"></i> </a> @endif <a href="{{ url('admin/product/delete/' . $list->id) }}" class="btn btn-danger btn-icon"> <i class="fa fa-trash"></i> </a> <!-- View Images Buttons --> <a href="{{ route('admin.product.allImages', ['product_id' => $list->id]) }}" class="small-btn btn btn-info mt-2"> <i class="fa fa-eye"></i> View Images </a> <a href="{{ route('admin.product.attrImages', ['product_id' => $list->id]) }}" class="small-btn btn btn-secondary mt-2"> <i class="fa fa-eye"></i> View Attribute Images </a> </td> </tr> @endforeach </tbody> </table> </div> <!-- END DATA TABLE--> </div> </div> <!-- Include jQuery --> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <!-- Include DataTables JavaScript --> <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.24/js/jquery.dataTables.js"></script> <script> $(document).ready(function() { $('#product_table').DataTable(); }); </script> <!-- Custom CSS --> <style> .btn-icon { padding: 5px 8px; /* Smaller padding */ font-size: 14px; /* Smaller font size */ } .btn-icon i { margin-right: 0; /* No margin between icon and button */ } .small-btn { font-size: 10px; /* Smaller font size */ padding: 5px 8px; /* Smaller padding */ line-height: 1.2; /* Adjust line height for spacing */ white-space: nowrap; /* Prevent text wrapping */ height: auto; /* Auto height */ width: auto; /* Auto width */ } .small-btn i { margin-right: 5px; /* Space between icon and text */ } </style> @endsection