[Hepserver-commits] hep/hep/web messages.py,1.2,1.3 models.py,1.2,1.3
Status: Alpha
Brought to you by:
abefettig
|
From: <abe...@us...> - 2003-08-07 17:01:00
|
Update of /cvsroot/hepserver/hep/hep/web
In directory sc8-pr-cvs1:/tmp/cvs-serv22419/hep/web
Modified Files:
messages.py models.py
Log Message:
Added login/logout link to web pages for switching between
anonymous and authenticated users.
Index: messages.py
===================================================================
RCS file: /cvsroot/hepserver/hep/hep/web/messages.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** messages.py 7 Aug 2003 03:29:35 -0000 1.2
--- messages.py 7 Aug 2003 17:00:26 -0000 1.3
***************
*** 118,122 ****
item = list.li()
! a = item.a(href='/'.join(['/messages', '', storePath, '']))
if '/'.join(request.postpath).strip('/') == storePath.strip('/'):
a['class'] = 'selected'
--- 118,122 ----
item = list.li()
! a = item.a(href='/'.join(['', 'messages', storePath, '']))
if '/'.join(request.postpath).strip('/') == storePath.strip('/'):
a['class'] = 'selected'
Index: models.py
===================================================================
RCS file: /cvsroot/hepserver/hep/hep/web/models.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** models.py 7 Aug 2003 03:28:56 -0000 1.2
--- models.py 7 Aug 2003 17:00:26 -0000 1.3
***************
*** 33,36 ****
--- 33,43 ----
print "***********************ERROR!**********************", err
+ def wmfactory_loginLink(self, request):
+ if self.user.name == 'anonymous':
+ return {'href':'/perspective-init', 'text':'Log In'}
+ else:
+ return {'href':'/perspective-destroy', 'text':'Log Out'}
+
+
def gotList(self, messageList, store, request, finished):
messageList = messageList.items()
|