summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a0161e1)
raw | patch | inline | side by side (parent: a0161e1)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 10 Sep 2002 08:04:57 +0000 (08:04 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 10 Sep 2002 08:04:57 +0000 (08:04 +0000) |
retired users reliably)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1120 57a73879-2fb5-44c3-a270-3262357dd7e2
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1120 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/backends/back_anydbm.py | patch | blob | history | |
roundup/cgi/templating.py | patch | blob | history | |
roundup/templates/classic/html/issue.item | patch | blob | history |
index 2a338a0bb7ba250a088606c5c0ab9c454726638c..db188141017d45a764711dd949585c16be579880 100644 (file)
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-#$Id: back_anydbm.py,v 1.73 2002-09-10 00:11:49 richard Exp $
+#$Id: back_anydbm.py,v 1.74 2002-09-10 08:04:56 richard Exp $
'''
This module defines a backend that saves the hyperdatabase in a database
chosen by anydbm. It is guaranteed to always be available in python
raise ValueError, 'Journalling is disabled for this class'
journal = self.db.getjournal(self.classname, nodeid)
if journal:
- name = self.db.getjournal(self.classname, nodeid)[0][2]
+ return self.db.getjournal(self.classname, nodeid)[0][2]
else:
- return None
- try:
- return self.db.user.lookup(name)
- except KeyError:
- # the journaltag user doesn't exist any more
- return None
+ return self.db.journaltag
# get the property (raises KeyErorr if invalid)
prop = self.properties[propname]
d['id'] = String()
d['creation'] = hyperdb.Date()
d['activity'] = hyperdb.Date()
- d['creator'] = hyperdb.Link("user")
+ # can't be a link to user because the user might have been
+ # retired since the journal entry was created
+ d['creator'] = hyperdb.String()
return d
def addprop(self, **properties):
index f133edbe32d7781e71fb4ae6cae8c4d9c39f0f2c..124f97d9092848920539291c5baa824f9f065281 100644 (file)
# we don't exist
if item == 'id':
return None
- if item == 'creator':
- # but we will be created by this user...
- return HTMLUser(self._client, 'user', self._client.userid)
# get the property
prop = self._props[item]
def plain(self, escape=0):
if self._value is None:
- return _('[unselected]')
+ return ''
linkcl = self._db.classes[self._prop.classname]
k = linkcl.labelprop(1)
value = str(linkcl.get(self._value, k))
l.append('</select>')
return '\n'.join(l)
- def download(self, showid=0):
- linkname = self._prop.classname
- linkcl = self._db.getclass(linkname)
- k = linkcl.labelprop(1)
- linkvalue = cgi.escape(str(linkcl.get(self._value, k)))
- if showid:
- label = value
- title = ' title="%s"'%linkvalue
- # note ... this should be urllib.quote(linkcl.get(value, k))
- else:
- label = linkvalue
- title = ''
- return '<a href="%s%s/%s"%s>%s</a>'%(linkname, self._value,
- linkvalue, title, label)
-
def menu(self, size=None, height=None, showid=0, additional=[],
**conditions):
value = self._value
l.append('<option %svalue="%s">%s</option>'%(s, optionid, lab))
l.append('</select>')
return '\n'.join(l)
-
# def checklist(self, ...)
class MultilinkHTMLProperty(HTMLProperty):
index aacb0e0a52d2c39c17237c8c85729e5224235259..2d6d09ba7b1f5e7f69546841c7c5d168e5861ea6 100644 (file)
</table>
<span tal:condition="context/id" tal:content="structure string:Created on
-<b>${context/creation}</b> by <b>${context/creator/username}</b>, last
+<b>${context/creation}</b> by <b>${context/creator}</b>, last
changed <b>${context/activity}</b>.">activity info</span>
<tal:block tal:condition="context/id">