[wiki/macro] On n'affiche pas les acl vides ni les pages moinmoin
This commit is contained in:
parent
a3715746cf
commit
4f3c2120e0
1 changed files with 11 additions and 3 deletions
|
@ -7,6 +7,12 @@
|
|||
|
||||
changes:
|
||||
12.2007 - conversion to new syntax by Bolesław Kulbabiński
|
||||
|
||||
Modifié par Vincent Le Galli <legallic@crans.org>
|
||||
(cf http://moinmo.in/MacroMarket/1.6_AdminTools)
|
||||
* patch pour ne pas afficher les acl "not defined"
|
||||
* Si on fournit le paramètre IncludeSystemPages, on a aussi les pages MoinMoin,
|
||||
mais par défaut, non.
|
||||
"""
|
||||
|
||||
import os
|
||||
|
@ -31,13 +37,15 @@ def macro_AllPagesWithACL(macro, args):
|
|||
html += "Total: %s pages </p>" % str(len(pages))
|
||||
|
||||
for pagename in pages:
|
||||
all[Page(macro.request, pagename).link_to(macro.request)] = getAcl(macro.request, pagename)
|
||||
if Page(macro.request,pagename).isStandardPage() or (args != None and "IncludeSystemPages" in args):
|
||||
all[Page(macro.request, pagename).link_to(macro.request)] = getAcl(macro.request, pagename)
|
||||
|
||||
html += "<table>"
|
||||
all1 = sorted(all.items())
|
||||
for pg, ac in all1:
|
||||
html += "<tr><td>%s</td>" % pg
|
||||
html += "<td>%s</td></tr>" % ac
|
||||
if ac != "not defined":
|
||||
html += "<tr><td>%s</td>" % pg
|
||||
html += "<td>%s</td></tr>" % ac
|
||||
html += "</table>"
|
||||
|
||||
return macro.formatter.rawHTML(html)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue