From a58d37f38b36a520c2db1ba0d3dd11886a582d29 Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 6 Sep 2002 05:33:09 +0000 Subject: [PATCH] nicer page title git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1080 57a73879-2fb5-44c3-a270-3262357dd7e2 --- TODO.txt | 1 - roundup/cgi/templating.py | 13 +++++++++++++ roundup/templates/classic/html/page | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) 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 -- 2.30.2