comparison roundup/cgi/templating.py @ 3067:e626ca474005 maint-0.8

another fix to indexargs
author Richard Jones <richard@users.sourceforge.net>
date Wed, 05 Jan 2005 21:57:22 +0000
parents 8839a63d091e
children 6554fc102b23
comparison
equal deleted inserted replaced
3065:8839a63d091e 3067:e626ca474005
2070 l.append(sc+'pagesize=%s'%self.pagesize) 2070 l.append(sc+'pagesize=%s'%self.pagesize)
2071 if not specials.has_key('startwith'): 2071 if not specials.has_key('startwith'):
2072 l.append(sc+'startwith=%s'%self.startwith) 2072 l.append(sc+'startwith=%s'%self.startwith)
2073 2073
2074 # finally, the remainder of the filter args in the request 2074 # finally, the remainder of the filter args in the request
2075 props = self.client.db.getclass(self.classname).getprops() 2075 if self.classname and self.filterspec:
2076 q = urllib.quote 2076 props = self.client.db.getclass(self.classname).getprops()
2077 for k,v in self.filterspec.items(): 2077 q = urllib.quote
2078 if not args.has_key(k): 2078 for k,v in self.filterspec.items():
2079 if type(v) == type([]): 2079 if not args.has_key(k):
2080 if isinstance(props[k], hyperdb.String): 2080 if type(v) == type([]):
2081 l.append('%s=%s'%(k, '%20'.join([q(i) for i in v]))) 2081 if isinstance(props[k], hyperdb.String):
2082 l.append('%s=%s'%(k, '%20'.join([q(i) for i in v])))
2083 else:
2084 l.append('%s=%s'%(k, ','.join([q(i) for i in v])))
2082 else: 2085 else:
2083 l.append('%s=%s'%(k, ','.join([q(i) for i in v]))) 2086 l.append('%s=%s'%(k, q(v)))
2084 else: 2087 return '%s?%s'%(url, '&'.join(l))
2085 l.append('%s=%s'%(k, q(v)))
2086 return '%s?%s'%(url, '&'.join(l))
2087 indexargs_href = indexargs_url 2088 indexargs_href = indexargs_url
2088 2089
2089 def base_javascript(self): 2090 def base_javascript(self):
2090 return ''' 2091 return '''
2091 <script type="text/javascript"> 2092 <script type="text/javascript">

Roundup Issue Tracker: http://roundup-tracker.org/