<?php $__env->startSection("content"); ?>
<div>
	<ol class="breadcrumb">
		<li class="active">Department Heads</li>
	</ol>
</div>
<?php if(Session::has('message')): ?>
<div class="alert alert-info"><?php echo Session::get('message'); ?></div>
<?php endif; ?>
<div class="col-md-8 col-md-offset-1">
	<div  class="panel panel-default row" style="width:118%">
		<div class="panel-heading ">
			<span class="glyphicon glyphicon-user"></span>
			List of Department Heads
			<div class="panel-btn">
				<a class="btn btn-sm btn-info" href="<?php echo URL::to("hod/create"); ?>" >
					<span class="glyphicon glyphicon-plus-sign"></span>New Department Head
				</a>
			</div>
		</div>
		<div class="panel-body">
			<table class="table table-striped table-hover table-bordered table-condensed search-table">
				<thead>
					<tr>
						<th><?php echo Lang::choice('messages.name',1); ?></th>
						<th><?php echo trans('messages.email'); ?></th>
						<th><?php echo trans('messages.gender'); ?></th>
						<th>Department Headed</th>
						<th><?php echo trans('messages.actions'); ?></th>
					</tr>
				</thead>
				<tbody>
					<?php foreach($depthead as $user): ?>
					<tr <?php if(Session::has('activeuser')): ?>
					<?php echo (Session::get('activeuser') == $user->id)?"class='info'":""; ?>

					<?php endif; ?>
					>

					<td><?php echo $user->name; ?></td>
					<td><?php echo $user->email; ?></td>
					<td><?php echo $user->gender; ?></td>
					<td><?php echo $department[$user->department]; ?></td>

					<td>

						<!-- show the user (uses the show method found at GET /user/{id} -->
						<a class="btn btn-sm btn-success" href="<?php echo URL::to("user/" . $user->id); ?>">
							<span class="glyphicon glyphicon-eye-open"></span>
							<?php echo trans('messages.view'); ?>

						</a>

						<!-- edit this user (uses the edit method found at GET /user/{id}/edit -->
						<a class="btn btn-sm btn-info" href="<?php echo URL::to("user/" . $user->id . "/edit"); ?>" >
							<span class="glyphicon glyphicon-edit"></span>
							<?php echo trans('messages.edit'); ?>

						</a>
						<!-- delete this user (uses the delete method found at GET /user/{id}/delete -->
						<button class="btn btn-sm btn-danger delete-item-link <?php echo ($user == User::getAdminUser()) ? 'disabled': ''; ?>"
						data-toggle="modal" data-target=".confirm-delete-modal"
						data-id='<?php echo URL::to("user/" . $user->id . "/delete"); ?>'>
						<span class="glyphicon glyphicon-trash"></span>
						<?php echo trans('messages.delete'); ?>

					</button>

				</td>
			</tr>
			<?php endforeach; ?>
		</tbody>
	</table>
	<?php echo Session::put('SOURCE_URL', URL::full()); ?>

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

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