Show full-size notice with 0 messages to fill in space

merge-requests/38/head
Mike Koch 7 years ago
parent 6a42560c0c
commit 9e4ec347cf

@ -104,8 +104,15 @@
margin-top: 10px;
}
.dropdown-empty {
padding: 10%;
color: #ddd;
font-weight: bolder;
}
.attachment-table > tbody > tr > td > i {
.attachment-table > tbody > tr > td > i,
.dropdown-empty > i {
color: #ddd;
text-shadow: 2px 2px #ccc;
}

@ -204,16 +204,30 @@ $mails = mfh_get_mail_headers_for_dropdown($_SESSION['id'], $hesk_settings, $hes
<?php endif; ?>
</a>
<ul class="dropdown-menu">
<?php if (count($mails) > 0): ?>
<li class="header"><?php echo sprintf($hesklang['you_have_x_messages'],
count($mails),
count($mails) == 1
? $hesklang['message_lower_case']
: $hesklang['messages_lower_case']); ?></li>
<?php endif; ?>
<!-- Begin New Messages -->
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<?php foreach ($mails as $mail): ?>
<?php if (count($mails) == 0): ?>
<div class="text-center dropdown-empty">
<i class="fa fa-envelope-o fa-3x"></i><br>
<span class="fa-2x">
<?php echo sprintf($hesklang['you_have_x_messages'],
count($mails),
$hesklang['messages_lower_case']); ?>
</span>
</div>
<?php
endif;
foreach ($mails as $mail):
?>
<li><!-- start message -->
<a href="mail.php?a=read&id=<?php echo $mail['id']; ?>">
<h4>

Loading…
Cancel
Save