[Mpuls-commits] r875 - wasko/branches/2.0/waskaweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Jan 26 12:49:28 CET 2010


Author: torsten
Date: 2010-01-26 12:49:27 +0100 (Tue, 26 Jan 2010)
New Revision: 875

Modified:
   wasko/branches/2.0/waskaweb/lib/helpers.py
Log:
* waskaweb/lib/helpers.py (getFormularName): Call get_pagename from
	lib.navigation now.


Modified: wasko/branches/2.0/waskaweb/lib/helpers.py
===================================================================
--- wasko/branches/2.0/waskaweb/lib/helpers.py	2010-01-26 11:48:37 UTC (rev 874)
+++ wasko/branches/2.0/waskaweb/lib/helpers.py	2010-01-26 11:49:27 UTC (rev 875)
@@ -43,6 +43,7 @@
 from webhelpers import *
 
 from waskaweb.lib.filecache import FileCache
+from waskaweb.lib.navigation import get_pagename 
 
 
 PRINTABLE = frozenset(printable)
@@ -256,22 +257,6 @@
 
     return " ".join(out)
 
-
-def hasErrorsOnPage(page_id):
-    case = session.get('case')
-    navigation = session.get('navigation.tree')
-    if not navigation or not case:
-        return False
-    errors = case.getFormErrors()
-    tree_item = navigation.getTreeItem(page_id)
-    if not tree_item:
-        return False
-    name = tree_item.name
-    for error in errors.itervalues():
-        if error.page == name:
-            return True
-    return False
-
 def getHelp(help_id):
     '''
     Returns a HTML link with a help icon if help is present for help_id. Else
@@ -287,12 +272,7 @@
 
 
 def getFormularName(page_id):
-    navigation = session.get('navigation.tree')
-    try:
-        ti = navigation.getTreeItem(page_id)
-        return "Akte: %s" % ti.description
-    except:
-        pass
+    return get_pagename(page_id)
 
 def getErrorsAndWarningsOnPage(page_id, warnings=None):
     out = "Errors"



More information about the Mpuls-commits mailing list