From 4478232e1c2e38894467e73f99fd694dff624647 Mon Sep 17 00:00:00 2001 From: richard Date: Sun, 28 Oct 2001 23:03:08 +0000 Subject: [PATCH] Added more useful header to the classic schema. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@344 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/cgi_client.py | 43 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/roundup/cgi_client.py b/roundup/cgi_client.py index 3629ee1..dbb7fc7 100644 --- a/roundup/cgi_client.py +++ b/roundup/cgi_client.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: cgi_client.py,v 1.43 2001-10-24 00:01:42 richard Exp $ +# $Id: cgi_client.py,v 1.44 2001-10-28 23:03:08 richard Exp $ import os, cgi, pprint, StringIO, urlparse, re, traceback, mimetypes import base64, Cookie, time @@ -76,7 +76,7 @@ class Client: self.headers_done = 1 def pagehead(self, title, message=None): - url = self.env['SCRIPT_NAME'] + '/' #self.env.get('PATH_INFO', '/') + url = self.env['SCRIPT_NAME'] + '/' machine = self.env['SERVER_NAME'] port = self.env['SERVER_PORT'] if port != '80': machine = machine + ':' + port @@ -86,11 +86,27 @@ class Client: else: message = '' style = open(os.path.join(self.TEMPLATES, 'style.css')).read() - if self.user is not None: + user_name = self.user or '' + if self.user == 'admin': + admin_links = ' | Class List' + else: + admin_links = '' + if self.user not in (None, 'anonymous'): userid = self.db.user.lookup(self.user) - user_info = '(login: %s)'%(userid, self.user) + user_info = ''' +My Issues | +My Details | Logout +'''%(userid, userid) else: - user_info = '' + user_info = 'Login' + if self.user is not None: + add_links = ''' +| Add +Issue, +User +''' + else: + add_links = '' self.write(''' %s @@ -98,9 +114,19 @@ class Client: %s - + + + + +
%s %s
%s%s
All +Issues +| Unassigned +Issues +%s +%s%s
-'''%(title, style, message, title, user_info)) +'''%(title, style, message, title, user_name, add_links, admin_links, + user_info)) def pagefoot(self): if self.debug: @@ -848,6 +874,9 @@ def parsePropsFromForm(db, cl, form, nodeid=0): # # $Log: not supported by cvs2svn $ +# Revision 1.43 2001/10/24 00:01:42 richard +# More fixes to lockout logic. +# # Revision 1.42 2001/10/23 23:56:03 richard # HTML typo # -- 2.30.2