示例#1
0
 def _theme_select(self):
     """
     Create theme selection.
     """
     cur_theme = self.request.config.theme_default
     options = []
     for theme in wikiutil.getPlugins('theme'):
         options.append((theme, theme))
             
     return util.web.makeSelection('theme_name', options, cur_theme)
示例#2
0
from Sycamore import i18n
from Sycamore.Page import Page
from Sycamore.util import pysupport

#############################################################################
### Globals
#############################################################################

names = [ "titleindex", "pagecount", "userpreferences", "generalsettings",
          "securitysettings", "usergroups",
          # Macros with arguments
          "icon", "anchor", "mailto", "getval", "search", "listtemplates",
]

# external macros
names.extend(wikiutil.getPlugins('macro'))

# languages
names.extend(i18n.languages.keys())

#############################################################################
### Helpers
#############################################################################

def _make_index_key(index_letters, additional_html=""):
    links = map(lambda ch:
                    '<a href="#%s">%s</a>' %
                    (wikiutil.quoteWikiname(ch), ch.replace('~', 'Others')),
                index_letters)
    return "<p>%s%s</p>" % (' | '.join(links), additional_html)