[Mpuls-commits] r2523 - wasko/branches/2.0/mpulsweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Apr 26 15:47:23 CEST 2010
Author: torsten
Date: 2010-04-26 15:47:23 +0200 (Mon, 26 Apr 2010)
New Revision: 2523
Modified:
wasko/branches/2.0/mpulsweb/lib/helpers.py
Log:
* mpulsweb/lib/helpers.py (get_export_selector): New helper function
whoch returns a rendered html list element containing all pages of the
meta formedtree
Modified: wasko/branches/2.0/mpulsweb/lib/helpers.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/helpers.py 2010-04-26 13:46:34 UTC (rev 2522)
+++ wasko/branches/2.0/mpulsweb/lib/helpers.py 2010-04-26 13:47:23 UTC (rev 2523)
@@ -44,6 +44,8 @@
from webhelpers.html import escape, HTML, literal, url_escape
from webhelpers.html.tags import *
+from formed.meta.data import PageNode
+
from mpulsweb.lib.security import hasRole, getKAName
from mpulsweb.lib.navigation import get_pagename, render_navigation
@@ -97,6 +99,18 @@
def get_app_title():
return config.get('mpuls.app.title')
+def get_export_selector():
+ out = []
+ out.append('<ul>')
+ for i in g.formedTree.findAllByClass(PageNode):
+ if i.getName() == 'ee': continue
+ out.append('<li>')
+ out.append('<input type="checkbox" name="exportselection" value="%s" id="%s">' % (i.getName(), i.getName()))
+ out.append(' <label for="%s">%s</label>' % (i.getName(), i.getDescription()))
+ out.append('</li>')
+ out.append('</ul>')
+ return "".join(out)
+
# Helper functions to get some information about the logged in user
def getRole():
More information about the Mpuls-commits
mailing list