From: richard Date: Wed, 23 Jan 2002 06:15:24 +0000 (+0000) Subject: real (non-string, duh) sorting of lists by node id X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=33dadd4119a92c035bc0bb5f9858f8c9a8617b67;p=roundup.git real (non-string, duh) sorting of lists by node id git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@593 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/htmltemplate.py b/roundup/htmltemplate.py index 6390a2b..c4f8866 100644 --- a/roundup/htmltemplate.py +++ b/roundup/htmltemplate.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: htmltemplate.py,v 1.70 2002-01-23 05:47:57 richard Exp $ +# $Id: htmltemplate.py,v 1.71 2002-01-23 06:15:24 richard Exp $ __doc__ = """ Template engine. @@ -456,12 +456,15 @@ class TemplateFunctions: return _('[List: not a Multilink]') value = self.determine_value(property) - if not value: - return '' + if not value: + return '' + # sort, possibly revers and then re-stringify + value = map(int, value) value.sort() if reverse: value.reverse() + value = map(str, value) # render the sub-index into a string fp = StringIO.StringIO() @@ -1040,6 +1043,9 @@ class NewItemTemplate(TemplateFunctions): # # $Log: not supported by cvs2svn $ +# Revision 1.70 2002/01/23 05:47:57 richard +# more HTML template cleanup and unit tests +# # Revision 1.69 2002/01/23 05:10:27 richard # More HTML template cleanup and unit tests. # - download() now implemented correctly, replacing link(is_download=1) [fixed in the