관리-도구
편집 파일: 01905df586199215555bf72c564982e8.php
<?php $__env->startSection('content'); ?> <!-- Include Full jQuery (not slim) --> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <!-- Bootstrap 4 CSS --> <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet"> <!-- Bootstrap 4 JS + Popper --> <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> <!-- Summernote --> <link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-lite.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-lite.min.js"></script> <style> .description-cell { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } </style> <div class="main-panel"> <div class="content-wrapper"> <div class="row"> <div class="col-lg-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <div class="d-flex justify-content-between"> <h3 class="text-center"><b>Testimonials</b></h3> <button class="btn btn-success" data-toggle="modal" data-target="#addTestimonials">Add new Testimonials +</button> </div> <hr> <div class="table-responsive"> <table class="table table-hover"> <thead> <tr> <th>#</th> <th>Name</th> <th>Location</th> <th>Review</th> <th class="text-center">Action</th> </tr> </thead> <tbody> <?php $__currentLoopData = $testimonials; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $testimonial): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e($loop->iteration); ?></td> <td><?php echo e($testimonial->name); ?></td> <td><?php echo e($testimonial->location); ?></td> <td class="description" style="white-space: pre-wrap; padding: 10px;"> <?php echo $testimonial->comment; ?> </td> <td class="text-center"> <button class="btn btn-primary my-2" data-toggle="modal" data-target="#updateTestimonials<?php echo e($testimonial->id); ?>"> <i class="fa fa-pen"></i> </button> <form method="post" action="<?php echo e(route('admin-testimonials.destroy', $testimonial->id)); ?>" style="display:inline-block;"> <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?> <button class="btn btn-danger my-2"><i class="fa fa-trash"></i></button> </form> </td> </tr> <!-- Update Modal --> <div class="modal fade" id="updateTestimonials<?php echo e($testimonial->id); ?>" tabindex="-1" role="dialog"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">Update Testimonial</h5> <button type="button" class="close" data-dismiss="modal">×</button> </div> <div class="modal-body"> <form method="post" action="<?php echo e(route('admin-testimonials.update', $testimonial->id)); ?>"> <?php echo csrf_field(); ?> <?php echo method_field('PUT'); ?> <div class="form-group"> <label>Name</label> <input type="text" name="name" value="<?php echo e($testimonial->name); ?>" class="form-control" required> </div> <div class="form-group"> <label>Location</label> <input type="text" name="location" value="<?php echo e($testimonial->location); ?>" class="form-control" required> </div> <div class="form-group"> <label>Review</label> <textarea class="form-control" name="comment" rows="4"><?php echo e($testimonial->comment); ?></textarea> </div> <div class="text-center"> <button type="submit" class="btn btn-primary">Update</button> </div> </form> </div> </div> </div> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> </div> </div> </div> </div> </div> </div> <!-- Add Testimonial Modal (outside the loop!) --> <div class="modal fade" id="addTestimonials" tabindex="-1" role="dialog"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">Add New Testimonial</h5> <button type="button" class="close" data-dismiss="modal">×</button> </div> <div class="modal-body"> <form method="post" action="<?php echo e(route('admin-testimonials.store')); ?>"> <?php echo csrf_field(); ?> <div class="form-group"> <label>Name</label> <input type="text" name="name" class="form-control" placeholder="Enter Full Name" required> </div> <div class="form-group"> <label>Location</label> <input type="text" name="location" class="form-control" placeholder="Enter Location" required> </div> <div class="form-group"> <label>Review</label> <textarea class="form-control" name="comment" rows="4" placeholder="Enter Review"></textarea> </div> <div class="text-center"> <button type="submit" class="btn btn-primary w-50">Submit</button> </div> </form> </div> </div> </div> </div> </div> <!-- Summernote Init --> <script> $(document).ready(function () { $('textarea[name="comment"]').summernote({ placeholder: 'Enter Review', tabsize: 2, height: 120, toolbar: [ ['style', ['style']], ['font', ['bold', 'underline', 'clear']], ['color', ['color']], ['para', ['ul', 'ol', 'paragraph']], ['table', ['table']], ['insert', ['link', 'picture', 'video']], ['view', ['fullscreen', 'codeview', 'help']] ] }); }); </script> <?php $__env->stopSection(); ?> <?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\D E L L\Downloads\_zamorinlighttheme\resources\views/admin/testimonials.blade.php ENDPATH**/ ?>