IMMREX7
@extends('teachers.teacher_layout')
@section('content')
<div class="row clearfix">
<div class="col-sm-12">
<div class="card member-card" style="margin-bottom:10px;">
<div class="member-img">
<a href="#" class="">
<img src="{{ asset('storage/schools/'.$teacher->idSchool.'/employees/'.$teacher->photo)}}" class="rounded-circle">
</a>
</div>
<div class="">
<h4 class="m-t-10">{{$teacher->firstName}} {{$teacher->lastName}}</h4>
</div>
<div class="body">
<div class="row clearfix">
<div class="col-sm-4">
<p class="text-muted">EC No. : {{$teacher->enrollmentNo}}</p>
<p class="text-muted">Contact No : {{$teacher->mobile}}</p>
<p class="text-muted">Address : {{$teacher->address}}</p>
</div>
<div class="col-sm-4">
</div>
<div class="col-sm-4">
@if($empdesig->designationName == 'Teacher')
<p class="text-muted"><strong>Assigned Class : </strong>
@foreach($classes as $c) {{$c->className}} - (Section - {{$c->sectionName or 'All'}}) ,
@endforeach</p>
@endif
</div>
</div>
<hr>
</div>
</div>
</div>
</div>
@if($empdesig->designationName == 'Teacher')
<div class="row clearfix">
<!--</div>
<div class="row clearfix">-->
<div class="col-sm-12">
<div class="card">
<div class="header">
<h2><strong>List Of Subjects Assigned</strong></h2>
</div>
<div class="body table-responsive">
<table class="table table-bordered table-striped table-hover js-basic-example dataTable">
<thead>
<tr>
<th>S. No.</th>
<th>Class</th>
<th>Subject</th>
</tr>
</thead>
<tbody>
<?php $i = 1;?>
@foreach($subjects as $value)
<tr>
<th scope="row">{{$i}}</th>
<td>{{$value->className}}</td>
<td>{{$value->subjectName}}</td>
</tr>
<?php $i++; ?>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@endif
<div class="row clearfix">
<div class="col-lg-6 col-md-6">
<div class="card">
<div class="header">
<h2><strong>Thoughts</strong></h2>
</div>
<div class="body" style="height: 500px;">
<?php $thoughts = \App\WeekThought::where('idSchool', '=', Auth::guard('teacher')->user()->idSchool)->orderBy('idThought', 'desc')->limit(1)->first(); ?>
<!--<div class="card">-->
@if($thoughts)
<img class="img-fluid" height="300" src="{{ asset('storage/schools/'.$thoughts->idSchool.'/thoughts/'.$thoughts->image)}}">
<div class="body" style="height: 150px;">
<h3 class="title" style="margin-bottom:10px;">Source : {{$thoughts->source}}</h3>
<p class="text">
{{ str_limit($thoughts->thought, 100) }}
@if (strlen(strip_tags($thoughts->thought)) > 100)
<button class="btn btn-xs btn-info js-sweetalertthought" data-type="confirm" data-msg="{{$thoughts->thought}}">readmore..</button>
@endif
</p>
<p class="text">
<!--<small class="text-muted">Last updated 3 mins ago</small>-->
</p>
</div>
@endif
<!--</div>-->
</div>
</div>
</div>
<div class="col-lg-6 col-md-6">
<div class="card">
<div class="header">
<h2><strong>Positive News</strong></h2>
</div>
<div class="body" style="height:500px;">
<?php $pnews = \App\PositiveNews::where('idSchool', '=', Auth::guard('teacher')->user()->idSchool)->orderBy('idNews', 'desc')->limit(1)->first(); ?>
<!--<div class="card">-->
@if($pnews)
<img class="img-fluid" height="300" src="{{ asset('storage/schools/'.$pnews->idSchool.'/positivenews/'.$pnews->image)}}">
<div class="body" style="height: 150px;">
<h3 class="title" style="margin-bottom:10px;">Source : {{$pnews->source}}</h3>
<p class="text">
{{ str_limit($pnews->news, 100) }}
@if (strlen(strip_tags($pnews->news)) > 100)
<button class="btn btn-xs btn-info js-pnews" data-type="confirm" data-msg="{{$pnews->news}}">readmore..</button>
@endif
</p>
<p class="text">
<!--<small class="text-muted">Last updated 3 mins ago</small>-->
</p>
</div>
@endif
</div>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-lg-6 col-md-6">
<div class="card">
<div class="header">
<h2><strong>Newsletter</strong></h2>
</div>
<div class="body" style="height: 500px;">
<?php $newsletter = \App\NewsLetter::where('idSchool', '=', Auth::guard('teacher')->user()->idSchool)->orderBy('idNewsletter', 'desc')->limit(1)->first(); ?>
<!--<div class="card">-->
@if($newsletter)
<img class="img-fluid" height="300" src="{{ asset('storage/schools/'.$newsletter->idSchool.'/newsletters/'.$newsletter->image)}}">
<div class="body" style="height: 150px;">
<h3 class="title" style="margin-bottom:10px;">Source : {{$newsletter->title}}</h3>
<p class="text">
{{ str_limit($newsletter->description, 100) }}
@if (strlen(strip_tags($newsletter->description)) > 100)
<button class="btn btn-xs btn-info js-newsletter" data-type="confirm" data-msg="{{$newsletter->description}}">readmore..</button>
@endif
</p>
<p class="text">
<!--<small class="text-muted">Last updated 3 mins ago</small>-->
</p>
</div>
@endif
<!--</div>-->
</div>
</div>
</div>
<div class="col-lg-6 col-md-6">
<div class="card">
<div class="header">
<h2><strong>Circuller</strong></h2>
</div>
<div class="body" style="height: 500px;">
<?php $circuller = \App\Noticeboard::where('idSchool', '=', Auth::guard('teacher')->user()->idSchool)->orderBy('idNoticeboard', 'desc')->limit(1)->first(); ?>
<!--<div class="card">-->
@if($circuller)
<div class="body" >
<h3 class="title" style="margin-bottom:10px;">Source : {{$circuller->subject}}</h3>
<p class="text">
{{ str_limit($circuller->notice) }}
</p>
<p class="text">
<!--<small class="text-muted">Last updated 3 mins ago</small>-->
</p>
</div>
@endif
</div>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-8">
<div id="calendar"></div>
</div>
<div class="col-sm-4">
<div class="card activities">
<div class="header">
<h2><strong>Upcoming Birthdays</strong></h2>
</div>
<div class="body">
<ul class="list-unstyled activity">
<?php $stds_birday = \App\AdmEntry::where('idClass', '=', Auth::guard('teacher')->user()->idClass)->whereRaw('MONTH(studentDob) = MONTH(NOW())')->get(); ?>
@if(count($stds_birday)>0)
@foreach($stds_birday as $d)
<li>
<a href="javascript:void(0)">
<i class="zmdi zmdi-cake bg-red"></i>
<div class="info">
<h4>{{$d->firstName}} {{$d->firstName}} Birthday</h4>
<small>On {{$d->studentDob}}</small>
</div>
</a>
</li>
@endforeach
@else
<li>No Birthday in this month</li>
@endif
</ul>
</div>
</div>
</div>
</div>
<?php $folders = \App\GalleryFolder::where('idSchool', '=', Auth::guard('teacher')->user()->idSchool)->limit(3)->get(); ?>
@if(count($folders)>0)
@foreach($folders as $var)
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="card">
<div class="header">
<h2><strong>{{$var->folderName}} : Images</strong></h2>
</div>
<div class="body">
<div id="aniimated-thumbnials" class="list-unstyled row clearfix">
@foreach($var->gal_images as $value)
<div class="col-xl-3 col-lg-4 col-md-6 col-sm-12 m-b-20"> <a href="{{ asset('storage/schools/'.$value->idSchool.'/galleries/'.$value->folder->folderName.'/'.$value->image)}}">
<img class="img-fluid img-thumbnail" height="300" src="{{ asset('storage/schools/'.$value->idSchool.'/galleries/'.$value->folder->folderName.'/'.$value->image)}}" alt=""> </a> </div>
@endforeach
</div>
</div>
</div>
</div>
</div>
@endforeach
@endif
@stop
@section('script')
<script>
$(function () {
$('#aniimated-thumbnials').lightGallery({
thumbnail: true,
selector: 'a'
});
});
$(document).ready(function () {
var date = new Date()
var d = date.getDate(),
m = date.getMonth(),
y = date.getFullYear();
$('#calendar').fullCalendar({
header : {
left : 'prev,next today',
center: 'title',
right : 'month,agendaWeek,agendaDay'
},
buttonText: {
today: 'today',
month: 'month',
week : 'week',
day : 'day'
},
//Random default events
events : [
@foreach($holidays as $val)
{
title : '{{$val->holidayName}}',
start : new Date({{Carbon\Carbon::parse($val->fromDate)->format('Y,m,d')}}),
end : new Date({{Carbon\Carbon::parse($val->toDate)->format('Y,m,d')}}),
allDay : true,
backgroundColor: '#00a65a', //Success (green)
borderColor : '#00a65a' ,//Success (green)
textColor : '#fff'
},
@endforeach
],
editable : true,
droppable : true, // this allows things to be dropped onto the calendar !!!
drop : function (date, allDay) { // this function is called when something is dropped
// retrieve the dropped element's stored Event Object
var originalEventObject = $(this).data('eventObject')
// we need to copy it, so that multiple events don't have a reference to the same object
var copiedEventObject = $.extend({}, originalEventObject)
// assign it the date that was reported
copiedEventObject.start = date
copiedEventObject.allDay = allDay
copiedEventObject.backgroundColor = $(this).css('background-color')
copiedEventObject.borderColor = $(this).css('border-color')
// render the event on the calendar
// the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
$('#calendar').fullCalendar('renderEvent', copiedEventObject, true)
// is the "remove after drop" checkbox checked?
if ($('#drop-remove').is(':checked')) {
// if so, remove the element from the "Draggable Events" list
$(this).remove();
}
}
})
});
$(document).on('click', '.js-sweetalerttext', function (e) {
var msg = $(this).data('msg');
swal({
title: "",
text: msg,
showCancelButton: false,
confirmButtonColor: "#DD6B55",
closeOnConfirm: true
});
});
$(document).on('click', '.js-sweetalertthought', function (e) {
var msg = $(this).data('msg');
swal({
title: "",
text: msg,
showCancelButton: false,
confirmButtonColor: "#DD6B55",
closeOnConfirm: true
});
});
$(document).on('click', '.js-pnews', function (e) {
var msg = $(this).data('msg');
swal({
title: "",
text: msg,
showCancelButton: false,
confirmButtonColor: "#DD6B55",
closeOnConfirm: true
});
});
$(document).on('click', '.js-newsletter', function (e) {
var msg = $(this).data('msg');
swal({
title: "",
text: msg,
showCancelButton: false,
confirmButtonColor: "#DD6B55",
closeOnConfirm: true
});
});
</script>
@stop
Copyright © 2021 -