Code

nicer page title
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Fri, 6 Sep 2002 05:33:09 +0000 (05:33 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Fri, 6 Sep 2002 05:33:09 +0000 (05:33 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1080 57a73879-2fb5-44c3-a270-3262357dd7e2

TODO.txt
roundup/cgi/templating.py
roundup/templates/classic/html/page

index d4e9a20154604dd8f028436a5b03de8f26d5725b..df123510cc54b04d1fc9af593ead3b0c93cb3ce6 100644 (file)
--- 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
 
index 1d9bedf239b479b644647c3826821150143ed76e..15f10c721756c8b9eb4218c7bc1a966bf71fc4c7 100644 (file)
@@ -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__)
index 4c0de68aeeb475d23313e7037880830a9006edbb..c712193a1e5b322c86f16fa6c79795442a368ead 100644 (file)
@@ -1,4 +1,4 @@
-<html tal:define="title string:${db/config/INSTANCE_NAME} - ${request/classname}">
+<html tal:define="title request/description">
 <head>
 <title tal:content="title">title goes here</title>