# Path: IMainModule.py
# class MenuEntry(object):
#     name = "N/A"
#     icon = None
#     link = "#"
#     content = []
#     def __init__(self, name, link, icon=None, content=None ):
#         self.name = name
#         self.icon = icon
#         self.link = link
#         if content == None:
#             self.content = []
#         else:
#             self.content = content
#         
#     #Overload me
#     def get_menuentry_list(self,store):
#         return []
# 
# class IMainModule(object):
#     def __init__(self, params):
#         '''
#         Constructor
#         '''


from IMainModule import MenuEntry, IMainModule
import cherrypy
                            "url": "/timeline", "icon": "fa-clock-o" },
        CATALOG_COMMS : { "name": "Communications", "display":True, 
                         "url": "/comms", "icon":"fa-comments-o" }
    }
    
    def __init__(self, lookup, case, settings):
        '@type lookup: mako.lookup.TemplateLookup'
        self.lookup = lookup
        self.case = case
        self.settings = settings
        return
    
    
    def set_templatelookup(self, lookup):
        '@type lookup: mako.lookup.TemplateLookup'
        self.lookup = lookup
        
    def get_menuentry_list(self, store, case_id):
        menu = []
        for cat_id, catalog in self.catalogs_info.iteritems():
            if catalog['display'] == False: continue
            store_catalog = store.get_misccatalog(cat_id)
            if len(store_catalog.sections) != 0:
                entry = MenuEntry(catalog['name'], "#", catalog['icon'] )
                for section in store_catalog.sections.values():
                    child = MenuEntry( section.section_label, catalog['url'] + 
                                       '/' + str(case_id) + '/' +
                                       section.section_name )
                    entry.content.append(child)
            else:

# Path: IMainModule.py
# class MenuEntry(object):
#     name = "N/A"
#     icon = None
#     link = "#"
#     content = []
#     def __init__(self, name, link, icon=None, content=None ):
#         self.name = name
#         self.icon = icon
#         self.link = link
#         if content == None:
#             self.content = []
#         else:
#             self.content = content
#         
#     #Overload me
#     def get_menuentry_list(self,store):
#         return []
# 
# class IMainModule(object):
#     def __init__(self, params):
#         '''
#         Constructor
#         '''


# Path: Catalog.py
from IMainModule import MenuEntry, IMainModule
import cherrypy

                            "url": "/timeline", "icon": "fa-clock-o" },
        CATALOG_COMMS : { "name": "Communications", "display":True, 
                         "url": "/comms", "icon":"fa-comments-o" }
    }
    
    def __init__(self, lookup, case, settings):
        '@type lookup: mako.lookup.TemplateLookup'
        self.lookup = lookup
        self.case = case
        self.settings = settings
        return
    
    
    def set_templatelookup(self, lookup):
        '@type lookup: mako.lookup.TemplateLookup'
        self.lookup = lookup
        
    def get_menuentry_list(self, store, case_id):
        menu = []
        for cat_id, catalog in self.catalogs_info.iteritems():
            if catalog['display'] == False: continue
            store_catalog = store.get_misccatalog(cat_id)
            if len(store_catalog.sections) != 0:
                entry = MenuEntry(catalog['name'], "#", catalog['icon'] )
                for section in store_catalog.sections.values():
                    child = MenuEntry( section.section_label, catalog['url'] + 
                                       '/' + str(case_id) + '/' +
                                       section.section_name )
                    entry.content.append(child)
            else:

                entry = MenuEntry(catalog['name'], 