# $Id: interfaces.py,v 1.2 2001-07-29 04:07:37 richard Exp $ import urlparse, os import instance_config from roundup import cgi_client, mailgw class Client(cgi_client.Client): ''' derives basic mail gateway implementation from the standard module, with any specific extensions ''' TEMPLATES = instance_config.TEMPLATES default_index_sort = ['-activity'] default_index_group = ['priority'] default_index_filter = [] default_index_columns = ['id','activity','title','status','assignedto'] default_index_filterspec = {'status': ['1', '2', '3', '4', '5', '6', '7']} def pagehead(self, title, message=None): url = self.env['SCRIPT_NAME'] + '/' #self.env.get('PATH_INFO', '/') machine = self.env['SERVER_NAME'] port = self.env['SERVER_PORT'] if port != '80': machine = machine + ':' + port base = urlparse.urlunparse(('http', machine, url, None, None, None)) if message is not None: message = '
%s
'%message else: message = '' style = open(os.path.join(self.TEMPLATES, 'style.css')).read() userid = self.db.user.lookup(self.user) self.write(''' %s %s
%s (login: %s)
'''%(title, style, message, title, userid, self.user)) class MailGW(mailgw.MailGW): ''' derives basic mail gateway implementation from the standard module, with any specific extensions ''' ISSUE_TRACKER_EMAIL = instance_config.ISSUE_TRACKER_EMAIL ADMIN_EMAIL = instance_config.ADMIN_EMAIL MAILHOST = instance_config.MAILHOST # # $Log: not supported by cvs2svn $ # Revision 1.1 2001/07/23 23:28:43 richard # Adding the classic template # # Revision 1.1 2001/07/23 23:16:01 richard # Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff. # #