diff roundup/htmltemplate.py @ 231:afd428ba6523

better CGI text searching - but hidden filter fields are disappearing...
author Richard Jones <richard@users.sourceforge.net>
date Thu, 16 Aug 2001 07:34:59 +0000
parents 1d1848c99abe
children 6bf584784e31
line wrap: on
line diff
--- a/roundup/htmltemplate.py	Thu Aug 16 06:59:58 2001 +0000
+++ b/roundup/htmltemplate.py	Thu Aug 16 07:34:59 2001 +0000
@@ -15,7 +15,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 # 
-# $Id: htmltemplate.py,v 1.20 2001-08-15 23:43:18 richard Exp $
+# $Id: htmltemplate.py,v 1.21 2001-08-16 07:34:59 richard Exp $
 
 import os, re, StringIO, urllib, cgi, errno
 
@@ -505,18 +505,18 @@
         columns = l
 
     # now display the index section
-    w('<table width=100% border=0 cellspacing=0 cellpadding=2>')
-    w('<tr class="list-header">')
+    w('<table width=100% border=0 cellspacing=0 cellpadding=2>\n')
+    w('<tr class="list-header">\n')
     for name in columns:
         cname = name.capitalize()
         if show_display_form:
             anchor = "%s?%s"%(classname, sortby(name, columns, filter,
                 sort, group, filterspec))
-            w('<td><span class="list-item"><a href="%s">%s</a></span></td>'%(
+            w('<td><span class="list-item"><a href="%s">%s</a></span></td>\n'%(
                 anchor, cname))
         else:
-            w('<td><span class="list-item">%s</span></td>'%cname)
-    w('</tr>')
+            w('<td><span class="list-item">%s</span></td>\n'%cname)
+    w('</tr>\n')
 
     # this stuff is used for group headings - optimise the group names
     old_group = None
@@ -575,49 +575,49 @@
 
     # now add in the filter/columns/group/etc config table form
     w('<p>')
-    w('<table width=100% border=0 cellspacing=0 cellpadding=2>')
+    w('<table width=100% border=0 cellspacing=0 cellpadding=2>\n')
     names = []
     for name in cl.getprops().keys():
         if name in all_filters or name in all_columns:
             names.append(name)
     w('<tr class="location-bar">')
-    w('<th align="left" colspan=%s>View customisation...</th></tr>'%
+    w('<th align="left" colspan=%s>View customisation...</th></tr>\n'%
         (len(names)+1))
     w('<tr class="location-bar"><th>&nbsp;</th>')
     for name in names:
         w('<th>%s</th>'%name.capitalize())
-    w('</tr>')
+    w('</tr>\n')
 
     # filter
     if all_filters:
-        w('<tr><th width="1%" align=right class="location-bar">Filters</th>')
+        w('<tr><th width="1%" align=right class="location-bar">Filters</th>\n')
         for name in names:
             if name not in all_filters:
                 w('<td>&nbsp;</td>')
                 continue
             if name in filter: checked=' checked'
             else: checked=''
-            w('<td align=middle>')
-            w('<input type="checkbox" name=":filter" value="%s" %s></td>'%(name,
-                checked))
-        w('</tr>')
+            w('<td align=middle>\n')
+            w(' <input type="checkbox" name=":filter" value="%s" %s></td>\n'%(
+                name, checked))
+        w('</tr>\n')
 
     # columns
     if all_columns:
-        w('<tr><th width="1%" align=right class="location-bar">Columns</th>')
+        w('<tr><th width="1%" align=right class="location-bar">Columns</th>\n')
         for name in names:
             if name not in all_columns:
                 w('<td>&nbsp;</td>')
                 continue
             if name in columns: checked=' checked'
             else: checked=''
-            w('<td align=middle>')
-            w('<input type="checkbox" name=":columns" value="%s" %s></td>'%(
+            w('<td align=middle>\n')
+            w(' <input type="checkbox" name=":columns" value="%s" %s></td>\n'%(
                 name, checked))
-        w('</tr>')
+        w('</tr>\n')
 
         # group
-        w('<tr><th width="1%" align=right class="location-bar">Grouping</th>')
+        w('<tr><th width="1%" align=right class="location-bar">Grouping</th>\n')
         for name in names:
             prop = properties[name]
             if name not in all_columns:
@@ -625,16 +625,16 @@
                 continue
             if name in group: checked=' checked'
             else: checked=''
-            w('<td align=middle>')
-            w('<input type="checkbox" name=":group" value="%s" %s></td>'%(
+            w('<td align=middle>\n')
+            w(' <input type="checkbox" name=":group" value="%s" %s></td>\n'%(
                 name, checked))
-        w('</tr>')
+        w('</tr>\n')
 
     w('<tr class="location-bar"><td width="1%">&nbsp;</td>')
     w('<td colspan="%s">'%len(names))
-    w('<input type="submit" value="Redisplay"></td></tr>')
-    w('</table>')
-    w('</form>')
+    w('<input type="submit" value="Redisplay"></td></tr>\n')
+    w('</table>\n')
+    w('</form>\n')
 
 
 #
@@ -742,6 +742,10 @@
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.20  2001/08/15 23:43:18  richard
+# Fixed some isFooTypes that I missed.
+# Refactored some code in the CGI code.
+#
 # Revision 1.19  2001/08/12 06:32:36  richard
 # using isinstance(blah, Foo) now instead of isFooType
 #

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