
@extends('admin/layouts/contentLayoutMaster')

@section('title', $title)

@section('vendor-style')
{{-- vednor css files --}}
@endsection
@section('content')
<?php 
list($width, $height, $type, $attr) = getimagesize(public_path(Config("params.media_path.large"))."".$model->file); 
list($width2, $height2, $type2, $attr2) = getimagesize(public_path(Config("params.media_path.thumbnail"))."".$model->file); 


?>
<!-- Add rows table -->
<section id="add-row">

    <div class="card">
        <div class="card-header">

            <h4 class="card-title"><a href="{{url('admin/media')}}" class="mr-1  btn-icon btn btn-primary btn-round btn-sm"><i class="feather icon-arrow-left"></i></a>{{$title}}</h4>

        </div>
        <div class="card-content">
            <div class="card-body">

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

                        <table class="table table-bordered">
                            <tbody>
                                <tr>
                                    <td>Title :</td>
                                    <td>{{ $model->title }}</td>
                                </tr>
                                <tr>
                                    <td>Alternative Text :</td>
                                    <td>{{ $model->altText }}</td>
                                </tr>
                                <tr>
                                    <td>File Name :</td>
                                    <td>{{ $model->fileName }}</td>
                                </tr>
                                <tr>
                                    <td>File Category :</td>
                                    <td>{{ $model->category }}</td>
                                </tr>
                                
                                <tr>
                                    <td>File Type :</td>
                                    <td>{{ $model->type }}</td>
                                </tr>
                                <tr>
                                    <td>Original Dimensions :</td>
                                    <td>{{$width}} x {{$height}}</td>
                                </tr>
                                <tr>
                                    <td>Thumbnails Dimensions :</td>
                                    <td>{{$width2}} x {{$height2}}</td>
                                </tr>
                                <tr>
                                    <td>File Url :</td>
                                    <td>{{asset("/uploads/$folder/")."/".$model->file}}</td>
                                </tr>
                                <tr>
                                    <td>File Url Thumbnail :</td>
                                    <td>{{asset("/uploads/$folder/thumbnails")."/".$model->file}}</td>
                                </tr>
                                 <tr>
                                    <td>File Description :</td>
                                    <td><?php echo $model->description?></td>
                                </tr>
                                <tr>
                                    <td>Thumbnails Image:</td>
                                    @if(!empty($model->file))
                                    <td><img src="{{asset("/uploads/$folder/thumbnails")."/".$model->file}}" ></td>
                                    @else
                                        <td>None</td>
                                    @endif
                                </tr>
                                    <tr>
                                    <td>Original Image :</td>
                                    @if(!empty($model->file))
                                    <td><a href="{{asset("/uploads/$folder")."/".$model->file}}">View Image</a></td>
                                    @else
                                        <td>None</td>
                                    @endif
                                </tr>
                                <tr>
                                    <td>Created_at :</td>
                                    <td>{{ $model->created_at }}</td>
                                </tr>
                                <tr>
                                    <td>Updated_at :</td>
                                    <td>{{ $model->updated_at }}</td>
                                </tr>
                                
                            </tbody>
                        </table>
                        <div class="row float-right">
                            <div class="col-md-8">
                               <a class="btn btn-outline-warning mr-1 mb-1 waves-effect confirm-delete" href="javascript:void(0);" data-href="{{url('admin/media/delete/'.$model->id)}}" data-id="{{$model->id}}" > Delete</a>
                            </div>
                        </div>
                       
                        

                    </div>
                </div>
            </div>
        </div>
    </div>
  

</section>
<!--/ Add rows table -->
<!--/ Scroll - horizontal and vertical table -->
@endsection
@include('vendor_script')
@section('myscript')
{{-- Page js files --}}
<script>
$( document ).ready(function() {
     $("#data").hide();
     $("#previewdata").hide();
     
$("#hide").click(function(){
   $("#data").toggle();
    $(this).toggleClass('class1')
 
});
$("#previewclick").click(function(){
   $("#previewdata").toggle();
    $(this).toggleClass('class1')
 
});


});

</script>
<script>
        CKEDITOR.config.allowedContent = true;

    CKEDITOR.replace( 'summary-ckeditor' );
</script>
@endsection