public function __construct($user, $member)
 {
     // leadership notifications
     if ($user->role > 1) {
         // expired or pending leaves of absence
         if (LeaveOfAbsence::count_expired($member->game_id) > 0 || LeaveOfAbsence::count_pending($member->game_id) > 0) {
             array_push($this->messages, "<div class='alert alert-warning'><i class='fa fa-clock-o fa-lg'></i> There are leaves of absence that require your attention <a href='manage/leaves-of-absence' class='alert-link'>Manage Leaves of Absence</a></div>");
         }
     }
     // division CO / XO
     if ($user->role > 2) {
         if (count(Division::findUnassigned($member->game_id))) {
             array_push($this->messages, "<div class=\"alert alert-warning\"><i class=\"fa fa-exclamation-circle\"></i> Your division has unassigned members. Visit your division page to resolve this.</div>");
         }
     }
     if (!User::isValidated()) {
         array_push($this->messages, "<div class='alert alert-info'><i class='fa fa-envelope fa-lg'></i> Your account email has not been verified. <a href='#' class='alert-link send-email-validation' data-email='{$user->email}'>Send Validation</a></div>");
     }
 }
Exemplo n.º 2
0
	<?php 
if (LeaveOfAbsence::count_expired($division->id) > 0) {
    ?>
		<div class='alert alert-info'><p><i class='fa fa-exclamation-triangle'></i> Your division has <?php 
    echo LeaveOfAbsence::count_expired($division->id);
    ?>
 expired leaves of absence which need to be handled.</p></div>
	<?php 
}
?>

	<div class='alert hide loa-alerts'></div>

	<?php 
if (LeaveOfAbsence::count_pending($division->id) && $user->role >= 1) {
    ?>



		<div class='panel panel-default margin-top-20' id='pending-loas'>
			<div class='panel-heading'>Pending Leaves of Absence</div>
			<table class='table table-striped table-hover' id='ploas'>
				<thead>
					<tr>
						<th>Member name</th>
						<th class="hidden-xs">Reason</th>
						<th class="hidden-xs hidden-sm">End Date</th>
						<th class='text-center'>Status</th>
					</tr>
				</thead>