<?php
$canEditPemeriksaanPersiapan=false;
$canEditPemeriksaanPersiapan=$this->authorization->HasRuleHakimPanitera($idperkara);
?>
<div style="font-size:14px;">
<table id='infoPerkara' style="font-size:14px; width:100%; " border="0">
	<col width="30%">
	<col width="40">
	<col width="20%">
	<tbody>
	
		<tr>
			<td style="width:15%;" id="first-child">Perbaikan/Dinyatakan Lengkap</td>
			<td style="width:35%;"><?php 
			if ($perbaikan==1){
				echo "Diperbaiki dan Dinyatakan Lengkap";
			}else if ($perbaikan==2){
				echo "Dinyatakan Lengkap";
				
			} 
				
			?></td>
			<?php
			if($canEditPemeriksaanPersiapan){				
			?>			
			<td align="right" style="width:85%;">[<a href="#" onClick="popup_form('<?php echo base_url('edit_perbaikan_gugatan/'.$enc);?>')">Edit Perbaikan Gugatan </a>]
			[<a href="#" onClick="popup_form('<?php echo base_url('hapus_perbaikan_gugatan/'.$enc);?>')"><font color='red'><b>Hapus Perbaikan Gugatan</b></font></a>]</td>				
			<?php } ?>
		</tr>
		<tr>
			<td style="width:15%;" id="first-child">Tanggal Saran Perbaikan Gugatan</td>
			<td style="width:85%;" colspan="2"><?php echo $tanggal_saran_perbaikan; ?></td>
		</tr>
		<tr>
			<td style="width:15%;" id="first-child">Tanggal Perbaikan/Dinyatakan Lengkap</td>
			<td style="width:85%;" colspan="2"><?php echo $tgl_perbaikan_gugatan; ?></td>
		</tr>
		<?php 
		if($perbaikan==1){
			echo '<tr>';
				echo '<td style="width:15%;" id="first-child">Petitum</td>';
				echo '<td style="width:85%;" colspan="2">'.$petitum.'</td>';
			echo '</tr>';
		}
		?>
		<tr>
			<td style="width:15%;" id="first-child">E-Doc Gugatan Perbaikan</td>
			<td style="">
				<?php
				$baseurl=$petitumdokumen;
                if (($baseurl) and (file_exists($baseurl))){
                    echo "<a target='_new' href=$baseurl>Unduh Dokumen</a>";
                }else{
                    echo "<span style='color:red;font-weight:bold'>Dokumen Belum Ada</span>";
                }
				?>
			</td>
			<?php
			if($canEditPemeriksaanPersiapan){ ?>
				<td style='text-align:right;width:85%;'>
				[ <a href="#" onClick="popup_form('<?php echo base_url("fileupload/".$enc."/perbaikangugatan");?>')">Edit E-Doc</a> ]				
				</td>
			<?php }
			?>
		</tr>
		
	</tbody>
</table>
</div>
<script type="text/javascript">
	function pilih_cetak(ele){
		if (ele.value!=1) {
			popup_form(ele.value);
			$(ele).val('1');
		}
	}
	function cetakBAP1(){
	window.open('<?php echo base_url("c_template_tun/cetak_penetapan_persiapan_tun/")."/".$enc."/5/";?>','_self');
	}
	function cetakBAP2(){
	window.open('<?php echo base_url("c_template_tun/cetak_penetapan_persiapan_tun/")."/".$enc."/6/";?>','_self');
	}
	
    closeLoading();
</script>
