<?php $__env->startSection('content'); ?>
<style>
	table {
		width: 90% !important;
		/*margin: 0 50px;*/
	}
	#studentImg {
		width: 50px;
	}

	#delst {
		border: none;
		background: none;
	}

	.group-details {
		margin: 0 20px;
	}

	#tutorImg {
		border-radius: 25px;
	}
</style>
<?php foreach($group as $g): ?>
	<div class="group-details">
		<h2><?php echo e($g->name); ?></h2>

		<h4>Group details:</h4>

		Begin date: <?php echo e($g->begin_date); ?> <br>
		End date: <?php echo e($g->end_date); ?> <br>
		Course: <?php echo e($g->courses->name); ?> <br>
		Location: <?php echo e($g->schools->name); ?> <br><br>

		Tutor: <?php echo e($g->tutors->first_name . ' ' . $g->tutors->last_name); ?><br>
		<div class="tutor-image">
			<img src="<?php echo e(URL::asset('images') . '/users/' . $g->tutors->photoURL); ?>" id="tutorImg" alt="">
		</div>
		<a href="" class="btn btn-primary">Edit Group Info</a>
		<a href="" class="btn btn-primary">Group Schedule</a><br><br>

		<h2>Students:</h2>
		<table class="table table-striped table-bordered">
			<thead>
				<tr>
					<th></th>
					<th>Name</th>
					<th>Remove student</th>
				</tr>
			</thead>
			<tbody>
				<?php foreach($g->users as $student): ?>
				<tr>
					<td width="50px">
						<?php if($student->photoURL != ''): ?>
						<img src="<?php echo e(URL::asset('/images/users/') . '/' . $student->photoURL); ?>" id="studentImg" alt="">
						<?php else: ?>
						<img src="<?php echo e(URL::asset('images/users/user.png')); ?>" id="studentImg" alt="">
						<?php endif; ?>
					</td>
					<td width="500px"><?php echo e($student->first_name . ' ' . $student->last_name); ?></td>
					<td width="10px">
						<form action="<?php echo e(URL::to('/admin/administration/manage-groups/remove-student')); ?>" method="post">
							<input type="hidden" name="_method" value="delete">
							<input type="hidden" name="userId" value="<?php echo e($student->id); ?>">
							<input type="hidden" name="groupId" value="<?php echo e($g->id); ?>">
							<input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">
							<button type="submit" id="delst"><i class="fam-cross"></i></button>
						</form>
					</td>
				</tr>
				<?php endforeach; ?>
			</tbody>
		</table>
	</div>
<?php endforeach; ?>

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