<?php $__env->startSection('title'); ?>
Notícias
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content-header'); ?>
Notícias
<?php $__env->stopSection(); ?>

<?php $__env->startSection('breadcrumb'); ?>
<li class="active">
    Notícias
</li>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<div class="row">
    <div class="col-xs-12">
        <div class="box no-border">
            <div class="box-header">
                <h3 class="box-title">Lista de Notícias</h3>
                <div class="box-tools pull-right">
                    <a href="<?php echo route('admin.news.create'); ?>" class="btn btn-success btn-sm"><i class="fa fa-plus"></i> Nova Notícia</a>
                </div>
            </div>
            <div class="box-body">
                <table id="table-news" class="table table-bordered table-striped dataTable">
                    <thead>
                        <tr>
                            <th class="width-1">#</th>
                            <th></th>
                            <th>Título</th>
                            <th class="width-1">Destaque</th>
                            <th class="width-60px">Data</th>
                            <th class="width-1">Partilhar</th>
                            <th class="width-40px"></th>
                        </tr>
                    </thead>
                    <tbody>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
<script type="text/javascript">
    $(document).ready(function () {
        $('#table-news').dataTable({
            serverSide: true,
            processing: true,
            "ajax": {
                url: "<?php echo route('admin.news.datatables'); ?>",
                type: "POST"
            },    
            "autoWidth": false,
            "order": [[0, "desc"]],
            "columnDefs": [
                { "orderable": false, "targets": [-1, 1]},
                { "class": 'text-center width-1', "targets": 1},
              ]
        });

    });
    
        $(document).on('click', 'a[data-toggle=share]', function(e){
            e.preventDefault();
            var href = $(this).attr('href');
            popupCenter(href,'', 600, 400);
            return false;
        });
        
   
</script>
<?php $__env->stopSection(); ?>