diff roundup/templates/classic/interfaces.py @ 120:e8087fc26fee

Fixed the classic template so it's more like the "advertised" Roundup template.
author Richard Jones <richard@users.sourceforge.net>
date Sun, 29 Jul 2001 04:07:37 +0000
parents 6ff85bc2dd56
children 0791d13baea7
line wrap: on
line diff
--- a/roundup/templates/classic/interfaces.py	Sun Jul 29 04:06:42 2001 +0000
+++ b/roundup/templates/classic/interfaces.py	Sun Jul 29 04:07:37 2001 +0000
@@ -1,4 +1,6 @@
-# $Id: interfaces.py,v 1.1 2001-07-23 23:28:43 richard Exp $
+# $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 
@@ -8,7 +10,36 @@
         with any specific extensions 
     ''' 
     TEMPLATES = instance_config.TEMPLATES
-    pass 
+
+    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 = '<div class="system-msg">%s</div>'%message
+        else:
+            message = ''
+        style = open(os.path.join(self.TEMPLATES, 'style.css')).read()
+        userid = self.db.user.lookup(self.user)
+        self.write('''<html><head>
+<title>%s</title>
+<style type="text/css">%s</style>
+</head>
+<body bgcolor=#ffffff>
+%s
+<table width=100%% border=0 cellspacing=0 cellpadding=2>
+<tr class="location-bar"><td><big><strong>%s</strong></big>
+(login: <a href="user%s">%s</a>)</td></tr>
+</table>
+'''%(title, style, message, title, userid, self.user))
  
 class MailGW(mailgw.MailGW): 
     ''' derives basic mail gateway implementation from the standard module, 
@@ -20,6 +51,9 @@
 
 #
 # $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.
 #

Roundup Issue Tracker: http://roundup-tracker.org/