From: richard Date: Fri, 6 Sep 2002 05:33:09 +0000 (+0000) Subject: nicer page title X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a58d37f38b36a520c2db1ba0d3dd11886a582d29;p=roundup.git nicer page title git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1080 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/TODO.txt b/TODO.txt index d4e9a20..df12351 100644 --- a/TODO.txt +++ b/TODO.txt @@ -49,7 +49,6 @@ pending web: have roundup.cgi pick up instance config from the environment pending web: UNIX init.d script for roundup-server pending web: modify cgitb to handle PageTemplate errors better (see how Zope handles __traceback_supplement__ and __traceback_info__) -pending web: title is stoopid pending web: rewritten documentation (can come after the beta though so stuff is settled) ... including relevant file names in customisation doc diff --git a/roundup/cgi/templating.py b/roundup/cgi/templating.py index 1d9bedf..15f10c7 100644 --- a/roundup/cgi/templating.py +++ b/roundup/cgi/templating.py @@ -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__) diff --git a/roundup/templates/classic/html/page b/roundup/templates/classic/html/page index 4c0de68..c712193 100644 --- a/roundup/templates/classic/html/page +++ b/roundup/templates/classic/html/page @@ -1,4 +1,4 @@ - + title goes here