IMMREX7
<?php $__env->startSection('content'); ?>
<div class="row clearfix">
<div class="col-lg-12">
<div class="card">
<?php $__currentLoopData = $positive_news; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="body">
<div class="row">
<?php if(isset($val->image)): ?>
<div class="preview col-lg-4 col-md-12">
<div class="preview-pic tab-content">
<div class="tab-pane active" id="product_1">
<img src="<?php echo e(asset('storage/schools/'.$val->idSchool.'/positivenews/'.$val->image)); ?>" class="img-fluid">
</div>
</div>
</div>
<?php endif; ?>
<div class="details col-lg-8 col-md-12">
<h3 class="product-title m-b-0"><?php echo e($val->category); ?></h3>
<h6 class="price m-t-0"><span class="col-amber">DATE: <?php echo e($val->publishDate); ?> , SOURCE: <?php echo e($val->source); ?></span></h6>
<hr>
<p class="product-description"><?php echo e($val->news); ?></p>
<hr>
</div>
</div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script>
$(document).on('click', '.select-all', function(){
var checkAll = this.checked;
if(checkAll === true){
$('.chkall').each(function () {
this.checked = checkAll;
});
}else{
$('.chkall').each(function () {
this.checked = checkAll;
});
}
});
$(document).on('click', '.js-sweetalert', function (e) {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
e.preventDefault();
var id = $(this).data('id');
swal({
title: "Are you sure?",
text: "Are You sure you want to delete this Newsletter!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, delete it!",
closeOnConfirm: true
},
function() {
// console.log('here');
$.ajax({
type: "DELETE",
url: "<?php echo e(url('/teacher/positivenews/')); ?>" +"/"+id,
data: {id:id}
})
.done(function(data) {
swal({
title: "Deleted",
text: "Positive News has been successfully deleted",
type: "success"
},function() {
location.reload();
});
})
.error(function(data) {
swal("Oops", "We couldn't connect to the server!", "error");
});
return false;
});
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('students.student_layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
Copyright © 2021 -