@license: GNU GPL, see COPYING for details.
"""
-from MoinMoin.theme import ThemeBase
+from site import SiteTheme
-class Theme(ThemeBase):
+class Theme(SiteTheme):
name = "exodus"
- def editbar(self, d):
- if self.request.user.valid:
- return ThemeBase.editbar(self, d)
- else:
- return ''
-
- def searchform(self, d):
- if self.request.user.valid:
- return ThemeBase.searchform(self, d)
- else:
- return ''
-
- def header(self, d, **kw):
- """ Assemble wiki header
-
- @param d: parameter dictionary
- @rtype: unicode
- @return: page header html
- """
- html = [
- # Pre header custom html
- self.emit_custom_html(self.cfg.page_header1),
-
- # Header
- u'<div id="header">',
- #self.logo(),
- self.searchform(d),
- #self.username(d),
- u'<div id="locationline">',
- #self.interwiki(d),
- self.title(d),
- u'</div>',
- self.trail(d),
- #self.navibar(d),
- #u'<hr id="pageline">',
- #u'<div id="pageline"><hr style="display:none;"></div>',
- self.msg(d),
- self.editbar(d),
- u'</div>',
-
- # Post header custom html (not recommended)
- self.emit_custom_html(self.cfg.page_header2),
-
- # Start of page
- self.startPage(),
- ]
- return u'\n'.join(html)
-
- def editorheader(self, d, **kw):
- """ Assemble wiki header for editor
-
- @param d: parameter dictionary
- @rtype: unicode
- @return: page header html
- """
- html = [
- # Pre header custom html
- self.emit_custom_html(self.cfg.page_header1),
-
- # Header
- u'<div id="header">',
- self.title(d),
- self.msg(d),
- u'</div>',
-
- # Post header custom html (not recommended)
- self.emit_custom_html(self.cfg.page_header2),
-
- # Start of page
- self.startPage(),
- ]
- return u'\n'.join(html)
-
- def footer(self, d, **keywords):
- """ Assemble wiki footer
-
- @param d: parameter dictionary
- @keyword ...:...
- @rtype: unicode
- @return: page footer html
- """
- page = d['page']
- html = [
- # End of page
- self.pageinfo(page),
- self.endPage(),
-
- # Pre footer custom html (not recommended!)
- self.emit_custom_html(self.cfg.page_footer1),
-
- # Footer
- u'<div id="footer">',
- self.username(d),
- #self.editbar(d),
- #self.credits(d),
- #self.showversion(d, **keywords),
- u'</div>',
-
- # Post footer custom html
- self.emit_custom_html(self.cfg.page_footer2),
- ]
- return u'\n'.join(html)
-
-
def execute(request):
"""
Generate and return a theme object
@return: Theme object
"""
return Theme(request)
-
--- /dev/null
+# -*- coding: iso-8859-1 -*-
+"""
+ Evolution Events, website theme
+
+ This theme is meant for wiki's that are meant to function as a website,
+ meaning nothing fancy and wiki-ish (at least when you're not logged in).
+
+ This theme is meant to be subclassed. Subclasses should at least define a
+ name, and possibly override other stuff.
+"""
+
+from MoinMoin.theme import ThemeBase
+
+class SiteTheme(ThemeBase):
+
+ def editbar(self, d):
+ if self.request.user.valid:
+ return ThemeBase.editbar(self, d)
+ else:
+ return ''
+
+ def searchform(self, d):
+ if self.request.user.valid:
+ return ThemeBase.searchform(self, d)
+ else:
+ return ''
+
+ def header(self, d, **kw):
+ """ Assemble wiki header
+
+ @param d: parameter dictionary
+ @rtype: unicode
+ @return: page header html
+ """
+ html = [
+ # Pre header custom html
+ self.emit_custom_html(self.cfg.page_header1),
+
+ # Header
+ u'<div id="header">',
+ #self.logo(),
+ self.searchform(d),
+ #self.username(d),
+ u'<div id="locationline">',
+ #self.interwiki(d),
+ self.title(d),
+ u'</div>',
+ self.trail(d),
+ #self.navibar(d),
+ #u'<hr id="pageline">',
+ #u'<div id="pageline"><hr style="display:none;"></div>',
+ self.msg(d),
+ self.editbar(d),
+ u'</div>',
+
+ # Post header custom html (not recommended)
+ self.emit_custom_html(self.cfg.page_header2),
+
+ # Start of page
+ self.startPage(),
+ ]
+ return u'\n'.join(html)
+
+ def editorheader(self, d, **kw):
+ """ Assemble wiki header for editor
+
+ @param d: parameter dictionary
+ @rtype: unicode
+ @return: page header html
+ """
+ html = [
+ # Pre header custom html
+ self.emit_custom_html(self.cfg.page_header1),
+
+ # Header
+ u'<div id="header">',
+ self.title(d),
+ self.msg(d),
+ u'</div>',
+
+ # Post header custom html (not recommended)
+ self.emit_custom_html(self.cfg.page_header2),
+
+ # Start of page
+ self.startPage(),
+ ]
+ return u'\n'.join(html)
+
+ def footer(self, d, **keywords):
+ """ Assemble wiki footer
+
+ @param d: parameter dictionary
+ @keyword ...:...
+ @rtype: unicode
+ @return: page footer html
+ """
+ page = d['page']
+ html = [
+ # End of page
+ self.pageinfo(page),
+ self.endPage(),
+
+ # Pre footer custom html (not recommended!)
+ self.emit_custom_html(self.cfg.page_footer1),
+
+ # Footer
+ u'<div id="footer">',
+ self.username(d),
+ #self.editbar(d),
+ #self.credits(d),
+ #self.showversion(d, **keywords),
+ u'</div>',
+
+ # Post footer custom html
+ self.emit_custom_html(self.cfg.page_footer2),
+ ]
+ return u'\n'.join(html)
+
+
+def execute(request):
+ """
+ Generate and return a theme object
+
+ @param request: the request object
+ @rtype: MoinTheme
+ @return: Theme object
+ """
+ return Theme(request)
+