Пример #1
0
    def addable_block_types(self):
        """
        Returns a list of dotted fti ids.

        Example: ['ftw.simplelayout.TextBlock']
        """
        return [block_type.id for block_type in utils.get_block_types()]
def hide_blocks_in_factory_menu(context, request):

    selectors = []

    for block_fti in get_block_types():
        selectors.append(
            u'.contenttype-{0}'.format(
                normalize_portal_type(block_fti.getId())))

    cachekey = hashlib.md5(''.join(selectors)).hexdigest()

    if len(selectors):
        source = TEMPLATE.format(', '.join(selectors))
    else:
        source = ''

    return DynamicSCSSResource('simplelayout_hide_blocks.scss',
                               slot='addon',
                               source=source,
                               cachekey=cachekey)