summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c321dda)
raw | patch | inline | side by side (parent: c321dda)
author | stefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 12 Feb 2009 05:10:59 +0000 (05:10 +0000) | ||
committer | stefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 12 Feb 2009 05:10:59 +0000 (05:10 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4123 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/cgi/templating.py | patch | blob | history |
index 106df96e2d90a6b3143eff92889e1300220415c0..313cfb07969f29941f0b8054e4e881b1ca6ff480 100644 (file)
if 'username' in properties.split( ',' ):
sort = 'username'
else:
- sort = find_sort_key(self._klass)
+ sort = self._klass.orderprop()
sort = '&@sort=' + sort
if property:
property = '&property=%s'%property
else:
sort_on = ('+', sort_on)
else:
- sort_on = ('+', find_sort_key(linkcl))
+ sort_on = ('+', linkcl.orderprop())
options = [opt
for opt in linkcl.filter(None, conditions, sort_on, (None, None))
else:
sort_on = ('+', sort_on)
else:
- sort_on = ('+', find_sort_key(linkcl))
+ sort_on = ('+', linkcl.orderprop())
options = [opt
for opt in linkcl.filter(None, conditions, sort_on)
"""
linkcl = db.getclass(classname)
if sort_on is None:
- sort_on = find_sort_key(linkcl)
+ sort_on = linkcl.orderprop()
def sortfunc(a, b):
return cmp(linkcl.get(a, sort_on), linkcl.get(b, sort_on))
return sortfunc
-def find_sort_key(linkcl):
- if linkcl.getprops().has_key('order'):
- return 'order'
- else:
- return linkcl.labelprop()
-
def handleListCGIValue(value):
""" Value is either a single item or a list of items. Each item has a
.value that we're actually interested in.