mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
delete old notifications
This commit is contained in:
parent
5f4f05386f
commit
2788426567
4 changed files with 17 additions and 3 deletions
2
web/css/styles.min.css
vendored
2
web/css/styles.min.css
vendored
|
@ -813,7 +813,7 @@ input[type="checkbox"] {
|
||||||
background-color: #c4da5e;
|
background-color: #c4da5e;
|
||||||
}
|
}
|
||||||
.l-profile__notifications.updates {
|
.l-profile__notifications.updates {
|
||||||
background-position: -202px -157px;
|
background-position: -202px -135px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notification-container {
|
.notification-container {
|
||||||
|
|
|
@ -21,7 +21,6 @@ if($_GET['delete'] == 1){
|
||||||
} else {
|
} else {
|
||||||
$v_username = escapeshellarg($user);
|
$v_username = escapeshellarg($user);
|
||||||
$v_id = escapeshellarg((int)$_GET['notification_id']);
|
$v_id = escapeshellarg((int)$_GET['notification_id']);
|
||||||
echo VESTA_CMD."v-acknowledge-user-notification ".$v_username." ".$v_id;
|
|
||||||
exec (VESTA_CMD."v-acknowledge-user-notification ".$v_username." ".$v_id, $output, $return_var);
|
exec (VESTA_CMD."v-acknowledge-user-notification ".$v_username." ".$v_id, $output, $return_var);
|
||||||
check_return_code($return_var,$output);
|
check_return_code($return_var,$output);
|
||||||
unset($output);
|
unset($output);
|
||||||
|
|
|
@ -105,6 +105,21 @@ function top_panel($user, $TAB) {
|
||||||
}
|
}
|
||||||
$panel = json_decode(implode('', $output), true);
|
$panel = json_decode(implode('', $output), true);
|
||||||
unset($output);
|
unset($output);
|
||||||
|
|
||||||
|
|
||||||
|
// getting notifications
|
||||||
|
$command = VESTA_CMD."v-list-user-notifications '".$user."' 'json'";
|
||||||
|
exec ($command, $output, $return_var);
|
||||||
|
$notifications = json_decode(implode('', $output), true);
|
||||||
|
foreach($notifications as $message){
|
||||||
|
if($message['ACK'] == 'no'){
|
||||||
|
$panel[$user]['NOTIFICATIONS'] = 'yes';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unset($output);
|
||||||
|
|
||||||
|
|
||||||
if ( $user == 'admin' ) {
|
if ( $user == 'admin' ) {
|
||||||
include(dirname(__FILE__).'/../templates/admin/panel.html');
|
include(dirname(__FILE__).'/../templates/admin/panel.html');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- /.l-menu -->
|
<!-- /.l-menu -->
|
||||||
<div class="l-profile noselect">
|
<div class="l-profile noselect">
|
||||||
<a class="l-profile__notifications <? if($panel[$user]['NOTIFICATIONS'] == 'yes') echo "updates"; ?>"> </a>
|
<a class="l-profile__notifications <? if($panel[$user]['NOTIFICATIONS'] == 'yes') echo " updates"; ?>"> </a>
|
||||||
<a class="l-profile__username" href="/edit/user/?user=<?php echo $user; ?>"><?=$user?></a>
|
<a class="l-profile__username" href="/edit/user/?user=<?php echo $user; ?>"><?=$user?></a>
|
||||||
<a class="l-profile__logout" href="/logout/"> <?=__('Log out')?> </a>
|
<a class="l-profile__logout" href="/logout/"> <?=__('Log out')?> </a>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue