remove Language link; for now, Preferences points just to Language.
authorgfawcett <gfawcett@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Fri, 20 Mar 2009 00:09:10 +0000 (00:09 +0000)
committergfawcett <gfawcett@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Fri, 20 Mar 2009 00:09:10 +0000 (00:09 +0000)
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

conifer/syrup/views.py
conifer/templates/master.xhtml

index dcaa316..68e64cc 100644 (file)
@@ -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)
index d0853fa..ca5fd35 100644 (file)
@@ -42,13 +42,12 @@ search = _('search...')
       <span py:if="user.is_authenticated()">
        <strong style="padding-right: 18;">Welcome, ${user.first_name or user.username}!</strong>
        <a href="/accounts/logout">Log Out</a>
-       &bull; <a href="/syrup/setlang">Language</a>
        &bull; <a href="/syrup/prefs/">Preferences</a>
       </span>
       <span py:if="not user.is_authenticated()">
        <strong style="padding-right: 18;">Welcome!</strong>
        <a class="loginbutton" href="/accounts/login/">Log In</a>
-       <a style="margin-left: 24;" href="/syrup/setlang">Language</a>
+       &bull; <a href="/syrup/prefs/">Preferences</a>
       </span>
     </div>
       <xi:include py:if="user.is_authenticated()" href="tabbar.xhtml"/>