]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/modules/ui.py
now superusers and staff can unsubscribe users subscription.
[osqa.git] / forum / modules / ui.py
index e21527f9ecb890ff6b19807d9ffcda561e364b9c..48c0246efc6d67dafd055d75fe5ab1027093a8d8 100644 (file)
@@ -1,26 +1,32 @@
 
 
 class Registry(list):
-    def add(self, register):
+    def add(self, item):
         for i, r in enumerate(self):
-            if r.weight > register.weight:
-                self.insert(i, register)
+            if r.weight > item.weight:
+                self.insert(i, item)
                 return
 
-        self.append(register)
+        self.append(item)
 
 
+HEAD_CONTENT = 'HEAD_CONTENT'
 HEADER_LINKS = 'HEADER_LINKS'
 PAGE_TOP_TABS = 'PAGE_TOP_TABS'
 FOOTER_LINKS = 'FOOTER_LINKS'
 PROFILE_TABS = 'PROFILE_TABS'
 
+USER_MENU = 'USER_MENU'
+
 
 __CONTAINER = {
+    HEAD_CONTENT: Registry(),
     HEADER_LINKS: Registry(),
     PAGE_TOP_TABS: Registry(),
     FOOTER_LINKS: Registry(),
     PROFILE_TABS: Registry(),
+
+    USER_MENU: Registry(),
 }