~ubuntu-branches/ubuntu/precise/moin/precise-updates

« back to all changes in this revision

Viewing changes to MoinMoin/macro/WikiConfigHelp.py

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2010-08-11 12:35:34 UTC
  • mfrom: (0.1.19 sid)
  • Revision ID: james.westby@ubuntu.com-20100811123534-q8zu7qrwqul6cvec
Tags: 1.9.3-1ubuntu1
* Merge from Debian unstable (LP: #586518). Based on work by Stefan Ebner.
  Remaining changes:
 - Remove python-xml from Suggests field, the package isn't anymore in
   sys.path.
 - Demote fckeditor from Recommends to Suggests; the code was previously
   embedded in moin, but it was also disabled, so there's no reason 
   for us to pull this in by default currently. Note: fckeditor has a
   number of security problems and so this change probably needs to be
   carried indefinitely.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
Dependencies = ['user'] # table headings are translated to user language
8
8
generates_headings = True
9
9
 
10
 
def macro_WikiConfigHelp(macro, section=None):
 
10
def macro_WikiConfigHelp(macro, section=None, show_heading=True, show_descriptions=True, heading_level=2):
11
11
    request = macro.request
12
12
    _ = request.getText
13
13
    f = macro.request.formatter
25
25
 
26
26
    for groupname, addgroup, optsdict in groups:
27
27
        heading, desc, opts = optsdict[groupname]
28
 
        ret.extend([
29
 
            f.heading(1, 1, id=groupname),
30
 
            ## XXX: translate description?
31
 
            f.text(heading),
32
 
            f.heading(0, 1),
33
 
        ])
34
 
        if desc:
 
28
        if show_heading:
 
29
            ret.extend([
 
30
                f.heading(1, heading_level, id=groupname),
 
31
                ## XXX: translate description?
 
32
                f.text(heading),
 
33
                f.heading(0, heading_level),
 
34
            ])
 
35
 
 
36
        if desc and show_descriptions:
35
37
            ret.extend([
36
38
                f.paragraph(1),
37
39
                f.text(desc),