changeset 12:e7733b6ba343

template for the levels in overview now needed.
author dwinter
date Fri, 13 Jan 2012 09:14:38 +0100
parents 31eeabf29edc
children 51ed6ad43383
files MPIWGThesaurus.py
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MPIWGThesaurus.py	Fri Jan 06 14:24:00 2012 +0100
+++ b/MPIWGThesaurus.py	Fri Jan 13 09:14:38 2012 +0100
@@ -477,6 +477,13 @@
     def getTitle(self,entry):
         return entry.title
     
+    def getEntriesFormatted(self,entries,type):
+        errorString="<H1>template with name <em>levelFormatted</em> does not exist in the thesaurus folder!"
+        if not hasattr(self,'levelFormatted'):
+            return errorString
+        
+        return self.levelFormatted(level1_entries=entries,type=type)
+        
     def getEntries(self,entry):
         return entry.entries
     
@@ -1056,6 +1063,14 @@
             ret[HistoricalPlace]=list[0:]
         return ret
     
+    def getObjectsWithProjectIDsSortedkeys(self):
+        
+        def sortF(x,y):
+            return cmp(x.lower(),y.lower())
+        keys = [x for x in self.getObjectsWithProjectIDs().keys()]
+        keys.sort(sortF)
+        return keys
+    
     def getObjectsWithProjectIDs(self):
         """holt die getaggted Personen mit Projekten"""
         objects = self.objects2Projects;