<?php $__env->startSection('title'); ?> <?php if( ! empty($title)): ?> <?php echo e($title); ?> | <?php endif; ?> ##parent-placeholder-3c6de1b7dd91465d437ef415f94f36afc1fbc8a8## <?php $__env->stopSection(); ?>
<?php $__env->startSection('page-css'); ?>
<style type="text/css">
    .message-list:hover{
        pointer:cursor;
    }
</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('main'); ?>
        
        <div id="wrapper">
            <?php echo $__env->make('admin.sidebar_menu', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>

            <div id="page-wrapper">
                <?php if( ! empty($title)): ?>
                    <div class="row">
                        <div class="col-lg-12">
                            <h1 class="page-header"> <?php echo e($title); ?>  </h1>
                        </div> <!-- /.col-lg-12 -->
                    </div> <!-- /.row -->
                <?php endif; ?>

                <?php echo $__env->make('admin.flash_msg', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>

                <div class="row">
                    <div class="col-xs-12">

                        <table class="table table-bordered table-striped table-fixed" id="msg_table">
                            <thead>
                                <tr>
                                    <th><?php echo app('translator')->getFromJson('app.name'); ?></th>
                                    <th><?php echo app('translator')->getFromJson('app.email'); ?></th>
                                    <th><?php echo app('translator')->getFromJson('app.message'); ?></th>
                                    <th><?php echo app('translator')->getFromJson('app.phone'); ?></th>
                                    <th>For Ad</th>
                                    <th style="width: 100%;"><?php echo app('translator')->getFromJson('app.created_at'); ?></th>
                                </tr>
                            </thead>
                            
                            
                            <?php $__currentLoopData = $contact_messages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $message): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr class="message-list" data-toggle="modal" data-target="#ticket-modal-<?php echo $loop->index; ?>">
                                    <td><?php echo $message->name; ?> <?php echo e($message->id); ?></td>
                                    <td><?php echo $message->email; ?></td>
                                    <td><a href="#"><?php echo nl2br($message->message); ?></a></td>
                                    <td><?php echo $message->phone; ?></td>
                                    <td><a href= 'https://kupeza.co.zm/ad/<?php echo $message->ad_id; ?>' ><?php echo $message->ad_id; ?></a></td>
                                    <td><?php echo $message->created_at_datetime();; ?></td>
                                </tr>
                                <div class="modal fade" id="ticket-modal-<?php echo $loop->index; ?>" tabindex="-1" role="dialog">
                                    <div class="modal-dialog" role="document">
                                        <div class="modal-content">
                                            <div class="modal-header">
                                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                                <h4 class="modal-title">Message</h4>
                                            </div>
                                            <div class="modal-body">
                            
                                                <p>Sender: <?php echo $message->name; ?></p>
                                                <p>Email: <?php echo $message->email; ?></p>
                                                <p>Phone: <?php echo $message->phone; ?></p>
                                                <p>Ad: <a href= 'https://kupeza.co.zm/ad/<?php echo $message->ad_id; ?>' ><?php echo $message->ad_id; ?></a></p>
                                                <p>Message</p>
                                                <p><?php echo $message->message; ?></p>
                            
                                                
                                            </div>
                                            <div class="modal-footer">
                                                <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo app('translator')->getFromJson('app.close'); ?></button>
                                                <button type="button" class="btn btn-primary" id="report_ad"><?php echo app('translator')->getFromJson('app.report_ad'); ?></button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                               
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            
                            
                        </table>

                    </div>
                </div>


            </div>   <!-- /#page-wrapper -->

        </div>   <!-- /#wrapper -->
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layout.main', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>