From: gfawcett Date: Fri, 20 Mar 2009 00:09:10 +0000 (+0000) Subject: remove Language link; for now, Preferences points just to Language. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bc29ec740cf46871b88b0bce3c8f54ed87764463;p=syrup%2Fmasslnc.git remove Language link; for now, Preferences points just to Language. We can fix this later when more preference options show up. git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@204 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- diff --git a/conifer/syrup/views.py b/conifer/syrup/views.py index dcaa316..68e64cc 100644 --- a/conifer/syrup/views.py +++ b/conifer/syrup/views.py @@ -143,17 +143,17 @@ def instructors_only(handler): return _access_denied(_('Only instructors are allowed here.')) return hdlr - # decorator def members_only(handler): def hdlr(request, course_id, *args, **kwargs): - allowed = request.user.is_superuser + user = request.user + allowed = user.is_superuser if not allowed: course = models.Course.objects.get(pk=course_id) - allowed = ((request.user.is_anonymous and course.access=='ANON') or \ - (request.user.is_authenticated and course.access=='LOGIN')) + allowed = ((user.is_anonymous and course.access=='ANON') or \ + (user.is_authenticated and course.access=='LOGIN')) if not allowed: - allowed = _fast_user_membership_query(request.user.id, course_id) + allowed = _fast_user_membership_query(user.id, course_id) if allowed: return handler(request, course_id, *args, **kwargs) else: @@ -214,9 +214,8 @@ def departments(request): def user_prefs(request): - return g.render('simplemessage.xhtml', - title=_('Sorry...'), - content=_('The Preferences page isn\'t ready yet.')) + # for now, just send to the 'setlang' page. Better than 'under construction.' + return HttpResponseRedirect('../setlang') def z3950_test(request): conn = zoom.Connection ('z3950.loc.gov', 7090) diff --git a/conifer/templates/master.xhtml b/conifer/templates/master.xhtml index d0853fa..ca5fd35 100644 --- a/conifer/templates/master.xhtml +++ b/conifer/templates/master.xhtml @@ -42,13 +42,12 @@ search = _('search...') Welcome, ${user.first_name or user.username}! Log Out - • LanguagePreferences Welcome! Log In - Language + • Preferences