<?php $__env->startSection('title', $ticket->subject . ' | ' . Options::get('title') ); ?>

<?php $__env->startSection('content'); ?>

<div class="content">
    

    <!-- SINGLE TICKET -->
    <div class="row content-body ticket-single-page">
        <div class="col-lg-8 col-md-12 ticket-details">

            <!-- TICKET BOX, TICKET DETAIL -->
            <div class="ticket-box">
                <div class="ticket-header">
                    <h4>#ID: <?php echo e($ticket->id); ?></h4>
                </div>
                <div class="ticket-title row">
                    <div class="col-md-8 col-lg-9">
                        <h3> <?php echo e($ticket->subject); ?> </h3>
                    </div>
                    <div class="col-md-4 col-lg-3 ">

                         <!-- Check If the date is over 1 month or not -->
                   		<?php $date = $ticket->created_at; ?>
                        <p class="t-t-d">   <?php echo e($date->diffInMonths(Carbon::now()) >= 1 ? $date->format('j M Y, g:ia') : $date->diffForHumans()); ?>  </p>

                    </div>
                </div>
                <div class="ticket-detail">
                    <?php echo $ticket->message; ?>

					
					<?php if( $ticket->files ): ?>
                        <div class="file-attached">
                            <div class="file-single">
                                <div class="file-t">
                                    <span>Attached File:</span>
                                </div>
                                <div class="file-name">
                                    <span>
                                        <a href="/uploads/<?php echo e($ticket->files); ?>"> <?php echo e($ticket->files); ?> </a>
                                    </span>
                                </div>
                            </div>
                        </div>
                    <?php endif; ?>
                </div>

                <?php echo $__env->make('partials.site.replies', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

            </div>
        </div>
        
    
        <?php echo $__env->make('partials.dashboard.ticket_information', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
        

    </div>

</div>

<?php $__env->stopSection(); ?>

<?php /* Include scripts */ ?>
<?php $__env->startSection('script'); ?>
	
    <script src="<?php echo e(URL::asset('assets/js/tinymce/tinymce.min.js')); ?>"></script>
    <script>
        // Tiny MCE Editor for the Custom Textarea,
        tinymce.init({
            selector: 'textarea', 
            height: 150,
            menubar: false,
            paste_auto_cleanup_on_paste : true,
            paste_remove_styles: true,
            fullpage_default_fontsize: "18px",
            paste_as_text: true,
            paste_remove_styles_if_webkit: true,
            paste_strip_class_attributes: "all",
            plugins : 'paste advlist autolink link image lists charmap print preview',
            toolbar: false,
            content_css: siteUrl + '/assets/css/tinymce.site.css',
            setup: function (editor) {
                editor.addButton('pasteCode', {
                text: 'Paste code',
                icon: false,
                onclick: function () {
                    editor.insertContent('<pre><code>"paste your code inside the quotation, then remove the quotation marks."</code></pre>');
                }
                });
            },
        });

    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.dashboard', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>