|
15 | 15 | # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
16 | 16 | # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
17 | 17 | # |
18 | | -# $Id: htmltemplate.py,v 1.55 2002-01-14 06:45:03 richard Exp $ |
| 18 | +# $Id: htmltemplate.py,v 1.56 2002-01-14 07:04:36 richard Exp $ |
19 | 19 |
|
20 | 20 | __doc__ = """ |
21 | 21 | Template engine. |
@@ -85,12 +85,16 @@ def do_plain(self, property, escape=0): |
85 | 85 | elif isinstance(propclass, hyperdb.Link): |
86 | 86 | linkcl = self.db.classes[propclass.classname] |
87 | 87 | k = linkcl.labelprop() |
88 | | - if value: value = str(linkcl.get(value, k)) |
89 | | - else: value = _('[unselected]') |
| 88 | + if value: |
| 89 | + value = '<a href="%s%s">%s</a>'%(propclass.classname, value, |
| 90 | + linkcl.get(value, k)) |
| 91 | + else: |
| 92 | + value = _('[unselected]') |
90 | 93 | elif isinstance(propclass, hyperdb.Multilink): |
91 | 94 | linkcl = self.db.classes[propclass.classname] |
92 | 95 | k = linkcl.labelprop() |
93 | | - value = ', '.join([linkcl.get(i, k) for i in value]) |
| 96 | + value = ', '.join(['<a href="%s%s">%s</a>'%(propclass.classname, |
| 97 | + i, linkcl.get(i, k)) for i in value]) |
94 | 98 | else: |
95 | 99 | s = _('Plain: bad propclass "%(propclass)s"')%locals() |
96 | 100 | if escape: |
@@ -882,6 +886,11 @@ def render(self, form): |
882 | 886 |
|
883 | 887 | # |
884 | 888 | # $Log: not supported by cvs2svn $ |
| 889 | +# Revision 1.55 2002/01/14 06:45:03 richard |
| 890 | +# . #502953 ] nosy-like treatment of other multilinks |
| 891 | +# ... had to revert most of the previous change to the multilink field |
| 892 | +# display... not good. |
| 893 | +# |
885 | 894 | # Revision 1.54 2002/01/14 05:16:51 richard |
886 | 895 | # The submit buttons need a name attribute or mozilla won't submit without a |
887 | 896 | # file upload. Yeah, that's bloody obscure. Grr. |
|
0 commit comments