I've started to separate permissions from the settings panel. It will be availab
le inside the Admin menu for users who are granted the "view_permissions" permis
sion.
This commit is contained in:
tonio
2010-11-24 23:47:32 +01:00
parent a366c70492
commit f7ec14bc87
4 changed files with 140 additions and 27 deletions
+4 -4
View File
@@ -3,7 +3,7 @@ from django.template.loader import render_to_string
from django.utils.translation import ugettext as _
from django.core.urlresolvers import reverse
from modoboa import userprefs
from modoboa.lib import events
from modoboa.lib import events, static_url
register = template.Library()
@@ -11,18 +11,18 @@ register = template.Library()
def options_menu(user):
entries = [
{"name" : "userprefs",
"img" : "/static/pics/user.png",
"img" : static_url("pics/user.png"),
"label" : _("Options"),
"class" : "topdropdown",
"menu" : [
{"name" : "changepwd",
"url" : reverse(userprefs.views.changepassword),
"img" : "/static/pics/edit.png",
"img" : static_url("pics/edit.png"),
"label" : _("Change password"),
"class" : "boxed",
"rel" : "{handler:'iframe',size:{x:350,y:220}}"},
{"name" : "preferences",
"img" : "/static/pics/user.png",
"img" : static_url("pics/user.png"),
"label" : _("Preferences"),
"url" : reverse(userprefs.views.preferences),
}