<link rel="stylesheet" type="text/css" href="<?php echo base_url()."resources/css/bootstrap.min.css" ?>">
<link rel="stylesheet" type="text/css" href="<?php echo base_url()."resources/css/delegasi/dropzone.css" ?>">
<style type="text/css">
  .progress-bar-striped, .progress-striped .progress-bar{
    background-color: #729700;
  }
  #tabs2 .dropzone_content,#tabs2 .dz-message{
    background-color: #449D44;
    color: #fff;
  }
  .version_shading {
    height: 200px;
    top: -89px;
  }
  a.btn {color:#FFF;}
  .usual{color:#444;}
  #wrap {
    display: grid;
    grid-template-columns: 60% 38%;
    grid-gap: 10px;
    margin: auto;
    background-color: #fff;
    color: #444;
  }
   .box {
    background: rgba(0, 0, 0, 0) linear-gradient(to bottom, #ffffff, #f5f5f5) repeat scroll 0 0;
    border-color: #e1e1e1;
    border-image: none;
    border-radius: 3px;
    border-style: solid;
    border-width: 1px 1px 2px;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.15);
    color: #444;
    padding: 20px;
    font-size: 150%;
    position: relative;
    box-shadow: none;
    border: 1px solid #eee;
    text-align: center;
  }
  .hidden{display: none}
</style>
<div id="wrap">
  <div class="box">
            <table class="table table-bordered" style="font-size: 12px;">
              <thead>
                <th>No.</th>
                <th>File</th>
                <th>Aksi</th>
                <tbody>
                 <?php foreach ($delegasi_lampiran->result() as $row) {
                  echo   '<tr>';
                  echo            '<td>'.++$no.'</td>';
                  echo            '<td>'.$row->file.'</td>';
                  echo            '<td><a class="btn btn-primary" onclick="download_file(\''.$row->file.'\')">Download</a></td>';
                  echo  '</tr>';
                    } 
                  ?>
                </tbody>
            </table>
    </div>
    <div class="box">
      
    </div>
</div>
<?php if ($idalur==2) { 
        $folder_download='masuk';
      }else{
        $folder_download='keluar';
      }
;?>
<script type="text/javascript">
    function download_file(filename){
      var folder_download="<?php echo $folder_download;?>";
      window.open('<?php echo base_url_delegasi();?>'+'file/delegasi/'+folder_download+'/'+filename,'_blank');
    }
</script>

