Esempio n. 1
0
    def update(self):
        types = []
        for ti in cms.get_types().values():
            types.append((ti.title, ti))

        types.sort()
        self.types = [f for _t, f in types]
Esempio n. 2
0
    def update(self):
        cfg = ptah.get_settings(ptah.CFG_ID_PTAH, self.request.registry)

        types = []
        for ti in cms.get_types().values():
            if ti.__uri__ in cfg['disable_models']:
                continue
            types.append((ti.title, ti))

        self.types = [f for _t, f in sorted(types)]
Esempio n. 3
0
 def renderActions(self, *actions):
     return self.actions(
         types = cms.get_types(),
         actions = actions,
         rst_to_html = ptah.rst_to_html,
         request = self.request)
Esempio n. 4
0
 def available(self):
     return bool(cms.get_types())