<?php $__env->startSection('content'); ?>
<div class="container-fluid">
	<div class="row">
		<div class="col-md-8 col-md-offset-2">
			<div class="panel panel-default">
				<div class="panel-heading">Task Groups
                    <div class="muted pull-right">
                        <a href="<?php echo e(URL('/groups/create/')); ?>" class="btn btn-success btn-xs">Add Group</a>
                     </div>
                </div>
				<div class="panel-body">
					<?php if(count($errors) > 0): ?>
						<div class="alert alert-danger">
							<strong>Whoops!</strong> There were some problems with your input.<br><br>
							<ul>
								<?php foreach($errors->all() as $error): ?>
									<li><?php echo e($error); ?></li>
								<?php endforeach; ?>
							</ul>
						</div>
					<?php endif; ?>

				 <?php if(Session::has('message')): ?>
						<div class="alert alert-success">
							<strong>  <?php echo e(Session('message')); ?> </strong>
        				</div>
					<?php endif; ?>


                     <?php if(count($groups) > 0): ?>


                     <table class="table table-hover sortable">
                     <thead>
                         <tr>
                            <th>Id</th>
                            <th>Group</th>
                            <th></th>
                         </tr>
                     </thead>
                     <tbody>
                      <?php foreach($groups as $group): ?>
                     <tr>
                            <td><?php echo e($group->id); ?></td>
                            <td><?php echo e($group->category); ?></td>
                            <td>
<p class="text-right">
<a class="btn btn-info btn-xs"  href="<?php echo e(URL::to('groups/edit/' . $group->id)); ?>"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit</a>&nbsp;<a class="btn btn-xs btn-danger" href="<?php echo e(URL::to('groups/delete/' . $group->id)); ?>" data-toggle="tooltip" data-placement="top" title="Warning: Group Deletion will delete all milestones, tasks under the group" onclick="return confirm('Warning: Group Deletion will delete all milestones, tasks under the group. Are your sure?')"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete</a>&nbsp;
<a class="btn btn-default btn-xs"  href="<?php echo e(URL::to('groups/milestones/' . $group->id)); ?>"><span class="glyphicon glyphicon-th-large" aria-hidden="true"></span> View Milestones</a>
<a class="btn btn-default btn-xs " href="<?php echo e(URL::to('groups/tasks/' . $group->id)); ?>"><span class="glyphicon glyphicon-th" aria-hidden="true"></span> View Tasks</a>
<a class="btn btn-default btn-xs " href="<?php echo e(URL::to('groups/status/' . $group->id)); ?>"><span class="glyphicon glyphicon-flag" aria-hidden="true"></span> Status</a>
</p>

                           </td>

                        </tr>
                         <?php endforeach; ?>
                     </tbody>

                     </table>
                       <?php echo str_replace('/?', '?', $groups->render()); ?>


                    <?php else: ?>
                       <h3>Oops! No Groups Found!</h3>
                    <?php endif; ?>


				</div>
			</div>
		</div>
	</div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>