<style type="text/css">
#infoPerkara .wrapword li {
  display: list-item !important;
  clear: both;
  float: none !important;
}
</style>
<?php $idalurperkara = $this->tanggalhelper->getIDAlurPerkara($idperkara);?>
<div style="font-size:14px;">
	<table id='infoPerkara' style="font-size:14px;width:100%;">
        <col width="15%">
        <col width="85%">
        <tbody>
            <tr>
                <td style="background-color:#A3DBA8;padding:5px;" colspan="2">Data Penetapan</td>
            </tr>
        </tbody>
    </table>
	<table id='infoPerkara' style="font-size:14px;width:100%;">
		<col width="15%">
		<col width="85%">
		<tbody>
			
			<tr>
				<td id="first-child">Tanggal Penetapan Gugur</td>
				<td><?php echo $this->tanggalhelper->convertDayDate($tgl_penetapan);?></td>
			</tr>
			<tr>
				<td id="first-child" style="vertical-align: top;">Amar Penetapan Gugur</td>
				<td class='wrapword'><?php echo $isi_penetapan;?></td>
			</tr>
            <tr>
                <td id="first-child">Cetak Dokumen Penetapan</td>
                <td>
                    <a href="#" onClick=cetakPenetapanGugur()>
                        <img src="<?php echo base_url();?>resources/img/nm_icon_doc.gif">
                    </a>    
                </td>
            </tr>
			<?php if ($this->authorization->HasRuleHakimPanitera($idperkara)){?>
				<tr>
					<td colspan="3">[<a href="#" onClick="popup_form('<?php echo base_url("edit_pen_gugur/".$enc);?>')">Edit Penetapan Gugur</a>]</td>
				</tr>
			<?php }?>
		</tbody>
	</table>
	<div style="padding:3px;"></div>
    <table id='infoPerkara' style="font-size:14px;width:100%;">
        <col width="15%">
        <col width="85%">
        <tbody>
            <tr>
                <td style="background-color:#A3DBA8;padding:5px;" colspan="2">Data Pemberitahuan</td>
            </tr>
        </tbody>
    </table>
    <table id="infoPerkara" style="font-size:14px;width:100%;">
        <col width="15%">
        <col width="85%">
        <tbody>
            <tr>
				<td id="first-child">Tanggal Pemberitahuan</td>
				<td>
                                <?php
                                if($pihak_pertama!=''){
                                    if($pihak_pertama->num_rows>0){
                                ?>
                                    <div class="cssTable" style="margin:0px;border:0px;">
                                        <table id="tableinfo" style="margin:0px;padding:0px;">
                                            <col width="15%">
                                            <col width="55%">
                                            <col width="30%">
                                            <tbody>
                                                <tr>
                                                    <td>Status</td>
                                                    <td>Nama</td>
                                                    <td>Tanggal Pemberitahuan</td>
                                                </tr>
                                                    <?php
                                                    $i=1;
                                                    foreach ($pihak_pertama->result() as $row) {
                                                        $status = $this->nativesession->getStatusPihak(10,$idalurperkara,1);
                                                        echo '<tr>';
                                                            echo '<td>'.$status.' '.$row->urutan.'</td>';
                                                            echo '<td>'.$row->nama.'</td>';
                                                            echo '<td>'.$this->tanggalhelper->convertDayDate($row->tanggal_pemberitahuan_putusan).'</td>';
                                                        echo '</tr>';
                                                    }?>
                                                    </tbody>
                                                </table>
                                            </div>
                                        <?php
                                        }
                                    }
                                    ?>  
                                <br>
                                    <?php
                                    if($pihak_kedua!=''){
                                        if($pihak_kedua->num_rows>0){
                                    ?>
                                        <div class="cssTable" style="margin:0px;border:0px;">
                                            <table id="tableinfo" style="margin:0px;padding:0px;">
                                                <col width="15%">
                                                <col width="55%">
                                                <col width="30%">
                                                <tbody>
                                                    <tr>
                                                        <td>Status</td>
                                                        <td>Nama</td>
                                                        <td>Tanggal Pemberitahuan</td>
                                                    </tr>
                                                    <?php
                                                    $i=1;
                                                    foreach ($pihak_kedua->result() as $row) {
                                                        $status = $this->nativesession->getStatusPihak(10,$idalurperkara,2);
                                                        echo '<tr>';
                                                            echo '<td>'.$status.' '.$row->urutan.'</td>';
                                                            echo '<td>'.$row->nama.'</td>';
                                                            echo '<td>'.$this->tanggalhelper->convertDayDate($row->tanggal_pemberitahuan_putusan).'</td>';
                                                        echo '</tr>';
                                                    }?>
                                                    </tbody>
                                            </table>
                                        </div>
                                    <?php
                                        }
                                    }
                                    ?>
                                </td>
			</tr>
			<tr>
				<td id="first-child">Tanggal Minutasi</td>
				<td><?php echo $this->tanggalhelper->convertDayDate($tgl_minutasi);?></td>
			</tr>
			<?php 
			
			if ($this->authorization->HasRuleEditPendaftaran($idalurperkara, $idperkara) || $this->authorization->HasRuleEditPemberitahuanPutusan($idalurperkara, $idperkara)){?>
				<tr>
					<td colspan="2">[<a href="#" onClick="popup_form('<?php echo base_url("add_pemberitahuan_pen_gugur/".$enc."/update");?>')">Edit Pemberitahuan Penetapan</a>]</td>
				</tr>
			<?php } ?>
		</tbody>
	</table>
</div>
<script type="text/javascript">
function cetakPenetapanGugur(){
    window.open('<?php echo base_url("c_template_penetapan_perdata/cetak_penetapan_gugur_pdt/".$enc);?>','_self');
};
closeLoading();
</script>
