X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=myslice%2Ftheme.py;h=889bca2cb312ed1f97ec51f39438c6b153b79dfc;hb=929f8979e42188a6dd7c7afed81342d4b1ef99e5;hp=d44b854eb3973f9c40f720cdba3b5aa26131f5bf;hpb=5a40dbe074a307538769ae873e446323d6a75f39;p=unfold.git diff --git a/myslice/theme.py b/myslice/theme.py index d44b854e..889bca2c 100644 --- a/myslice/theme.py +++ b/myslice/theme.py @@ -9,17 +9,29 @@ class ThemeView (object): self.config = ConfigEngine() if self.config.myslice.theme : return self.config.myslice.theme - + + @property + def label(self): + self.config = ConfigEngine() + if self.config.myslice.theme_label : + return self.config.myslice.theme_label + + @property + def logo(self): + self.config = ConfigEngine() + if self.config.myslice.theme_logo : + return self.config.myslice.theme_logo + @property def template(self): # Load a template from the theme directory if it exists # else load it from the common templates dir - print "THEME = ",self.theme - print "TEMPLATE = ",self.template_name - print "TEMPLATE_DIRS = ",TEMPLATE_DIRS + #print "THEME = ",self.theme + #print "TEMPLATE = ",self.template_name + #print "TEMPLATE_DIRS = ",TEMPLATE_DIRS filename = self.theme + '_' + self.template_name - print any(os.path.exists(os.path.join(d,filename)) for d in TEMPLATE_DIRS) - print (os.path.exists(os.path.join(d,filename)) for d in TEMPLATE_DIRS) + #print any(os.path.exists(os.path.join(d,filename)) for d in TEMPLATE_DIRS) + #print (os.path.exists(os.path.join(d,filename)) for d in TEMPLATE_DIRS) if any(os.path.exists(os.path.join(d,filename)) for d in TEMPLATE_DIRS): return filename else: