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

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

    <div class="page-header clearfix">
        <h1 class="pull-left">Manage Actions</h1>
        <a href="<?php echo e(URL::route('admin.action.create')); ?>" class="pull-right btn btn-default">Add Action</a>
    </div>

    <table class="table table-striped">
        <thead>
            <tr>
                <th>Action Name</th>
                <th>Plural</th>
                <th></th>
            </tr>
        </thead>
        <tbody>
            <?php if(!count($actions)): ?>
                <tr>
                    <td colspan="3" class="text-center">No actions created. Why not, <a href="<?php echo e(URL::route('admin.action.create')); ?>">add a new action</a>?</td>
                </tr>
            <?php endif; ?>

            <?php foreach($actions as $action): ?>
                <tr>
                    <td><?php echo e($action->name); ?></td>
                    <td><?php echo e($action->plural); ?></td>
                    <td>
                        <a class="btn btn-default" href="<?php echo e(URL::route('admin.action.show', $action->id)); ?>">View details</a>&nbsp;
                        <a class="btn btn-default" href="<?php echo e(URL::route('admin.action.edit', $action->id)); ?>">Edit</a>&nbsp;
                        <form action="<?php echo e(URL::route('admin.action.destroy', $action->id)); ?>" class="inline delete-form" method="post">
                            <?php echo csrf_field(); ?>

                            <input type="hidden" name="_method" value="DELETE">
                            <button class="btn btn-danger">Delete</button>
                        </form>
                    </td>
                </tr>
            <?php endforeach; ?>
        </tbody>
    </table>
<?php $__env->stopSection(); ?>

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