<?php $__env->startSection('title', 'Companies - List'); ?>

<?php $__env->startSection('content_header', 'Companies <small>companies list</small>'); ?>

<?php $__env->startSection('content'); ?>
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <h3 class="box-title">Companies</h3>
                    <div class="box-tools">
                        <a href="<?php echo e(route('admin.companies.create')); ?>" class="btn btn-box-tool pull-right" data-toggle="tooltip" title="Create" data-widget="chat-pane-toggle" data-original-title="Create"><i class="fa fa-plus"></i> Create</a>
                        <form class="form-horizontal" method="GET" action="<?php echo e(route('admin.companies.index')); ?>">
                            <div class="input-group">
                                <input type="text" name="query" class="form-control input-sm pull-right" style="width: 180px;" placeholder="Search by name..." value="<?php echo e($query); ?>">
                                <div class="input-group-btn">
                                    <button class="btn btn-sm btn-default"><i class="fa fa-search"></i></button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <?php if(count($companies) > 0): ?>
                    <div class="box-body table-responsive no-padding">
                        <table class="table table-hover">
                            <tr>
                                <th><?php echo $__env->make('admin._partials.sort_snippet', ['_field' => 'id', '_title' => '#'], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?></th>
                                <th><?php echo $__env->make('admin._partials.sort_snippet', ['_field' => 'name', '_title' => 'Name'], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?></th>
                                <th><?php echo $__env->make('admin._partials.sort_snippet', ['_field' => 'tagline', '_title' => 'Tagline'], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?></th>
                                <th><?php echo $__env->make('admin._partials.sort_snippet', ['_field' => 'webpage', '_title' => 'Webpage'], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?></th>
                                <th><?php echo $__env->make('admin._partials.sort_snippet', ['_field' => 'created_at', '_title' => 'Created at'], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?></th>
                                <th><?php echo $__env->make('admin._partials.sort_snippet', ['_field' => 'updated_at', '_title' => 'Updated at'], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?></th>
                                <th>&nbsp;</th>
                            </tr>
                            <?php foreach($companies as $company): ?>
                                <tr>
                                    <td><?php echo e($company->id); ?></td>
                                    <td><a href="<?php echo e(route('admin.companies.show', $company->id)); ?>"><?php echo e($company->name); ?></a></td>
                                    <td><?php echo e($company->tagline); ?></td>
                                    <td><?php echo e($company->webpage); ?></td>
                                    <td><?php echo e($company->created_at); ?></td>
                                    <td><?php echo e($company->updated_at); ?></td>
                                    <td class="text-right">
                                        <a href="<?php echo e(route('admin.companies.show', $company->id)); ?>" class="btn btn-success btn-xs">view</a>
                                        <a href="<?php echo e(route('admin.companies.edit', $company->id)); ?>" class="btn btn-warning btn-xs">edit</a>
                                        <a href="<?php echo e(route('admin.companies.delete', $company->id)); ?>" class="btn btn-danger btn-xs confirm-action">delete</a>
                                    </td>
                                </tr>
                            <?php endforeach; ?>
                        </table>
                    </div>
                    <?php if($companies->hasPages()): ?>
                        <div class="box-footer">
                            <?php echo $companies->render(); ?>

                        </div>
                    <?php endif; ?>
                <?php else: ?>
                    <div class="box-body">
                        <div class="alert alert-info">Companies list is empty.</div>
                    </div>
                <?php endif; ?>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>