Jan Dittberner
210d1e122c
- add new links dropdown to top navigation in template base.html - add new settings GVA_LINK_WEBMAIL, GVA_LINK_PHPMYADMIN and GVA_LINK_PHPPGADMIN to gnuviechadmin.settings.base - implement gnuviechadmin.context_processors.navigation to add links to request context of non-AJAX requests - add generated documentation for gnuviechadmin.context_processors - add changelog entry
28 lines
676 B
Python
28 lines
676 B
Python
"""
|
|
This module provides context processor implementations for gnuviechadmin.
|
|
|
|
"""
|
|
from __future__ import absolute_import, unicode_literals
|
|
|
|
from django.conf import settings
|
|
|
|
|
|
def navigation(request):
|
|
"""
|
|
Add navigation items to the request context.
|
|
|
|
:param request: Django :py:class:`HttpRequest <django.http.HttpRequest>`
|
|
:return: new context items
|
|
:rtype: dict
|
|
|
|
"""
|
|
if request.is_ajax():
|
|
return {}
|
|
context = {
|
|
'webmail_url': settings.GVA_LINK_WEBMAIL,
|
|
'phpmyadmin_url': settings.GVA_LINK_PHPMYADMIN,
|
|
'phppgadmin_url': settings.GVA_LINK_PHPPGADMIN,
|
|
'active_item': 'dashboard',
|
|
}
|
|
return context
|