mirror of https://github.com/itflow-org/itflow
Get Badge count for alerts on top nav
This commit is contained in:
parent
2663ca5521
commit
261eb50b64
|
|
@ -26,4 +26,9 @@
|
|||
$session_map_source = "google";
|
||||
}
|
||||
|
||||
//Get unAcked Alert Count for the badge on the top nav
|
||||
|
||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('alert_id') AS num FROM alerts WHERE alert_ack_date = 0"));
|
||||
$num_alerts = $row['num'];
|
||||
|
||||
?>
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
<li class="nav-item dropdown no-arrow mx-2">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="alertsDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fas fa-bell fa-fw"></i>
|
||||
<span class="badge badge-danger">9+</span>
|
||||
<?php if($num_alerts > 0){ ?> <span class="badge badge-danger"><?php echo $num_alerts; ?></span> <?php } ?>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="alertsDropdown">
|
||||
<a class="dropdown-item" href="alerts.php">New Alerts</a>
|
||||
|
|
|
|||
Loading…
Reference in New Issue