<?php $__env->startSection('title', 'View output details'); ?>

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

    <div class="page-header clearfix">
        <h1 class="pull-left">Output details <small><?php echo e($output->name); ?></small></h1>
        <a href="<?php echo e(URL::route('admin.output.edit', $output->id)); ?>" class="btn btn-default pull-right">Edit details</a>
    </div>

    <h3>Details</h3>

    <div class="well">
        <?php echo $output->description; ?>

    </div>

    <h3>Actions</h3>

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

            <?php foreach($output->actions as $action): ?>
                <tr>
                    <td><?php echo e(($action->pivot->modifier === 1) ? $action->name : $action->plural); ?></td>
                    <td>
                        <a class="btn btn-default" href="<?php echo e(URL::route('admin.assignedActions.edit', ['output', $action->id, $output->id])); ?>">Edit action</a>&nbsp;
                        <form action="<?php echo e(URL::route('admin.assignedActions.destroy', ['output', $action->id, $output->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(); ?>