
<?php $__env->startSection('page'); ?>
<div class="review-index content-page">
    <div class="row">
        <div class="col-xs-8">
            <h1 class="page-title">Services</h1>
        </div>
        <div class="col-xs-4">
            <a href="<?php echo URL::route('admin.service.create'); ?>" class="pull-right btn btn-success">
                Add new
            </a>
        </div>
    </div>
    <hr>
    <table class="table table-striped table-condensed">
        <thead>
            <tr>
                <th>#</th>
                <th>Title</th>
                <th>Status</th>
                <th>Order</th>
                <th class="text-right">Action</th>
            </tr>
        </thead>
        <tbody>
            <?php $ii = 0; ?>
            <?php foreach($data_result as $data_row): ?>
            <?php $ii++;?>
            <tr>
                <td><?php echo $ii; ?></td>
                <td><?php echo $data_row['title']; ?></td>
                <td>
                    <?php if($data_row['status'] == 1): ?>
                        <span class="text-success">Published</span>
                    <?php else: ?>
                        <span class="text-warning">Pending</span>
                    <?php endif; ?>
                </td>
                <td><?php echo $data_row['sort_order']; ?></td>
                <td class="text-right">
                    <div class="btn-group">
                        <button type="button" class="btn btn-primary dropdown-toggle btn-sm" data-toggle="dropdown">
                            Action <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="<?php echo URL::route('admin.service.edit', $data_row['id']); ?>">Edit</a></li>
                            <li class="divider"></li>
                            <li>
                                <?php echo Form::open(array('route' => array('admin.service.destroy', $data_row['id']), 'method' => 'DELETE', 'onSubmit' => "JavaScript:return confirm('Are you sure to delete?');")); ?>

                                <button type="submit" class="delete">Delete</button>                     
                                <?php echo Form::close(); ?>

                            </li>
                        </ul>
                    </div>
                </td>
            </tr>
            <?php endforeach; ?>
            <?php if(empty($data_result)): ?>
                <tr>
                    <th colspan="5" class="text-center text-danger">Empty data</th>
                </tr>
            <?php endif; ?>
        </tbody>
    </table>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('backend/layouts/admin-layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>