Mercurial > p > roundup > code
comparison roundup/htmltemplate.py @ 119:ad64dade1769
Fixed problem in link display when Link value is None.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Sun, 29 Jul 2001 04:06:42 +0000 |
| parents | c73f727208b0 |
| children | 51cce9671db0 |
comparison
equal
deleted
inserted
replaced
| 118:a55c1301ba1f | 119:ad64dade1769 |
|---|---|
| 1 # $Id: htmltemplate.py,v 1.5 2001-07-28 08:17:09 richard Exp $ | 1 # $Id: htmltemplate.py,v 1.6 2001-07-29 04:06:42 richard Exp $ |
| 2 | 2 |
| 3 import os, re, StringIO, urllib, cgi, errno | 3 import os, re, StringIO, urllib, cgi, errno |
| 4 | 4 |
| 5 import hyperdb, date | 5 import hyperdb, date |
| 6 | 6 |
| 236 value = self.cl.get(self.nodeid, property) | 236 value = self.cl.get(self.nodeid, property) |
| 237 else: | 237 else: |
| 238 if propclass.isMultilinkType: value = [] | 238 if propclass.isMultilinkType: value = [] |
| 239 else: value = '' | 239 else: value = '' |
| 240 if propclass.isLinkType: | 240 if propclass.isLinkType: |
| 241 if value is None: | |
| 242 return '[not assigned]' | |
| 241 linkcl = self.db.classes[propclass.classname] | 243 linkcl = self.db.classes[propclass.classname] |
| 242 k = linkcl.getkey() | 244 k = linkcl.getkey() |
| 243 # if the linked-to class doesn't have a key property, then try | 245 # if the linked-to class doesn't have a key property, then try |
| 244 # 'name', then 'title' and then just use a random one. | 246 # 'name', then 'title' and then just use a random one. |
| 245 if not k: | 247 if not k: |
| 793 w(replace.go(s)) | 795 w(replace.go(s)) |
| 794 w('</form>') | 796 w('</form>') |
| 795 | 797 |
| 796 # | 798 # |
| 797 # $Log: not supported by cvs2svn $ | 799 # $Log: not supported by cvs2svn $ |
| 800 # Revision 1.5 2001/07/28 08:17:09 richard | |
| 801 # fixed use of stylesheet | |
| 802 # | |
| 798 # Revision 1.4 2001/07/28 07:59:53 richard | 803 # Revision 1.4 2001/07/28 07:59:53 richard |
| 799 # Replaced errno integers with their module values. | 804 # Replaced errno integers with their module values. |
| 800 # De-tabbed templatebuilder.py | 805 # De-tabbed templatebuilder.py |
| 801 # | 806 # |
| 802 # Revision 1.3 2001/07/25 03:39:47 richard | 807 # Revision 1.3 2001/07/25 03:39:47 richard |
