Mercurial > p > roundup > code
changeset 621:f333f6decdc2
[SF#516854] "My Issues" and redisplay
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Sat, 16 Feb 2002 08:39:43 +0000 |
| parents | bd07a077464e |
| children | 1b16ddd69f31 |
| files | CHANGES.txt roundup/backends/__init__.py roundup/htmltemplate.py roundup/templates/classic/html/issue.filter roundup/templates/extended/html/issue.filter |
| diffstat | 5 files changed, 48 insertions(+), 31 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGES.txt Sat Feb 16 08:14:45 2002 +0000 +++ b/CHANGES.txt Sat Feb 16 08:39:43 2002 +0000 @@ -22,6 +22,7 @@ . All forms now have "double-submit" protection when Javascript is enabled on the client-side. . #516883 ] mail interface + ANONYMOUS_REGISTER + . #516854 ] "My Issues" and redisplay 2002-01-24 - 0.4.0
--- a/roundup/backends/__init__.py Sat Feb 16 08:14:45 2002 +0000 +++ b/roundup/backends/__init__.py Sat Feb 16 08:39:43 2002 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: __init__.py,v 1.10 2002-01-22 07:08:50 richard Exp $ +# $Id: __init__.py,v 1.11 2002-02-16 08:39:42 richard Exp $ __all__ = [] @@ -31,7 +31,7 @@ anydbm = back_anydbm __all__.append('anydbm') except AssertionError: - del back_anydbm + pass except ImportError: pass @@ -51,6 +51,10 @@ # # $Log: not supported by cvs2svn $ +# Revision 1.10 2002/01/22 07:08:50 richard +# I was certain I'd already done this (there's even a change note in +# CHANGES)... +# # Revision 1.9 2001/12/12 02:30:51 richard # I fixed the problems with people whose anydbm was using the dbm module at the # backend. It turns out the dbm module modifies the file name to append ".db"
--- a/roundup/htmltemplate.py Sat Feb 16 08:14:45 2002 +0000 +++ b/roundup/htmltemplate.py Sat Feb 16 08:39:43 2002 +0000 @@ -15,13 +15,13 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: htmltemplate.py,v 1.73 2002-02-15 07:08:44 richard Exp $ +# $Id: htmltemplate.py,v 1.74 2002-02-16 08:39:42 richard Exp $ __doc__ = """ Template engine. """ -import os, re, StringIO, urllib, cgi, errno +import os, re, StringIO, urllib, cgi, errno, types import hyperdb, date, password from i18n import _ @@ -257,7 +257,33 @@ value = self.determine_value(property) # display + if isinstance(propclass, hyperdb.Multilink): + linkcl = self.db.classes[propclass.classname] + options = linkcl.list() + options.sort(sortfunc) + height = height or min(len(options), 7) + l = ['<select multiple name="%s" size="%s">'%(property, height)] + k = linkcl.labelprop() + for optionid in options: + option = linkcl.get(optionid, k) + s = '' + if optionid in value: + s = 'selected ' + if showid: + lab = '%s%s: %s'%(propclass.classname, optionid, option) + else: + lab = option + if size is not None and len(lab) > size: + lab = lab[:size-3] + '...' + lab = cgi.escape(lab) + l.append('<option %svalue="%s">%s</option>'%(s, optionid, + lab)) + l.append('</select>') + return '\n'.join(l) if isinstance(propclass, hyperdb.Link): + # force the value to be a single choice + if type(value) is types.ListType: + value = value[0] linkcl = self.db.classes[propclass.classname] l = ['<select name="%s">'%property] k = linkcl.labelprop() @@ -282,29 +308,6 @@ l.append('<option %svalue="%s">%s</option>'%(s, optionid, lab)) l.append('</select>') return '\n'.join(l) - if isinstance(propclass, hyperdb.Multilink): - linkcl = self.db.classes[propclass.classname] - options = linkcl.list() - options.sort(sortfunc) - height = height or min(len(options), 7) - l = ['<select multiple name="%s" size="%s">'%(property, height)] - k = linkcl.labelprop() - for optionid in options: - option = linkcl.get(optionid, k) - s = '' - if optionid in value: - s = 'selected ' - if showid: - lab = '%s%s: %s'%(propclass.classname, optionid, option) - else: - lab = option - if size is not None and len(lab) > size: - lab = lab[:size-3] + '...' - lab = cgi.escape(lab) - l.append('<option %svalue="%s">%s</option>'%(s, optionid, - lab)) - l.append('</select>') - return '\n'.join(l) return _('[Menu: not a link]') #XXX deviates from spec @@ -768,7 +771,8 @@ for nodeid in nodeids: # check for a group heading if group_names: - this_group = [self.cl.get(nodeid, name, _('[no value]')) for name in group_names] + this_group = [self.cl.get(nodeid, name, _('[no value]')) + for name in group_names] if this_group != old_group: l = [] for name in group_names: @@ -1064,6 +1068,10 @@ # # $Log: not supported by cvs2svn $ +# Revision 1.73 2002/02/15 07:08:44 richard +# . Alternate email addresses are now available for users. See the MIGRATION +# file for info on how to activate the feature. +# # Revision 1.72 2002/02/14 23:39:18 richard # . All forms now have "double-submit" protection when Javascript is enabled # on the client-side.
--- a/roundup/templates/classic/html/issue.filter Sat Feb 16 08:14:45 2002 +0000 +++ b/roundup/templates/classic/html/issue.filter Sat Feb 16 08:39:43 2002 +0000 @@ -1,4 +1,4 @@ -<!-- $Id: issue.filter,v 1.2 2001-07-29 04:07:37 richard Exp $--> +<!-- $Id: issue.filter,v 1.3 2002-02-16 08:39:42 richard Exp $--> <property name="title"> <tr><th width="1%" align="right" class="location-bar">Title</th> <td><display call="field('title')"></td></tr> @@ -11,3 +11,7 @@ <tr><th width="1%" align="right" class="location-bar">Priority</th> <td><display call="checklist('priority')"></td></tr> </property> +<property name="assignedto"> + <tr><th width="1%" align="right" class="location-bar">Assigned to</th> + <td><display call="field('assignedto')"></td></tr> +</property>
--- a/roundup/templates/extended/html/issue.filter Sat Feb 16 08:14:45 2002 +0000 +++ b/roundup/templates/extended/html/issue.filter Sat Feb 16 08:39:43 2002 +0000 @@ -1,4 +1,4 @@ -<!-- $Id: issue.filter,v 1.2 2001-07-30 01:26:59 richard Exp $--> +<!-- $Id: issue.filter,v 1.3 2002-02-16 08:39:43 richard Exp $--> <property name="title"> <tr><th width="1%" align="right" class="location-bar">Title</th> <td><display call="field('title')"></td></tr> @@ -25,5 +25,5 @@ </property> <property name="assignedto"> <tr><th width="1%" align="right" class="location-bar">Assigned to</th> - <td><display call="checklist('assignedto')"></td></tr> + <td><display call="menu('assignedto')"></td></tr> </property>
