X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=roundup%2Fcgi%2Ftemplating.py;h=d29f31d6600aac87eae1d8eae92f55a511c90a2b;hb=ef558f6cdc27a8289fffae910e873ccf3ef1bfcd;hp=d7afb83a559c1e3a929fc898827aa552e07fd538;hpb=686ad3763df6183d8fabb8ccbeb7e0fb7bbc4e22;p=roundup.git diff --git a/roundup/cgi/templating.py b/roundup/cgi/templating.py index d7afb83..d29f31d 100644 --- a/roundup/cgi/templating.py +++ b/roundup/cgi/templating.py @@ -98,7 +98,7 @@ def getTemplate(dir, name, extension, classname=None, request=None): # compile the template templates[key] = pt = RoundupPageTemplate() pt.write(open(src).read()) - pt.id = name + pt.id = filename pt.mtime = time.time() return pt @@ -323,8 +323,8 @@ class HTMLClass: height. The popup window will be resizable and scrollable. ''' return '(%s)'%(self.classname, - properties, width, height, label) + ':contentonly=1&properties=%s\', \'%s\', \'%s\')">'\ + '(%s)'%(self.classname, properties, width, height, label) def submit(self, label="Submit New Entry"): ''' Generate a submit button (and action hidden element) @@ -1075,6 +1075,19 @@ class HTMLRequest: if kwargs.has_key('columns'): self.show = ShowDict(self.columns) + def description(self): + ''' Return a description of the request - handle for the page title. + ''' + s = [self.client.db.config.INSTANCE_NAME] + if self.classname: + if self.client.nodeid: + s.append('- %s%s'%(self.classname, self.client.nodeid)) + else: + s.append('- index of '+self.classname) + else: + s.append('- home') + return ' '.join(s) + def __str__(self): d = {} d.update(self.__dict__)