diff roundup/htmltemplate.py @ 524:dce4c75bef5a

changed all config accesses... ...so they access either the instance or the config attriubute on the db. This means that all config is obtained from instance_config instead of the mish-mash of classes. This will make switching to a ConfigParser setup easier too, I hope. At a minimum, this makes migration a _little_ easier (a lot easier in the 0.5.0 switch, I hope!)
author Richard Jones <richard@users.sourceforge.net>
date Mon, 14 Jan 2002 02:20:15 +0000
parents 59e721a72a30
children d046cc4ba7d3
line wrap: on
line diff
--- a/roundup/htmltemplate.py	Sun Jan 13 08:03:53 2002 +0000
+++ b/roundup/htmltemplate.py	Mon Jan 14 02:20:15 2002 +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.51 2002-01-10 10:02:15 grubert Exp $
+# $Id: htmltemplate.py,v 1.52 2002-01-14 02:20:14 richard Exp $
 
 __doc__ = """
 Template engine.
@@ -506,6 +506,7 @@
 class IndexTemplate(TemplateFunctions):
     def __init__(self, client, templates, classname):
         self.client = client
+        self.instance = client.instance
         self.templates = templates
         self.classname = classname
 
@@ -551,8 +552,8 @@
             columns = l
 
         # display the filter section
-        if (show_display_form and hasattr(self.client, 'FILTER_POSITION') and
-                self.client.FILTER_POSITION in ('top and bottom', 'top')):
+        if (show_display_form and 
+                self.instance.FILTER_POSITION in ('top and bottom', 'top')):
             w('<form action="index">\n')
             self.filter_section(filter_template, filter, columns, group,
                 all_filters, all_columns, show_customization)
@@ -633,8 +634,8 @@
         w('</table>')
 
         # display the filter section
-        if (show_display_form and hasattr(self.client, 'FILTER_POSITION') and
-                self.client.FILTER_POSITION in ('top and bottom', 'bottom')):
+        if (show_display_form and hasattr(self.instance, 'FILTER_POSITION') and
+                self.instance.FILTER_POSITION in ('top and bottom', 'bottom')):
             w('<form action="index">\n')
             self.filter_section(filter_template, filter, columns, group,
                 all_filters, all_columns, show_customization)
@@ -823,6 +824,7 @@
 class ItemTemplate(TemplateFunctions):
     def __init__(self, client, templates, classname):
         self.client = client
+        self.instance = client.instance
         self.templates = templates
         self.classname = classname
 
@@ -855,6 +857,7 @@
 class NewItemTemplate(TemplateFunctions):
     def __init__(self, client, templates, classname):
         self.client = client
+        self.instance = client.instance
         self.templates = templates
         self.classname = classname
 
@@ -886,6 +889,10 @@
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.51  2002/01/10 10:02:15  grubert
+# In do_history: replace "." in date by " " so html wraps more sensible.
+# Should this be done in date's string converter ?
+#
 # Revision 1.50  2002/01/05 02:35:10  richard
 # I18N'ification
 #

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