<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 Pertanyaan</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/Pertanyaan/pertanyaanAdd" class="col-md-3 btn btn-md btn-success">
					<i class="fa fa-plus"></i> Tambah Pertanyaan
				</a>
				<div class="clearfix"> </div>
				<br>
				<table class="table table-bordered" id="dataku">
					<thead>
						<tr>
							<th>No</th>
							<th>Pertanyaan</th>
							<th>Kode Jurusan</th>
							<th>Kelola</th>
						</tr>
					</thead>
					<tbody>
						<?php
							if($pertanyaan == NULL)
							{
								?>
								<tr>
									<td colspan="4"><center>Tidak ada data pertanyaan.</center></td>
								</tr>
								<?php
							}
							else
							{
								$no = 0;
								foreach($pertanyaan as $p)
								{
									$no++;
									?>
									<tr>
										<td><?php echo $no;?></td>
										<td><?php echo $p['pertanyaan'];?></td>
										<td><?php echo $p['kode_jurusan'];?></td>
										<td style="font-size:10px !important;">
											<a href="<?php echo base_url();?>admin/Pertanyaan/pilihanJawaban/<?php echo $p['id_pertanyaan'];?>" class="btn btn-xs btn-primary" title="Pilihan Jawaban">
												<i class="fa fa-list"></i>
											</a>
											<a href="<?php echo base_url();?>admin/Pertanyaan/pertanyaanEdit/<?php echo $p['id_pertanyaan'];?>" class="btn btn-xs btn-warning" title="Ubah">
												<i class="fa fa-pencil"></i>
											</a>
											<a href="<?php echo base_url();?>admin/Pertanyaan/pertanyaanDelete/<?php echo $p['id_pertanyaan'];?>" class="btn btn-xs btn-danger" onclick="return confirm('Anda yakin akan menghapus pertanyaan ini?\nPertanyaan tidak dapat dihapus jika sudah memiliki pilihan jawaban.');" title="Hapus">
												<i class="fa fa-trash"></i>
											</a>
										</td>
									</tr>
									<?php
								}
							}
						?>
					</tbody> 
				</table>
			</div>
		</div>
	</div>
</div>