관리-도구
편집 파일: 35a3143360e6c47eb74301078b771cde.php
<?php $__env->startSection('content'); ?> <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script> <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> <!-- partial --> <div class="main-panel"> <div class="content-wrapper"> <style> .description-cell { max-width: 200px; /* Adjust the value as needed */ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } </style> <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="#addService">Add new +</button> </div> <hr> <div class="table-responsive"> <table class="table table-hover"> <thead> <tr class="text-center"> <th>#</th> <th>Name</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 class="text-center"> <td><?php echo e($loop->iteration); ?></td> <td><?php echo e($testimonial->name); ?></td> <td class="description" style="white-space: pre-wrap; padding: 10px; "> <?php echo $testimonial->review; ?> </td> <td class="text-center"> <div> <button class="btn btn-warning" data-toggle="modal" data-target="#testimonialModal<?php echo e($testimonial->id); ?>"> <i class="fa fa-edit"></i> </button> <!-- Edit/Add Testimonial Modal --> <div class="modal fade" id="testimonialModal<?php echo e($testimonial->id); ?>" tabindex="-1" role="dialog" aria-labelledby="testimonialModalTitle" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="testimonialModalTitle"><?php echo e(isset($testimonial) ? 'Edit Testimonial' : 'Add Testimonial'); ?></h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <form method="POST" action="<?php echo e(isset($testimonial) ? route('admin-testimonials.update', $testimonial->id) : route('admin-testimonials.store')); ?>" enctype="multipart/form-data"> <?php echo csrf_field(); ?> <?php if(isset($testimonial)): ?> <?php echo method_field('PUT'); ?> <?php endif; ?> <div class="form-group"> <label for="name">Name</label> <input type="text" name="name" class="form-control" id="name" value="<?php echo e($testimonial->name ?? old('name')); ?>" required> </div> <div class="form-group"> <label for="review">Review</label> <textarea class="form-control summernotes" name="review" id="review" rows="4" required><?php echo e($testimonial->review ?? old('review')); ?></textarea> </div> <div class="text-center"> <button type="submit" class="btn btn-primary w-50"><?php echo e(isset($testimonial) ? 'Update' : 'Submit'); ?></button> </div> </form> </div> </div> </div> </div> <form method="post" action="<?php echo e(route('admin-testimonials.destroy', $testimonial->id)); ?>"> <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?> <button class="btn btn-danger"><i class="fa fa-trash"></i></button> </form> </div> </td> </tr> <!--update Service Modal --> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> </div> </div> </div> </div> </div> </div> <div class="modal fade" id="addService" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLongTitle">Add new</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <div class="card"> <div class="card-body"> <form method="POST" action="<?php echo e(route('admin-testimonials.store')); ?>" enctype="multipart/form-data"> <?php echo csrf_field(); ?> <div class="form-group"> <label for="exampleInputImage">Name</label> <input type="text" name="name" class="form-control" id="exampleInputImage"> <?php $__errorArgs = ['image']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <div class="alert alert-danger"><?php echo e($message); ?></div> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> <div class="form-group"> <label for="exampleInputDescription1">Review</label> <textarea class="form-control" name="review" id="summernote" rows="4" placeholder="Enter description1"><?php echo e(old('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> </div> <?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\roomgeardesigns\resources\views/admin/testimonials.blade.php ENDPATH**/ ?>