# -*- coding: iso-8859-1 -*- """ MoinMoin - moniker_cms theme (based entirely on modernized_cms) @copyright: 2009 MoinMoin:ThomasWaldmann @license: GNU GPL, see COPYING for details. """ from moniker19 import Theme as ThemeBase class Theme(ThemeBase): name = "moniker" # we tell that we are 'moniker', so we use its static data def onlyloggedin(method): """ decorator that returns empty string for not logged-in users, otherwise it calls the decorated method """ return lambda self, *args, **kwargs: ( self.request.user.valid and self.request.user.name and method(self, *args, **kwargs) or '' ) # Rick: Borrowing code from Roger Haase's FixedLeft theme so that the searchbox buttons will wrap: def searchpanel(self,d): """Create search panel. @param d: parameter dictionary @rtype: unicode @return: formatted search panel """ _ = self.request.getText html = [ u'