Esempio n. 1
0
#    try:
#        if document.exists():
#            return u'<span class="famfam active famfam-tick"></span>'
#        else:
#            return u'<span class="famfam active famfam-cross"></span>'
#    except Exception, exc:
#        return exc

register_model_list_columns(Document, [
    {
        'name': _(u'thumbnail'),
        'attribute': encapsulate(lambda x: document_thumbnail(x))
    },
    {
        'name': _(u'tags'),
        'attribute': encapsulate(lambda x: get_tags_inline_widget_simple(x))
    },
    {
        'name': _(u'metadata'),
        'attribute': encapsulate(lambda x: get_metadata_string(x))
    },
])

register_top_menu(
    'documents',
    link={
        'famfam': 'page',
        'text': _(u'documents'),
        'view': 'document_list_recent'
    },
    children_path_regex=[
Esempio n. 2
0
def document_exists(document):
    try:
        if document.exists():
            return u'<span class="famfam active famfam-tick"></span>'
        else:
            return u'<span class="famfam active famfam-cross"></span>'
    except Exception, exc:
        return exc

register_model_list_columns(Document, [
        {'name':_(u'thumbnail'), 'attribute':
            lambda x: document_thumbnail(x)
        },
        {'name':_(u'tags'), 'attribute':
            lambda x: get_tags_inline_widget_simple(x)
        },
        {'name':_(u'metadata'), 'attribute':
            lambda x: get_metadata_string(x)
        },
    ])

register_top_menu(
    'documents', 
    link={'famfam': 'page', 'text': _(u'documents'), 'view': 'document_list_recent'}, 
    children_path_regex=[
        r'^documents/[^t]', r'^metadata/[^s]', r'comments', r'tags/document', r'grouping/[^s]', r'history/list/for_object/documents'
    ],
    position=0
)
Esempio n. 3
0
)

# def document_exists(document):
#    try:
#        if document.exists():
#            return u'<span class="famfam active famfam-tick"></span>'
#        else:
#            return u'<span class="famfam active famfam-cross"></span>'
#    except Exception, exc:
#        return exc

register_model_list_columns(
    Document,
    [
        {"name": _(u"thumbnail"), "attribute": encapsulate(lambda x: document_thumbnail(x))},
        {"name": _(u"tags"), "attribute": encapsulate(lambda x: get_tags_inline_widget_simple(x))},
        {"name": _(u"metadata"), "attribute": encapsulate(lambda x: get_metadata_string(x))},
    ],
)

register_top_menu(
    "documents",
    link={"famfam": "page", "text": _(u"documents"), "view": "document_list_recent"},
    children_path_regex=[
        r"^documents/[^t]",
        r"^metadata/[^s]",
        r"comments",
        r"tags/document",
        r"grouping/[^s]",
        r"history/list/for_object/documents",
    ],