Code

Added templatebuilder module. two functions - one to pack up the html base,
authoranthonybaxter <anthonybaxter@57a73879-2fb5-44c3-a270-3262357dd7e2>
Tue, 24 Jul 2001 10:46:22 +0000 (10:46 +0000)
committeranthonybaxter <anthonybaxter@57a73879-2fb5-44c3-a270-3262357dd7e2>
Tue, 24 Jul 2001 10:46:22 +0000 (10:46 +0000)
one to unpack it. Packed up the two standard templates into htmlbases.
Modified __init__ to install them.

__init__.py magic was needed for the rather high levels of wierd import magic.
Reducing level of import magic == (good, future)

git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@72 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/init.py
roundup/templatebuilder.py [new file with mode: 0644]
roundup/templates/.cvsignore [new file with mode: 0644]
roundup/templates/__init__.py [new file with mode: 0644]
roundup/templates/classic/__init__.py
roundup/templates/classic/dbinit.py
roundup/templates/classic/htmlbase.py [new file with mode: 0644]
roundup/templates/extended/__init__.py
roundup/templates/extended/htmlbase.py [new file with mode: 0644]

index d2e39a5d9aa78c214c9b93912490e6ad503ec9db..ef7b1aef25fae8c858798156fa56f2714c115431 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: init.py,v 1.3 2001-07-23 08:45:28 richard Exp $
+# $Id: init.py,v 1.4 2001-07-24 10:46:22 anthonybaxter Exp $
 
 import os, shutil, sys
 
@@ -35,10 +35,15 @@ def init(instance, template, backend, adminpw):
     ''' initialise an instance using the named template
     '''
     # first, copy the template dir over
+    import roundup.templatebuilder
+
     template_dir = os.path.split(__file__)[0]
+    template_name = template
     template = os.path.join(template_dir, 'templates', template)
     copytree(template, instance)
 
+    roundup.templatebuilder.installHtmlBase(template_name, instance)
+
     # now select database
     db = '''# WARNING: DO NOT EDIT THIS FILE!!!
 from roundup.backends.back_%s import Database'''%backend
@@ -52,6 +57,11 @@ from roundup.backends.back_%s import Database'''%backend
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.3  2001/07/23 08:45:28  richard
+# ok, so now "./roundup-admin init" will ask questions in an attempt to get a
+# workable instance_home set up :)
+# _and_ anydbm has had its first test :)
+#
 # Revision 1.2  2001/07/22 12:09:32  richard
 # Final commit of Grande Splite
 #
diff --git a/roundup/templatebuilder.py b/roundup/templatebuilder.py
new file mode 100644 (file)
index 0000000..1cc06ed
--- /dev/null
@@ -0,0 +1,57 @@
+preamble = """ 
+# Do Not Edit (Unless You Want To)
+# This file automagically generated by roundup.htmldata.makeHtmlBase
+# 
+"""
+
+def makeHtmlBase(templateDir):
+    """ make a htmlbase.py file in the given templateDir, from the
+        contents of templateDir/html """
+    import os, glob, re
+    print "packing up templates in", templateDir
+    filelist = glob.glob(os.path.join(templateDir, 'html', '*'))
+    filelist = filter(os.path.isfile, filelist) # only want files
+    filelist.sort()
+    fd = open(os.path.join(templateDir, 'htmlbase.py'), 'w')
+    fd.write(preamble)
+    for file in filelist:
+       mangled_name = os.path.basename(re.sub(r'\.', 'DOT', file))
+       fd.write('%s = """'%mangled_name)
+       fd.write(open(file).read())
+       fd.write('"""\n\n')
+    fd.close()
+
+def installHtmlBase(template, installDir):
+    """ passed a template package and an installDir, unpacks the html files into
+      the installdir """
+    import os,sys,re
+
+    tdir = __import__('roundup.templates.%s.htmlbase'%template).templates
+    if hasattr(tdir, template):
+       tmod = getattr(tdir, template)
+    else:
+       raise "TemplateError", \
+               "couldn't find roundup.template.%s.htmlbase"%template
+    htmlbase = tmod.htmlbase
+
+    print "installing from", htmlbase.__file__, "into", installDir
+    modulecontents = dir(htmlbase)
+    for mangledfile in modulecontents:
+       if mangledfile[0] == "_": 
+           continue
+       filename = re.sub('DOT', '.', mangledfile)
+       outfile = os.path.join(installDir, filename)
+       outfd = open(outfile, 'w')
+       data = getattr(htmlbase, mangledfile)
+       outfd.write(data)
+    
+
+
+if __name__ == "__main__":
+    import sys
+    if len(sys.argv) == 2:
+       makeHtmlBase(sys.argv[1])
+    elif len(sys.argv) == 3:
+       installHtmlBase(sys.argv[1], sys.argv[2])
+    else:
+       raise "what you talkin about willis?"
diff --git a/roundup/templates/.cvsignore b/roundup/templates/.cvsignore
new file mode 100644 (file)
index 0000000..0d20b64
--- /dev/null
@@ -0,0 +1 @@
+*.pyc
diff --git a/roundup/templates/__init__.py b/roundup/templates/__init__.py
new file mode 100644 (file)
index 0000000..139597f
--- /dev/null
@@ -0,0 +1,2 @@
+
+
index f3008d64f6b2f849fb83c1e83c8aa54a29616ef7..0a5422eaf0df4878a03788a8ff37cabe39fd77fa 100644 (file)
@@ -1,11 +1,18 @@
-# $Id: __init__.py,v 1.1 2001-07-23 23:28:43 richard Exp $
+# $Id: __init__.py,v 1.2 2001-07-24 10:46:22 anthonybaxter Exp $
 
+import sys
 from instance_config import *
-from dbinit import *
+try:
+    from dbinit import *
+except:
+    pass # in install dir (probably :)
 from interfaces import *
 
 # 
 # $Log: not supported by cvs2svn $
+# Revision 1.1  2001/07/23 23:28:43  richard
+# Adding the classic template
+#
 # Revision 1.3  2001/07/23 23:16:01  richard
 # Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
 #
index 81489589ceb4df3f38817482a0c498522d09df85..7bc71cc066974dcc05360dc50a53b90d857af39a 100644 (file)
@@ -1,10 +1,11 @@
-# $Id: dbinit.py,v 1.2 2001-07-24 01:06:43 richard Exp $
+# $Id: dbinit.py,v 1.3 2001-07-24 10:46:22 anthonybaxter Exp $
 
 import os
 
 import instance_config
 from roundup import roundupdb, cgi_client, mailgw 
 import select_db
+
 from roundup.roundupdb import Class, FileClass
 
 class Database(roundupdb.Database, select_db.Database):
@@ -106,6 +107,9 @@ def init(adminpw):
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.2  2001/07/24 01:06:43  richard
+# Oops - accidentally duped the keywords class
+#
 # Revision 1.1  2001/07/23 23:28:43  richard
 # Adding the classic template
 #
diff --git a/roundup/templates/classic/htmlbase.py b/roundup/templates/classic/htmlbase.py
new file mode 100644 (file)
index 0000000..8121dbf
--- /dev/null
@@ -0,0 +1,399 @@
+# Do Not Edit (Unless You Want To)
+# This file automagically generated by roundup.htmldata.makeHtmlBase
+# 
+fileDOTindex = """<!-- $Id: htmlbase.py,v 1.1 2001-07-24 10:46:22 anthonybaxter Exp $-->
+<tr>
+    <property name="name">
+        <td><display call="link('name')"></td>
+    </property>
+    <property name="type">
+        <td><display call="plain('type')"></td>
+    </property>
+</tr>
+"""
+
+issueDOTfilter = """<!-- $Id: htmlbase.py,v 1.1 2001-07-24 10:46:22 anthonybaxter Exp $-->
+<property name="title">
+ <tr><th width="1%" align="right" class="location-bar">Title</th>
+ <td><display call="field('title')"></td></tr>
+</property>
+<property name="status">
+ <tr><th width="1%" align="right" class="location-bar">Status</th>
+ <td><display call="checklist('status')"></td></tr>
+</property>
+<property name="priority">
+ <tr><th width="1%" align="right" class="location-bar">Priority</th>
+ <td><display call="checklist('priority')"></td></tr>
+</property>
+"""
+
+issueDOTindex = """<!-- $Id: htmlbase.py,v 1.1 2001-07-24 10:46:22 anthonybaxter Exp $-->
+<tr>
+    <property name="activity">
+        <td valign="top"><display call="reldate('activity', pretty=1)"></td>
+    </property>
+    <property name="priority">
+        <td valign="top"><display call="plain('priority')"></td>
+    </property>
+    <property name="status">
+        <td valign="top"><display call="plain('status')"></td>
+    </property>
+    <property name="title">
+        <td valign="top"><display call="link('title')"></td>
+    </property>
+</tr>
+"""
+
+issueDOTitem = """<!-- $Id: htmlbase.py,v 1.1 2001-07-24 10:46:22 anthonybaxter Exp $-->
+<table border=0 cellspacing=0 cellpadding=2>
+
+<tr class="strong-header">
+  <td colspan=4>Item Information</td>
+</td>
+
+<tr  bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Title</span></td>
+    <td colspan=3 class="form-text"><display call="field('title', size=80)"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Created</span></td>
+    <td class="form-text"><display call="reldate('creation', pretty=1)">
+        (<display call="plain('creator')">)</td>
+    <td width=1% nowrap align=right><span class="form-label">Last activity</span></td>
+    <td class="form-text"><display call="reldate('activity', pretty=1)"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Priority</span></td>
+    <td class="form-text"><display call="field('priority')"></td>
+    <td width=1% nowrap align=right><span class="form-label">Status</span></td>
+    <td class="form-text"><display call="menu('status')"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Superseder</span></td>
+    <td class="form-text"><display call="field('superseder', size=40, showid=1)"></td>
+    <td width=1% nowrap align=right><span class="form-label">Nosy List</span></td>
+    <td class="form-text"><display call="field('nosy')"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Change Note</span></td>
+    <td colspan=3 class="form-text"><display call="note()"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td>&nbsp;</td>
+    <td colspan=3 class="form-text"><display call="submit()"></td>
+</tr>
+
+<property name="messages">
+<tr class="strong-header">
+    <td colspan=4><b>Messages</b></td>
+</tr>
+<tr>            
+    <td colspan=4><display call="list('messages')"></td>
+</tr>
+</property>
+
+<property name="files">
+ <tr class="strong-header">
+     <td colspan=4><b>Files</b></td>
+ </tr>
+ <tr>            
+     <td colspan=4><display call="list('files')"></td>
+ </tr>
+</property>
+
+</table>
+
+"""
+
+msgDOTindex = """<!-- $Id: htmlbase.py,v 1.1 2001-07-24 10:46:22 anthonybaxter Exp $-->
+<tr>
+    <property name="date">
+        <td><display call="link('date')"></td>
+    </property>
+    <property name="author">
+        <td><display call="plain('author')"></td>
+    </property>
+    <property name="summary">
+        <td><display call="plain('summary')"></td>
+    </property>
+</tr>
+"""
+
+msgDOTitem = """<!-- $Id: htmlbase.py,v 1.1 2001-07-24 10:46:22 anthonybaxter Exp $-->
+<table border=0 cellspacing=0 cellpadding=2>
+
+<tr class="strong-header">
+  <td colspan=2>Message Information</td>
+</td>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Author</span></td>
+    <td class="form-text"><display call="plain('author')"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Recipients</span></td>
+    <td class="form-text"><display call="plain('recipients')"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Date</span></td>
+    <td class="form-text"><display call="plain('date')"></td>
+</tr>
+
+<tr bgcolor="ffeaff">
+ <td colspan=2 class="form-text">
+  <pre><display call="plain('content')"></pre>
+ </td>
+</tr>
+
+<property name="files">
+<tr class="strong-header"><td colspan=2><b>Files</b></td></tr>
+<tr><td colspan=2><display call="list('files')"></td></tr>
+</property>
+
+<tr class="strong-header"><td colspan=2><b>History</b></td><tr>
+<tr><td colspan=2><display call="history()"></td></tr>
+
+</table>
+"""
+
+styleDOTcss = """h1 {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-size: 18pt; 
+  font-weight: bold; 
+}
+
+h2 {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-size: 16pt; 
+  font-weight: bold; 
+}
+
+h3 {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-size: 12pt; 
+  font-weight: bold; 
+}
+
+a:hover {  
+  font-family: Verdana, Helvetica, sans-serif; 
+  text-decoration: underline;
+  color: #333333; 
+}
+
+a:link {
+  font-family: Verdana, Helvetica, sans-serif; 
+  text-decoration: none;
+  color: #000099;
+}
+
+a {
+  font-family: Verdana, Helvetica, sans-serif; 
+  text-decoration: none;
+  color: #000099;
+}
+
+p {
+  font-family: Verdana, Helvetica, sans-serif;
+  font-size: 10pt;
+  color: #333333;
+}
+
+th {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-weight: bold;
+  font-size: 10pt; 
+  color: #333333;
+}
+
+.form-help {
+  font-family: Verdana, Helvetica, sans-serif;
+  font-size: 10pt;
+  color: #333333;
+}
+
+.std-text {
+  font-family: Verdana, Helvetica, sans-serif;
+  font-size: 10pt;
+  color: #333333;
+}
+
+.tab-small {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-size: 8pt; 
+  color: #333333;
+}
+
+.location-bar {
+  background-color: #efefef;
+  border: none;
+}
+
+.strong-header {
+  font-family: Verdana, Helvetica, sans-serif;
+  font-size: 12pt;
+  font-weight: bold;
+  background-color: #000000;
+  color: #ffffff;
+}
+
+.list-header {
+  background-color: #c0c0c0;
+  border: none;
+}
+
+.list-item {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-size: 10pt; 
+}
+
+.list-nav {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-size: 10pt; 
+  font-weight: bold;
+}
+
+.row-normal {
+  background-color: #ffffff;
+  border: none;
+
+}
+
+.row-hilite {
+  background-color: #efefef;
+  border: none;
+}
+
+.section-bar {
+  background-color: #c0c0c0;
+  border: none;
+}
+
+.system-msg {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-size: 10pt; 
+  background-color: #ffffff;
+  border:  1px solid #000000;
+  margin-bottom: 6px;
+  margin-top: 6px;
+  padding: 4px;
+  width: 100%;
+  color: #660033;
+}
+
+.form-title {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-weight: bold;
+  font-size: 12pt; 
+  color: #333333;
+}
+
+.form-label {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-weight: bold;
+  font-size: 10pt; 
+  color: #333333;
+}
+
+.form-optional {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-weight: bold;
+  font-style: italic;
+  font-size: 10pt; 
+  color: #333333;
+}
+
+.form-element {
+  font-family: Verdana, Helvetica, aans-serif;
+  font-size: 10pt;
+  color: #000000;
+}
+
+.form-text {
+  font-family: Verdana, Helvetica, sans-serif;
+  font-size: 10pt;
+  color: #333333;
+}
+
+.form-mono {
+  font-family: monospace;
+  font-size: 12px;
+  text-decoration: none;
+}
+"""
+
+userDOTindex = """<!-- $Id: htmlbase.py,v 1.1 2001-07-24 10:46:22 anthonybaxter Exp $-->
+<tr>
+    <property name="username">
+        <td><display call="link('username')"></td>
+    </property>
+    <property name="realname">
+        <td><display call="plain('realname')"></td>
+    </property>
+    <property name="organisation">
+        <td><display call="plain('organisation')"></td>
+    </property>
+    <property name="address">
+        <td><display call="plain('address')"></td>
+    </property>
+    <property name="phone">
+        <td><display call="plain('phone')"></td>
+    </property>
+</tr>
+"""
+
+userDOTitem = """<!-- $Id: htmlbase.py,v 1.1 2001-07-24 10:46:22 anthonybaxter Exp $-->
+<table border=0 cellspacing=0 cellpadding=2>
+
+<tr class="strong-header">
+  <td colspan=2>Your Details</td>
+</td>
+
+<tr  bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Name</span></td>
+    <td class="form-text"><display call="field('realname', size=40)"></td>
+</tr>
+<tr  bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Login Name</span></td>
+    <td class="form-text"><display call="field('username', size=40)"></td>
+</tr>
+<tr  bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Login Password</span></td>
+    <td class="form-text"><display call="field('password', size=10)"></td>
+</tr>
+<tr  bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Phone</span></td>
+    <td class="form-text"><display call="field('phone', size=40)"></td>
+</tr>
+<tr  bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Organisation</span></td>
+    <td class="form-text"><display call="field('organisation', size=40)"></td>
+</tr>
+<tr  bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">E-mail address</span></td>
+    <td class="form-text"><display call="field('address', size=40)"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td>&nbsp;</td>
+    <td class="form-text"><display call="submit()"></td>
+</tr>
+
+<tr class="strong-header">
+    <td colspan=2><b>History</b></td>
+</tr>
+<tr>
+    <td colspan=2><display call="history()"></td>
+</tr>
+
+</table>
+
+"""
+
index c6534be83cdac2c058e2d6d3281423b5527372aa..2572c22147a6a343f01430e934a2e769c8200b7b 100644 (file)
@@ -1,11 +1,18 @@
-# $Id: __init__.py,v 1.3 2001-07-23 23:16:01 richard Exp $
+# $Id: __init__.py,v 1.4 2001-07-24 10:46:22 anthonybaxter Exp $
 
 from instance_config import *
-from dbinit import *
+try:
+    from dbinit import *
+except ImportError:
+    pass # in installdir (probably :)
+    
 from interfaces import *
 
 # 
 # $Log: not supported by cvs2svn $
+# Revision 1.3  2001/07/23 23:16:01  richard
+# Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
+#
 # Revision 1.2  2001/07/23 04:33:21  anthonybaxter
 # split __init__.py into 2. dbinit and instance_config.
 #
diff --git a/roundup/templates/extended/htmlbase.py b/roundup/templates/extended/htmlbase.py
new file mode 100644 (file)
index 0000000..d121d5e
--- /dev/null
@@ -0,0 +1,463 @@
+# Do Not Edit (Unless You Want To)
+# This file automagically generated by roundup.htmldata.makeHtmlBase
+# 
+fileDOTindex = """<!-- $Id: htmlbase.py,v 1.1 2001-07-24 10:46:22 anthonybaxter Exp $-->
+<tr>
+    <property name="name">
+        <td><display call="link('name')"></td>
+    </property>
+    <property name="type">
+        <td><display call="plain('type')"></td>
+    </property>
+</tr>
+"""
+
+issueDOTfilter = """<!-- $Id: htmlbase.py,v 1.1 2001-07-24 10:46:22 anthonybaxter Exp $-->
+<property name="title">
+ <tr><th width="1%" align="right" class="location-bar">Title</th>
+ <td><display call="field('title')"></td></tr>
+</property>
+<property name="status">
+ <tr><th width="1%" align="right" class="location-bar">Status</th>
+ <td><display call="checklist('status')"></td></tr>
+</property>
+<property name="priority">
+ <tr><th width="1%" align="right" class="location-bar">Priority</th>
+ <td><display call="checklist('priority')"></td></tr>
+</property>
+<property name="platform">
+ <tr><th width="1%" align="right" class="location-bar">Platform</th>
+ <td><display call="checklist('platform')"></td></tr>
+</property>
+<property name="product">
+ <tr><th width="1%" align="right" class="location-bar">Product</th>
+ <td><display call="checklist('product')"></td></tr>
+</property>
+<property name="version">
+ <tr><th width="1%" align="right" class="location-bar">Version</th>
+ <td><display call="field('version')"></td></tr>
+</property>
+<property name="source">
+ <tr><th width="1%" align="right" class="location-bar">Source</th>
+ <td><display call="checklist('source')"></td></tr>
+</property>
+<property name="assignedto">
+ <tr><th width="1%" align="right" class="location-bar">Assigned&nbsp;to</th>
+ <td><display call="checklist('assignedto')"></td></tr>
+</property>
+<property name="customername">
+ <tr><th width="1%" align="right" class="location-bar">Customer&nbsp;name</th>
+ <td><display call="field('customername')"></td></tr>
+</property>
+"""
+
+issueDOTindex = """<!-- $Id: htmlbase.py,v 1.1 2001-07-24 10:46:22 anthonybaxter Exp $-->
+<tr>
+    <property name="activity">
+        <td valign="top"><display call="reldate('activity', pretty=1)"></td>
+    </property>
+    <property name="priority">
+        <td valign="top"><display call="plain('priority')"></td>
+    </property>
+    <property name="status">
+        <td valign="top"><display call="plain('status')"></td>
+    </property>
+    <property name="title">
+        <td valign="top"><display call="link('title')"></td>
+    </property>
+    <property name="platform">
+        <td valign="top"><display call="plain('platform')"></td>
+    </property>
+    <property name="product">
+        <td valign="top"><display call="plain('product')"></td>
+    </property>
+    <property name="version">
+        <td valign="top"><display call="plain('version')"></td>
+    </property>
+    <property name="source">
+        <td valign="top"><display call="plain('source')"></td>
+    </property>
+    <property name="assignedto">
+        <td valign="top"><display call="plain('assignedto')"></td>
+    </property>
+    <property name="customername">
+        <td valign="top"><display call="plain('customername')"></td>
+    </property>
+</tr>
+"""
+
+issueDOTitem = """<!-- $Id: htmlbase.py,v 1.1 2001-07-24 10:46:22 anthonybaxter Exp $-->
+<table border=0 cellspacing=0 cellpadding=2>
+
+<tr class="strong-header">
+  <td colspan=4>Item Information</td>
+</td>
+
+<tr  bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Title</span></td>
+    <td colspan=3 class="form-text"><display call="field('title', size=80)"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Product</span></td>
+    <td class="form-text" valign=middle><display call="menu('product')">
+    version:<display call="field('version', 5)"></td>
+    <td width=1% nowrap align=right><span class="form-label">Platform</span></td>
+    <td class="form-text" valign=middle><display call="checklist('platform')"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Created</span></td>
+    <td class="form-text"><display call="reldate('creation', pretty=1)">
+        (<display call="plain('creator')">)</td>
+    <td width=1% nowrap align=right><span class="form-label">Last activity</span></td>
+    <td class="form-text"><display call="reldate('activity', pretty=1)"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Priority</span></td>
+    <td class="form-text"><display call="field('priority')"></td>
+    <td width=1% nowrap align=right><span class="form-label">Source</span></td>
+    <td class="form-text"><display call="field('source')"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Status</span></td>
+    <td class="form-text"><display call="menu('status')"></td>
+    <td width=1% nowrap align=right><span class="form-label">Rate</span></td>
+    <td class="form-text"><display call="field('rate')"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Assigned To</span></td>
+    <td class="form-text"><display call="field('assignedto')"></td>
+    <td width=1% nowrap align=right><span class="form-label">Customer Name</span></td>
+    <td class="form-text"><display call="field('customername')"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Superseder</span></td>
+    <td class="form-text"><display call="field('superseder', size=40, showid=1)"></td>
+    <td width=1% nowrap align=right><span class="form-label">Nosy List</span></td>
+    <td class="form-text"><display call="field('nosy')"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Change Note</span></td>
+    <td colspan=3 class="form-text"><display call="note()"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td>&nbsp;</td>
+    <td colspan=3 class="form-text"><display call="submit()"></td>
+</tr>
+
+<property name="messages">
+<tr class="strong-header">
+    <td colspan=4><b>Messages</b></td>
+</tr>
+<tr>            
+    <td colspan=4><display call="list('messages')"></td>
+</tr>
+</property>
+
+<property name="files">
+ <tr class="strong-header">
+     <td colspan=4><b>Files</b></td>
+ </tr>
+ <tr>            
+     <td colspan=4><display call="list('files')"></td>
+ </tr>
+</property>
+
+</table>
+
+"""
+
+msgDOTindex = """<!-- $Id: htmlbase.py,v 1.1 2001-07-24 10:46:22 anthonybaxter Exp $-->
+<tr>
+    <property name="date">
+        <td><display call="link('date')"></td>
+    </property>
+    <property name="author">
+        <td><display call="plain('author')"></td>
+    </property>
+    <property name="summary">
+        <td><display call="plain('summary')"></td>
+    </property>
+</tr>
+"""
+
+msgDOTitem = """<!-- $Id: htmlbase.py,v 1.1 2001-07-24 10:46:22 anthonybaxter Exp $-->
+<table border=0 cellspacing=0 cellpadding=2>
+
+<tr class="strong-header">
+  <td colspan=2>Message Information</td>
+</td>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Author</span></td>
+    <td class="form-text"><display call="plain('author')"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Recipients</span></td>
+    <td class="form-text"><display call="plain('recipients')"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Date</span></td>
+    <td class="form-text"><display call="plain('date')"></td>
+</tr>
+
+<tr bgcolor="ffeaff">
+ <td colspan=2 class="form-text">
+  <pre><display call="plain('content')"></pre>
+ </td>
+</tr>
+
+<property name="files">
+<tr class="strong-header"><td colspan=2><b>Files</b></td></tr>
+<tr><td colspan=2><display call="list('files')"></td></tr>
+</property>
+
+<tr class="strong-header"><td colspan=2><b>History</b></td><tr>
+<tr><td colspan=2><display call="history()"></td></tr>
+
+</table>
+"""
+
+styleDOTcss = """h1 {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-size: 18pt; 
+  font-weight: bold; 
+}
+
+h2 {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-size: 16pt; 
+  font-weight: bold; 
+}
+
+h3 {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-size: 12pt; 
+  font-weight: bold; 
+}
+
+a:hover {  
+  font-family: Verdana, Helvetica, sans-serif; 
+  text-decoration: underline;
+  color: #333333; 
+}
+
+a:link {
+  font-family: Verdana, Helvetica, sans-serif; 
+  text-decoration: none;
+  color: #000099;
+}
+
+a {
+  font-family: Verdana, Helvetica, sans-serif; 
+  text-decoration: none;
+  color: #000099;
+}
+
+p {
+  font-family: Verdana, Helvetica, sans-serif;
+  font-size: 10pt;
+  color: #333333;
+}
+
+th {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-weight: bold;
+  font-size: 10pt; 
+  color: #333333;
+}
+
+.form-help {
+  font-family: Verdana, Helvetica, sans-serif;
+  font-size: 10pt;
+  color: #333333;
+}
+
+.std-text {
+  font-family: Verdana, Helvetica, sans-serif;
+  font-size: 10pt;
+  color: #333333;
+}
+
+.tab-small {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-size: 8pt; 
+  color: #333333;
+}
+
+.location-bar {
+  background-color: #efefef;
+  border: none;
+}
+
+.strong-header {
+  font-family: Verdana, Helvetica, sans-serif;
+  font-size: 12pt;
+  font-weight: bold;
+  background-color: #000000;
+  color: #ffffff;
+}
+
+.list-header {
+  background-color: #c0c0c0;
+  border: none;
+}
+
+.list-item {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-size: 10pt; 
+}
+
+.list-nav {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-size: 10pt; 
+  font-weight: bold;
+}
+
+.row-normal {
+  background-color: #ffffff;
+  border: none;
+
+}
+
+.row-hilite {
+  background-color: #efefef;
+  border: none;
+}
+
+.section-bar {
+  background-color: #c0c0c0;
+  border: none;
+}
+
+.system-msg {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-size: 10pt; 
+  background-color: #ffffff;
+  border:  1px solid #000000;
+  margin-bottom: 6px;
+  margin-top: 6px;
+  padding: 4px;
+  width: 100%;
+  color: #660033;
+}
+
+.form-title {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-weight: bold;
+  font-size: 12pt; 
+  color: #333333;
+}
+
+.form-label {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-weight: bold;
+  font-size: 10pt; 
+  color: #333333;
+}
+
+.form-optional {
+  font-family: Verdana, Helvetica, sans-serif; 
+  font-weight: bold;
+  font-style: italic;
+  font-size: 10pt; 
+  color: #333333;
+}
+
+.form-element {
+  font-family: Verdana, Helvetica, aans-serif;
+  font-size: 10pt;
+  color: #000000;
+}
+
+.form-text {
+  font-family: Verdana, Helvetica, sans-serif;
+  font-size: 10pt;
+  color: #333333;
+}
+
+.form-mono {
+  font-family: monospace;
+  font-size: 12px;
+  text-decoration: none;
+}
+"""
+
+userDOTindex = """<!-- $Id: htmlbase.py,v 1.1 2001-07-24 10:46:22 anthonybaxter Exp $-->
+<tr>
+    <property name="username">
+        <td><display call="link('username')"></td>
+    </property>
+    <property name="realname">
+        <td><display call="plain('realname')"></td>
+    </property>
+    <property name="organisation">
+        <td><display call="plain('organisation')"></td>
+    </property>
+    <property name="address">
+        <td><display call="plain('address')"></td>
+    </property>
+    <property name="phone">
+        <td><display call="plain('phone')"></td>
+    </property>
+</tr>
+"""
+
+userDOTitem = """<!-- $Id: htmlbase.py,v 1.1 2001-07-24 10:46:22 anthonybaxter Exp $-->
+<table border=0 cellspacing=0 cellpadding=2>
+
+<tr class="strong-header">
+  <td colspan=2>Your Details</td>
+</td>
+
+<tr  bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Name</span></td>
+    <td class="form-text"><display call="field('realname', size=40)"></td>
+</tr>
+<tr  bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Login Name</span></td>
+    <td class="form-text"><display call="field('username', size=40)"></td>
+</tr>
+<tr  bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Login Password</span></td>
+    <td class="form-text"><display call="field('password', size=10)"></td>
+</tr>
+<tr  bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Phone</span></td>
+    <td class="form-text"><display call="field('phone', size=40)"></td>
+</tr>
+<tr  bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Organisation</span></td>
+    <td class="form-text"><display call="field('organisation', size=40)"></td>
+</tr>
+<tr  bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">E-mail address</span></td>
+    <td class="form-text"><display call="field('address', size=40)"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td>&nbsp;</td>
+    <td class="form-text"><display call="submit()"></td>
+</tr>
+
+<tr class="strong-header">
+    <td colspan=2><b>History</b></td>
+</tr>
+<tr>
+    <td colspan=2><display call="history()"></td>
+</tr>
+
+</table>
+
+"""
+