Commit 622559ab by Alfiro Pratama

Tampil Modal Video

parent 6a74ac36
......@@ -79,21 +79,31 @@ class SeleksiController extends Controller
{
$item = DaftarProposal::where('proposal_id', $request->proposal_id)->first();
$item['url'] = DaftarProposal::where('proposal_id', $request->proposal_id)->get();
$nilai_1= DB::select("select ambil_jumlah_penilaian_seleksi('".$item->reviewer_proposal_id_1."', '".$item->jenis_id."')")[0]->ambil_jumlah_penilaian_seleksi;
$nilai_2= DB::select("select ambil_jumlah_penilaian_seleksi('".$item->reviewer_proposal_id_2."', '".$item->jenis_id."')")[0]->ambil_jumlah_penilaian_seleksi;
$rata = number_format((float) (($nilai_1 + $nilai_2) / 2), 0, '.', '');
$data = '';;
$data = '';
$link = '';
foreach ($item['url'] as $surel) {
$link .= $surel->url;
}
// dd($surel->url);
if($item->upload_dokumen){
$dokumen = ' <a href="https://statik.unesa.ac.id/simpmw/proposal/'. $item->periode .'/'. $item->upload_dokumen.'" target="_blank" class="btn btn-success btn-sm"> <i class="far fa-eye"></i> Lihat Proposal</a>
<iframe id="view-pdf" width="100%" height="400px" src="https://statik.unesa.ac.id/simpmw/proposal/'. $item->periode .'/'.$item->upload_dokumen .'" frameborder="0"></iframe>';
$url = '<a class="btn btn-success btn-sm" target="_blank" href="'. $link .'"><i class="far fa-eye"></i> Lihat Video</a>';
}else{
$dokumen = '<div class="alert alert-danger alert-dismissible fade show mb-0" role="alert">
<strong>Informasi!</strong><br/> File tidak ditemukan.
</div>';
$url = '<div class="alert alert-danger alert-dismissible fade show mb-0" role="alert">
<strong>Informasi!</strong><br/> File tidak ditemukan.
</div>';
}
if(is_null($item->status)){
......@@ -120,6 +130,10 @@ class SeleksiController extends Controller
<td>".$dokumen."</td>
</tr>
<tr>
<td>Video Produk</td>
<td>".$url."</td>
</tr>
<tr>
<td>Komentar</td>
<td>
<h4 class='card-title mb-4'>Nilai Total </h4>
......
......@@ -231,8 +231,12 @@ class DaftarSeleksiController extends Controller
var videoUrl = $(this).attr('data-video');
if (videoUrl) {
if (videoUrl.includes('youtu.be')) {
videoUrl = videoUrl.replace('youtu.be/', 'youtube.com/watch?v=');
}
if (videoUrl.includes('youtu.be')) {
videoUrl = videoUrl.split('?')[0];
} else if (videoUrl.includes('youtube.com')) {
} else if (videoUrl.includes('youtube.com/watch?v=')) {
videoUrl = videoUrl.split('&')[0];
}
if (isValidYouTubeUrl(videoUrl)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment