X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/d2410575d72f68d7777c4344600b1af75f2515c1..60cf509da831a2e81e2631ffc1150f81ed96fe4c:/forum/modules/ui.py diff --git a/forum/modules/ui.py b/forum/modules/ui.py index 5cfcac4..49ce249 100644 --- a/forum/modules/ui.py +++ b/forum/modules/ui.py @@ -9,29 +9,29 @@ class Registry(list): self.append(register) -"""Links next in the very top of the page""" -HEADER_LINKS = 'HEADER_LINKS' -"""The tabs next to the top of the page""" +HEAD_CONTENT = 'HEAD_CONTENT' +HEADER_LINKS = 'HEADER_LINKS' PAGE_TOP_TABS = 'PAGE_TOP_TABS' +FOOTER_LINKS = 'FOOTER_LINKS' +PROFILE_TABS = 'PROFILE_TABS' __CONTAINER = { + HEAD_CONTENT: Registry(), HEADER_LINKS: Registry(), - PAGE_TOP_TABS: Registry() + PAGE_TOP_TABS: Registry(), + FOOTER_LINKS: Registry(), + PROFILE_TABS: Registry(), } -def register(registry, ui_object): +def register(registry, *ui_objects): if not registry in __CONTAINER: raise('unknown registry') - __CONTAINER[registry].add(ui_object) - -def register_multi(registry, *ui_objects): for ui_object in ui_objects: - register(registry, ui_object) - + __CONTAINER[registry].add(ui_object) def get_registry_by_name(name): name = name.upper()