<?php $__env->startSection('title', trans('user.views.companies.title')); ?>

<?php $__env->startSection('content'); ?>
    <div class="row">
        <div class="col-md-12">
            <div class="page-header">
                <h1><?php echo e(trans('user.views.companies.header')); ?> <small><?php echo e(trans('user.views.companies.subheader')); ?></small></h1>
            </div>

            <?php echo $__env->make('user._partials.navigation', ['_active_navigation' => 'companies'], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

            <hr>

            <div class="row">
                <div class="col-lg-10 col-lg-offset-1">
                    <?php echo Notification::showAll(); ?>

                    <?php if(count($companies) > 0): ?>
                        <table class="table table-striped table-hover">
                            <thead>
                                <tr>
                                    <th>&nbsp;</th>
                                    <th><?php echo e(trans('user.views.companies.table.name')); ?></th>
                                    <th><?php echo e(trans('user.views.companies.table.tagline')); ?></th>
                                    <th><?php echo e(trans('user.views.companies.table.webpage')); ?></th>
                                    <th class="text-right"><a href="<?php echo e(route('user.company.create')); ?>" class="btn btn-success btn-xs"><?php echo e(trans('user.views.companies.table.create')); ?></a></th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php foreach($companies as $company): ?>
                                    <tr>
                                        <td><img src="<?php echo e($company->logo_thumb); ?>"/></td>
                                        <td><a href="<?php echo e(route('user.company.edit', $company->id)); ?>"><?php echo e($company->name); ?></a></td>
                                        <td><?php echo e($company->tagline); ?></td>
                                        <td><a href="http://<?php echo e($company->webpage); ?>"><?php echo e($company->webpage); ?></a></td>
                                        <td class="text-right">
                                            <a href="<?php echo e(route('user.company.edit', $company->id)); ?>" class="btn btn-warning btn-xs"><?php echo e(trans('user.views.companies.table.edit')); ?></a>
                                            <a href="<?php echo e(route('user.company.delete', $company->id)); ?>" class="btn btn-danger btn-xs confirm-action"><?php echo e(trans('user.views.companies.table.delete')); ?></a>
                                        </td>
                                    </tr>
                                <?php endforeach; ?>
                            </tbody>
                        </table>
                    <?php else: ?>
                        <div class="alert alert-info" role="alert"><?php echo trans('user.views.companies.table.empty'); ?></div>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>