mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 08:58:42 +00:00
feat(web/user/system_msg): unread msgs bg-warning
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
4868c7fdfc
commit
512185fc10
@ -64,10 +64,6 @@
|
||||
$system_msgs[$idx]['delete_form'] = $delete_form;
|
||||
}
|
||||
}
|
||||
|
||||
if (Auth::id() == $user['username']) {
|
||||
DB::update("update user_system_msg set read_time = now() where receiver = '" . $user['username'] . "'");
|
||||
}
|
||||
?>
|
||||
|
||||
<?php echoUOJPageHeader('系统消息') ?>
|
||||
@ -83,7 +79,9 @@
|
||||
<div class="card mb-3">
|
||||
<ul class="list-group list-group-flush">
|
||||
<?php foreach ($system_msgs as $msg): ?>
|
||||
<li class="list-group-item">
|
||||
<li class="list-group-item
|
||||
<?= $msg['read_time'] ? '' : 'bg-warning bg-opacity-25' ?>
|
||||
">
|
||||
<div class="mb-2 d-flex justify-content-between">
|
||||
<div>
|
||||
<?php if ($msg['title']): ?>
|
||||
@ -113,6 +111,12 @@
|
||||
|
||||
<?= $pag->pagination() ?>
|
||||
|
||||
<?php
|
||||
if (Auth::id() == $user['username']) {
|
||||
DB::update("update user_system_msg set read_time = now() where receiver = '" . $user['username'] . "'");
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
<!-- end left col -->
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user