<?php use Carbon\Carbon; ?>


<?php $__env->startSection('title', 'Research'); ?>

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

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

<?php $__env->startSection('header_css'); ?>
<link href="<?php echo e(asset('backend/js/data-tables/DT_bootstrap.css')); ?>" rel="stylesheet"/>
<?php /* <link href="<?php echo asset('frontend/dataTable/dataTables.bootstrap.css'); ?>" rel="stylesheet"> */ ?>
<?php $__env->stopSection(); ?>

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

<?php $__env->startSection('content'); ?>
<!-- breadcrumb wrapper Start -->
<div class="breadcrumb-banner-wrapper">
    <div class="container">
        <div class="row">
            <div class="col-sm-12">
                <div class="breadcrumb-text">
                    <h1 class="text-center">Research: <?php echo e($research->heading); ?></h1>
                    <div class="breadcrumb-bar">
                        <ul class="breadcrumb text-center">
                            <li><a href="<?php echo e(route('home')); ?>">Home</a></li>
                            <li>Research</li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- breadcrumb wrapper End --> 

<!-- Inner page wrapper start -->
<div class="inner-page-wrapper about-us-wrapper">
    <div class="container">
        <div class="table-responsive">
            <table class="table table-striped table-hover table-bordered">
                <thead>
                    <tr>
                        <th style="width:7%">S.N</th>
                        <th style="width:25%">Research Topic</th>
                        <th style="width:30%">Description</th>
                        <th style="width:18%">Author</th>
                        <th style="width:10%">Published Date</th>
                        <th style="width:10%">Download</th>
                    </tr>
                </thead>
                <tbody>
                    <?php 
                    if($research->activePublications->count()) {
                        $i = 1;
                        foreach($research->activePublications as $row) {
                            $formattedDate = '-';
                            if($row->publish_date) {
                                $carbonDate = Carbon::createFromFormat('Y-m-d', $row->publish_date);
                                $formattedDate = $carbonDate->toFormattedDateString();
                            }
                    ?>
                    <tr>
                        <td><?php echo e($i); ?></td>
                        <td><?php echo e($row->title); ?></td>
                        <td><?php echo e($row->short_description); ?></td>
                        <td><?php echo e($row->author); ?></td>
                        <td><?php echo e($formattedDate); ?></td>
                        <td><a href="<?php echo e(route('researchFront.download', $row->id)); ?>"><i class="fa fa-download"> </i> Download</a> </td>
                    </tr>
                    <?php
                            $i++; 
                        }
                    } else {
                    ?>
                    <tr>
                        <td colspan="6">Sorry, No Research Papers Available For This Category</td>
                    </tr>
                    <?php } ?>
                </tbody>
            </table>    
        </div>
    </div>
</div>
<!-- Inner page wrapper end --> 

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

<?php $__env->startSection('footer_js'); ?>
<!-- Footer js goes here -->
<script type="text/javascript" src="<?php echo e(asset('frontend/dataTable/jquery.dataTables.min.js')); ?>"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $(document).ready(function() {
            $('table').DataTable({
                "aasorting": [],
                "order": [],
                "iDisplayLength": 50
            });
        } );
    })
</script>
<?php $__env->stopSection(); ?>

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