
<?php $__env->startSection('subtitle'); ?>
<?php echo $user -> username; ?> Submissions
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<div class="row">
    <div class="col-lg-12">
        <h1><?php echo $user -> username; ?> <small>Submissions</small></h1>
        <ol class="breadcrumb">
            <li>
                <i class="fa fa-dashboard"></i> Dashboard
            </li>
            <li>
                <i class="icon-file-alt"></i> 
                <a href="<?php echo route('modUsers'); ?>">
                    Users
                </a>
            </li>
            <li class="active">
                <i class="icon-file-alt"></i> Submissions
            </li>
        </ol>
    </div>
</div><!-- /.row -->

<div class="row">
    <div class="col-lg-7">
        <div class="well">
            <table class="table table-striped tablesorter">
                <thead>
                    <tr>
                        <th>Game <i class="fa fa-sort"></i></th>
                        <th>Weapon <i class="fa fa-sort"></i></th>
                        <th>Attachments <i class="fa fa-sort"></i></th>
                        <th>Actions</th>
                    </tr>
                </thead>
                <tbody>
                    <?php foreach($loadouts as $loadout): ?>
                    <?php
                    $weapon = Weapon::findOrFail($loadout -> weapon_id);
                    ?>
                    <tr id="loadout-<?php echo $loadout -> id; ?>">
                        <td>
                            <?php echo $weapon -> game_id; ?>
                        </td>
                        <td>
                            <?php echo $weapon -> name; ?>
                        </td>
                        <td>
                            <ul>
                                <?php foreach(Loadout::findOrFail($loadout -> id) -> attachments as $attachment): ?>
                                <li>
                                    <?php echo $attachment -> name; ?>
                                </li>
                                <?php endforeach; ?>
                            </ul>
                        </td>
                        <td>
                            <a class="btn btn-default" href="<?php echo route('showLoadout', array(urlencode($weapon -> game_id), urlencode($weapon -> name), $loadout -> id)); ?>">
                                <span class="glyphicon glyphicon-search"></span>
                            </a>
                            &nbsp;
                            <a class="btn btn-danger" href="#">
                                <span class="glyphicon glyphicon-trash"></span>
                            </a>
                        </td>

                    </tr>
                    <?php endforeach; ?>
                </tbody>
            </table>
        </div>
    </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(); ?>