sekolah_adiwiyata/resources/views/modules/export/usulan.blade.php

48 lines
1.8 KiB
PHP

<?php
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename={$table}.xls");
header("Pragma: no-cache");
//dd($records);
?>
<table border="1" width="100%">
<thead>
<tr style="text-align: center; font-weight:bold; vertical-align:middle;">
<th rowspan="2">No</th>
<th rowspan="2">Tahun</th>
<th rowspan="2">NPSN</th>
<th rowspan="2">Nama Sekolah</th>
<th rowspan="2">Wilayah</th>
<th colspan="{{ $type == 'kota' ? '2' : '3' }}">Pemenuhan Kriteria</th>
<th rowspan="2">Status</th>
</tr>
<tr>
<th>Sekolah</th>
@if ($type == 'kota')
<th>Kota</th>
@else
<th>Kota</th>
<th>Provinsi</th>
@endif
</tr>
</thead>
<tbody>
@foreach ($kuesioner as $key => $row)
<tr style="vertical-align:middle;">
<td>{{ $key+1 }}</td>
<td>{{ @$row->tahun }}</td>
<td>{{ @$row->sekolah->npsn}}</td>
<td>{{ @$row->sekolah->nama_sekolah }}</td>
<td>{{ @$row->sekolah->kabupaten->name }}</td>
<td>{{getNilaiAll('sekolah',$row->ms_sekolah_id,$row->KuesionerId)}}</td>
@if ($type == 'kota')
<td>{{getNilaiAll('kota',$row->ms_sekolah_id,$row->KuesionerId)}}</td>
@else
<td>{{getNilaiAll('kota',$row->ms_sekolah_id,$row->KuesionerId)}}</td>
<td>{{getNilaiAll('provinsi',$row->ms_sekolah_id,$row->KuesionerId)}}</td>
@endif
<td>{{ strip_tags(kuesionerLogStatus($row->KuesionerId)) }}</td>
</tr>
@endforeach
</tbody>
</table>