Beispiel #1
0
class ActionView(ModelView):
    page_size = 200
    show_popover = True
    column_default_sort = ('module', 'sort')
    column_labels = dict(modified='修改',
                         created='创建',
                         android='安卓版本',
                         ios='IOS版本')
    column_searchable_list = ('key', 'name')
    column_filters = ('id', 'name', 'module', 'login', 'sort', 'enable',
                      'modified', 'created')
    column_list = ('icon', 'key', 'name', 'target', 'share', 'module',
                   'android', 'ios', 'login', 'login_show', 'debug', 'sort',
                   'enable', 'modified', 'created')
    column_center_list = ('icon', 'module', 'sort', 'enable', 'login', 'share',
                          'modified', 'created', 'login_show', 'debug',
                          'android', 'ios')
    column_hidden_list = ('debug', 'android', 'ios', 'login_show', 'target')
    column_formatters = dict(
        # icon=formatter_icon(lambda m: (m.icon.get_link(height=40), m.icon.link)),
        name=formatter_text(lambda m: (m.name, m.data, 'text-success'
                                       if m.data else ''),
                            max_len=7),
        icon=formatter_A,
        share=formatter_share,
        android=format_android,
        ios=format_ios,
    )
    html = """
Beispiel #2
0
class ShareLogView(ModelView):
    column_default_sort = ('created', True)
    column_list = ('image', 'user', 'title', 'link', 'status', 'media',
                   'created')
    column_center_list = ('created', 'user', 'status', 'media', 'image')
    column_searchable_list = ('title', 'desc', 'link', 'image')
    column_filters = ('user', 'title', 'desc', 'link', 'image', 'created')
    column_formatters = dict(
        image=formatter_icon(lambda m: m.image),
        title=formatter_text(lambda m: (m.title, m.desc, 'text-success'
                                        if m.desc else '')),
    )
Beispiel #3
0
class ActionItemView(ModelView):

    column_default_sort = ('created', True)
    column_filters = ('name', 'key', 'module', 'action', 'url', 'login',
                      'sort', 'enable', 'modified', 'created')
    column_center_list = ('icon', 'module', 'sort', 'enable', 'modified',
                          'created')
    column_formatters = dict(
        icon=formatter_icon(lambda m:
                            (m.icon.get_link(height=40), m.icon.link)),
        name=formatter_text(lambda m: (m.name, m.name), max_len=7),
    )
Beispiel #4
0
class ActionView(ModelView):
    show_popover = True
    column_default_sort = ('module', 'sort')
    column_labels = dict(modified='修改', created='创建')
    column_filters = ('id', 'name', 'module', 'login', 'sort', 'enable',
                      'modified', 'created')
    column_list = ('icon', 'key', 'name', 'target', 'module', 'login',
                   'login_show', 'debug', 'sort', 'enable', 'modified',
                   'created')
    column_center_list = ('icon', 'module', 'sort', 'enable', 'login',
                          'modified', 'created', 'login_show', 'debug')
    column_formatters = dict(
        # icon=formatter_icon(lambda m: (m.icon.get_link(height=40), m.icon.link)),
        name=formatter_text(lambda m: (m.name, m.data, 'text-success'
                                       if m.data else ''),
                            max_len=7),
        icon=formatter_A,
    )
    html = """