
<?php $__env->startSection('subtitle'); ?>
Weapon Administration
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<div class="row">
    <div class="col-lg-12">
        <h1><?php echo $weapon -> name; ?> <small>Administration</small></h1>
        <ol class="breadcrumb">
            <li>
                <i class="fa fa-dashboard"></i>
                <a href="<?php echo route('adminDashboard'); ?>">
                    Dashboard
                </a>
            </li>
            <li>
                <i class="icon-file-alt"></i>
                <a href="<?php echo route('admin.game.index'); ?>">
                    Games
                </a>
            </li>
            <li>
                <i class="icon-file-alt"></i>
                <a href="<?php echo action('GameController@show', array('id' => $game -> id)); ?>">
                    <?php echo $game -> id; ?>
                </a>
            </li>
            <li>
                <i class="icon-file-alt"></i> <?php echo $weapon -> name; ?>
            </li>
        </ol>
    </div>
</div><!-- /.row -->

<div class="row">
    <div class="col-lg-12">
        <table class="table tablesorter">
            <thead>
                <tr>
                    <th> ID <i class="fa fa-sort"></i></th>
                    <th> Attachments <i class="fa fa-sort"></i></th>
                    <th> Created at <i class="fa fa-sort"></i></th>
                    <th> Updated at <i class="fa fa-sort"></i></th>
                    <th> Actions </th>
                </tr>
            </thead>
            <tbody>
                <?php foreach($loadouts as $loadout): ?>
                <tr>
                    <td>
                        <?php echo $loadout -> id; ?>
                    </td>
                    <td>
                        <ul>
                            <?php foreach(Loadout::findOrFail($loadout -> id) -> attachments as $attachment): ?>
                            <li>
                                <?php echo $attachment -> name; ?>
                            </li>
                            <?php endforeach; ?>
                        </ul>
                    </td>
                    <td>
                        <?php echo $loadout -> created_at; ?>
                    </td>
                    <td>
                        <?php echo $loadout -> updated_at; ?>
                    </td>
                    <td>
                        <a class="btn btn-danger" href="<?php echo route('deleteLoadout', array('id' => $game -> id, 'name' => $weapon -> name, 'loadoutID' => $loadout -> id)); ?>">
                            <span class="glyphicon glyphicon-trash"></span>
                        </a>
                    </td>
                </tr>
                <?php endforeach; ?>
            </tbody>
        </table>
    </div>
</div><!-- /.row -->
<?php $__env->stopSection(); ?>

<?php $__env->startSection('page-scripts'); ?>
<script src="<?php echo asset('js/tablesorter/jquery.tablesorter.js'); ?>"></script>
<script src="<?php echo asset('js/tablesorter/tables.js'); ?>"></script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>