mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-11-29 11:44:28 +01:00
@@ -0,0 +1,18 @@
|
||||
"""
|
||||
Custom context processors.
|
||||
"""
|
||||
from modoboa.lib import events, parameters
|
||||
|
||||
|
||||
def top_notifications(request):
|
||||
"""
|
||||
A context processor to include top notifications.
|
||||
"""
|
||||
if request.user.is_anonymous():
|
||||
return {}
|
||||
return {
|
||||
"notifications_check_interval":
|
||||
int(parameters.get_admin("TOP_NOTIFICATIONS_CHECK_INTERVAL")) * 1000,
|
||||
"top_notifications": events.raiseQueryEvent(
|
||||
"TopNotifications", request.user, False)
|
||||
}
|
||||
Reference in New Issue
Block a user