deal with empty site-title stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 19 Jun 2009 08:27:41 +0200
branchstable
changeset 2119 dc1eedd06766
parent 2118 0012d997b992
child 2120 ed1cd652b343
deal with empty site-title
web/views/basecomponents.py
web/views/basetemplates.py
--- a/web/views/basecomponents.py	Fri Jun 19 08:23:45 2009 +0200
+++ b/web/views/basecomponents.py	Fri Jun 19 08:27:41 2009 +0200
@@ -148,8 +148,10 @@
     site_wide = True
 
     def call(self):
-        self.w(u'<span id="appliName"><a href="%s">%s</a></span>' % (
-            self.req.base_url(), self.req.property_value('ui.site-title')))
+        title = self.req.property_value('ui.site-title')
+        if title:
+            self.w(u'<span id="appliName"><a href="%s">%s</a></span>' % (
+                self.req.base_url(), title))
 
 
 class SeeAlsoVComponent(component.RelatedObjectsVComponent):
--- a/web/views/basetemplates.py	Fri Jun 19 08:23:45 2009 +0200
+++ b/web/views/basetemplates.py	Fri Jun 19 08:27:41 2009 +0200
@@ -431,7 +431,7 @@
         self.w(u'<div id="%s" class="%s">' % (id, klass))
         if title:
             self.w(u'<div id="loginTitle">%s</div>'
-                   % self.req.property_value('ui.site-title'))
+                   % (self.req.property_value('ui.site-title') or u'&nbsp;'))
         self.w(u'<div id="loginContent">\n')
 
         if message: