summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 53d19a1)
raw | patch | inline | side by side (parent: 53d19a1)
author | rochecompaan <rochecompaan@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Fri, 29 Mar 2002 19:41:48 +0000 (19:41 +0000) | ||
committer | rochecompaan <rochecompaan@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Fri, 29 Mar 2002 19:41:48 +0000 (19:41 +0000) |
functions, menu and plain.
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@685 57a73879-2fb5-44c3-a270-3262357dd7e2
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@685 57a73879-2fb5-44c3-a270-3262357dd7e2
CHANGES.txt | patch | blob | history | |
roundup/htmltemplate.py | patch | blob | history | |
test/test_htmltemplate.py | patch | blob | history |
diff --git a/CHANGES.txt b/CHANGES.txt
index 5143ab7c8fd54eb78a06c426a0dc694f54fa9167..1460cbb65cdf4fbc3326093b2f6231a463275f51 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
. #517734 ] web header customisation is obscure
. All messages sent to the nosy list are now encoded as
quoted-printable before they are sent.
+ . Fixed display of mutlilink properties when using the template
+ functions, menu and plain.
Fixed:
. Clean up mail handling, multipart handling.
index 55f7fee2e68f43a4ca06270a389e7eee86b2ded6..d85684f1142502272ed2d79fbaa55822a047b25c 100644 (file)
--- a/roundup/htmltemplate.py
+++ b/roundup/htmltemplate.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: htmltemplate.py,v 1.83 2002-02-27 04:14:31 richard Exp $
+# $Id: htmltemplate.py,v 1.84 2002-03-29 19:41:48 rochecompaan Exp $
__doc__ = """
Template engine.
elif isinstance(propclass, hyperdb.Multilink):
linkcl = self.db.classes[propclass.classname]
k = linkcl.labelprop()
- value = ', '.join(value)
+ labels = []
+ for v in value:
+ labels.append(linkcl.get(v, k))
+ value = ', '.join(labels)
else:
value = _('Plain: bad propclass "%(propclass)s"')%locals()
if escape:
for optionid in options:
option = linkcl.get(optionid, k)
s = ''
- if optionid in value:
+ if optionid in value or option in value:
s = 'selected '
if showid:
lab = '%s%s: %s'%(propclass.classname, optionid, option)
for optionid in options:
option = linkcl.get(optionid, k)
s = ''
- if optionid == value:
+ if value in [optionid, option]:
s = 'selected '
if showid:
lab = '%s%s: %s'%(propclass.classname, optionid, option)
#
# $Log: not supported by cvs2svn $
+# Revision 1.83 2002/02/27 04:14:31 richard
+# Ran it through pychecker, made fixes
+#
# Revision 1.82 2002/02/21 23:11:45 richard
# . fixed some problems in date calculations (calendar.py doesn't handle over-
# and under-flow). Also, hour/minute/second intervals may now be more than
index bf016ff572c31a3aa7aaf5727f975cce2b13c5be..3fd109c5edf7f1bf067d0898cfccb1e876cf2a07 100644 (file)
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: test_htmltemplate.py,v 1.11 2002-02-21 23:11:45 richard Exp $
+# $Id: test_htmltemplate.py,v 1.12 2002-03-29 19:41:48 rochecompaan Exp $
import unittest, cgi, time
self.assertEqual(self.tf.do_plain('link'), 'the key1')
def testPlain_multilink(self):
- self.assertEqual(self.tf.do_plain('multilink'), '1, 2')
+ self.assertEqual(self.tf.do_plain('multilink'), 'the key1, the key2')
# def do_field(self, property, size=None, showid=0):
#
# $Log: not supported by cvs2svn $
+# Revision 1.11 2002/02/21 23:11:45 richard
+# . fixed some problems in date calculations (calendar.py doesn't handle over-
+# and under-flow). Also, hour/minute/second intervals may now be more than
+# 99 each.
+#
# Revision 1.10 2002/02/21 06:57:39 richard
# . Added popup help for classes using the classhelp html template function.
# - add <display call="classhelp('priority', 'id,name,description')">