<div id="page-wrapper">
	<div class="main-page">
		<div class="forms">
			<div class=" form-grids row form-grids-right">
				<div class="widget-shadow " data-example-id="basic-forms"> 
					<div class="form-title">
						<h4>Master Jurusan</h4>
					</div>
				</div>
			</div>
		</div>
		<div class="tables">
			<div class="table-responsive bs-example widget-shadow">
				<p class="col-md-9">&nbsp;</p>
				<a href="<?php echo base_url();?>admin/Jurusan/jurusanAdd" class="col-md-3 btn btn-md btn-success">
					<i class="fa fa-plus"></i> Tambah Jurusan
				</a>
				<div class="clearfix"> </div>
				<br>
				<table class="table table-bordered">
					<thead>
						<tr>
							<th>No</th>
							<th>Jurusan</th>
							<th>Kode Jurusan</th>
							<th>Status</th>
							<th>Kelola</th>
						</tr>
					</thead>
					<tbody>
						<?php
							if($jurusan == NULL)
							{
								?>
								<tr>
									<td colspan="4"><center>Tidak ada data jurusan.</center></td>
								</tr>
								<?php
							}
							else
							{
								$no = 0;
								foreach($jurusan as $j)
								{
									$no++;
									?>
									<tr>
										<td><?php echo $no;?></td>
										<td><?php echo $j['jurusan'];?></td>
										<td><?php echo $j['kode_jurusan'];?></td>
										<td><span class="label label-<?php echo ($j['status'] == "Aktif" ? "success" : "danger");?>"><?php echo $j['status'];?></span></td>
										<td style="font-size:10px !important;">
											<a href="<?php echo base_url();?>admin/Jurusan/jurusanEdit/<?php echo $j['id_jurusan'];?>" class="btn btn-xs btn-warning" title="Ubah">
												<i class="fa fa-pencil"></i>
											</a>
											<a href="<?php echo base_url();?>admin/Jurusan/jurusanDelete/<?php echo $j['id_jurusan'];?>" class="btn btn-xs btn-danger" onclick="return confirm('Anda yakin akan menghapus jurusan ini?\nJurusan tidak dapat dihapus jika telah dipilih oleh calon siswa.');" title="Hapus">
												<i class="fa fa-trash"></i>
											</a>
										</td>
									</tr>
									<?php
								}
							}
						?>
					</tbody> 
				</table>
			</div>
		</div>
	</div>
</div>