Add "all caught up" message when no notifications to show

pull/17/head v2.0
Skylar Ittner 6 years ago
parent 1a01f67662
commit 0c7b4a31f1

@ -2,5 +2,6 @@
"Notifications": "Notifications",
"Notification deleted.": "Notification deleted.",
"Mark as read": "Mark as read",
"Delete": "Delete"
"Delete": "Delete",
"All caught up!": "All caught up!"
}

@ -96,6 +96,15 @@
<div class="row">
<?php
$notifications = Notifications::get(User::byUsername($_SESSION['username']));
if (count($notifications) == 0) {
?>
<div class="col-12 col-sm-6 col-md-4 col-xl-3">
<div class="alert alert-light">
<i class="fas fa-check"></i> <?php $Strings->get("All caught up!"); ?>
</div>
</div>
<?php
}
foreach ($notifications as $n) {
?>
<div class="col-12 col-sm-6 col-md-4 col-xl-3">

Loading…
Cancel
Save