当前位置: 首页>>代码示例>>Python>>正文


Python api.register_links函数代码示例

本文整理汇总了Python中navigation.api.register_links函数的典型用法代码示例。如果您正苦于以下问题:Python register_links函数的具体用法?Python register_links怎么用?Python register_links使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了register_links函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _

document_queue_disable = {'text': _(u'stop queue'), 'view': 'document_queue_disable', 'args': 'queue.id', 'famfam': 'control_stop_blue', 'permissions': [PERMISSION_OCR_QUEUE_ENABLE_DISABLE]}
document_queue_enable = {'text': _(u'activate queue'), 'view': 'document_queue_enable', 'args': 'queue.id', 'famfam': 'control_play_blue', 'permissions': [PERMISSION_OCR_QUEUE_ENABLE_DISABLE]}

all_document_ocr_cleanup = {'text': _(u'clean up pages content'), 'view': 'all_document_ocr_cleanup', 'famfam': 'text_strikethrough', 'permissions': [PERMISSION_OCR_CLEAN_ALL_PAGES], 'description': _(u'Runs a language filter to remove common OCR mistakes from document pages content.')}

queue_document_list = {'text': _(u'queue document list'), 'view': 'queue_document_list', 'famfam': 'hourglass', 'permissions': [PERMISSION_OCR_DOCUMENT]}
ocr_tool_link = {'text': _(u'OCR'), 'view': 'queue_document_list', 'famfam': 'hourglass', 'icon': 'text.png', 'permissions': [PERMISSION_OCR_DOCUMENT]}

node_active_list = {'text': _(u'active tasks'), 'view': 'node_active_list', 'famfam': 'server_chart', 'permissions': [PERMISSION_OCR_DOCUMENT]}

setup_queue_transformation_list = {'text': _(u'transformations'), 'view': 'setup_queue_transformation_list', 'args': 'queue.pk', 'famfam': 'shape_move_front'}
setup_queue_transformation_create = {'text': _(u'add transformation'), 'view': 'setup_queue_transformation_create', 'args': 'queue.pk', 'famfam': 'shape_square_add'}
setup_queue_transformation_edit = {'text': _(u'edit'), 'view': 'setup_queue_transformation_edit', 'args': 'transformation.pk', 'famfam': 'shape_square_edit'}
setup_queue_transformation_delete = {'text': _(u'delete'), 'view': 'setup_queue_transformation_delete', 'args': 'transformation.pk', 'famfam': 'shape_square_delete'}

register_links(Document, [submit_document])
register_links(DocumentQueue, [document_queue_disable, document_queue_enable, setup_queue_transformation_list])
register_links(QueueTransformation, [setup_queue_transformation_edit, setup_queue_transformation_delete])

register_multi_item_links(['queue_document_list'], [re_queue_multiple_document, queue_document_multiple_delete])

register_links(['setup_queue_transformation_create', 'setup_queue_transformation_edit', 'setup_queue_transformation_delete', 'document_queue_disable', 'document_queue_enable', 'queue_document_list', 'node_active_list', 'setup_queue_transformation_list'], [queue_document_list, node_active_list], menu_name='secondary_menu')
register_links(['setup_queue_transformation_edit', 'setup_queue_transformation_delete', 'setup_queue_transformation_list', 'setup_queue_transformation_create'], [setup_queue_transformation_create], menu_name='sidebar')

register_maintenance(all_document_ocr_cleanup, namespace='ocr', title=_(u'OCR'))


@transaction.commit_manually
def create_default_queue():
    try:
        default_queue, created = DocumentQueue.objects.get_or_create(name='default')
开发者ID:IHLeanne,项目名称:mayan,代码行数:31,代码来源:__init__.py

示例2: import

from .conf.settings import (AUTO_CREATE_ADMIN, AUTO_ADMIN_USERNAME,
    AUTO_ADMIN_PASSWORD, TEMPORARY_DIRECTORY)
from .conf import settings as common_settings
from .utils import validate_path
from .models import AutoAdminSingleton


def has_usable_password(context):
    return context['request'].user.has_usable_password

password_change_view = {'text': _(u'change password'), 'view': 'password_change_view', 'famfam': 'computer_key', 'condition': has_usable_password}
current_user_details = {'text': _(u'user details'), 'view': 'current_user_details', 'famfam': 'vcard'}
current_user_edit = {'text': _(u'edit details'), 'view': 'current_user_edit', 'famfam': 'vcard_edit'}

register_links(['current_user_details', 'current_user_edit', 'password_change_view'], [current_user_details, current_user_edit, password_change_view], menu_name='secondary_menu')

about_view = {'text': _('about'), 'view': 'about_view', 'famfam': 'information'}
license_view = {'text': _('license'), 'view': 'license_view', 'famfam': 'script'}

register_links(['about_view', 'license_view'], [about_view, license_view], menu_name='secondary_menu')

register_top_menu('about', link={'text': _(u'about'), 'view': 'about_view', 'famfam': 'information'}, position=-1)


@receiver(post_migrate, dispatch_uid='create_superuser')
def create_superuser(sender, **kwargs):
    """
    From https://github.com/lambdalisue/django-qwert/blob/master/qwert/autoscript/__init__.py
    From http://stackoverflow.com/questions/1466827/ --
开发者ID:AmiGanguli,项目名称:mayan,代码行数:29,代码来源:__init__.py

示例3: StringIO

        except GPGDecryptionError:
            # At least return the original raw content
            descriptor.seek(0)
            return descriptor
        else:
            descriptor.close()
            return StringIO(result.data)
    else:
        return descriptor


def document_post_save_hook(instance):
    if not instance.pk:
        document_signature, created = DocumentVersionSignature.objects.get_or_create(
            document_version=instance.latest_version,
        )


register_links(Document, [document_verify], menu_name='form_header')
register_links(['signatures:document_verify', 'signatures:document_signature_upload', 'signatures:document_signature_download', 'signatures:document_signature_delete'], [document_signature_upload, document_signature_download, document_signature_delete], menu_name='sidebar')

DocumentVersion.register_pre_open_hook(1, document_pre_open_hook)
DocumentVersion.register_post_save_hook(1, document_post_save_hook)

class_permissions(Document, [
    PERMISSION_DOCUMENT_VERIFY,
    PERMISSION_SIGNATURE_DELETE,
    PERMISSION_SIGNATURE_DOWNLOAD,
    PERMISSION_SIGNATURE_UPLOAD,
])
开发者ID:BangorUniversity,项目名称:mayan-edms,代码行数:30,代码来源:__init__.py

示例4: _

from menu_manager.models import MenuEntry

#PERMISSION_USER_CREATE = {'namespace': 'user_management', 'name': 'user_create', 'label': _(u'Create new users')}
#PERMISSION_USER_EDIT = {'namespace': 'user_management', 'name': 'user_edit', 'label': _(u'Edit existing users')}
#PERMISSION_USER_VIEW = {'namespace': 'user_management', 'name': 'user_view', 'label': _(u'View existing users')}
#PERMISSION_USER_DELETE = {'namespace': 'user_management', 'name': 'user_delete', 'label': _(u'Delete existing users')}

#set_namespace_title('user_management', _(u'User management'))
#register_permission(PERMISSION_USER_CREATE)
#register_permission(PERMISSION_USER_EDIT)
#register_permission(PERMISSION_USER_VIEW)
#register_permission(PERMISSION_USER_DELETE)

menu_list = {'text': _(u'root menu list'), 'view': 'menu_list', 'famfam': 'tab_go'}#, 'permissions': [PERMISSION_USER_VIEW]}
menu_add = {'text': _(u'new root menu'), 'view': 'menu_add', 'famfam': 'tab_add'}#, 'permissions': [PERMISSION_USER_CREATE]}
menu_edit = {'text': _(u'edit'), 'view': 'menu_edit', 'args': 'object.id', 'famfam': 'tab_edit'}#, 'permissions': [PERMISSION_USER_EDIT]}
menu_delete = {u'text': _('delete'), 'view': 'menu_delete', 'args': 'object.id', 'famfam': 'tab_delete'}#, 'permissions': [PERMISSION_USER_DELETE]}
menu_multiple_delete = {u'text': _('delete'), 'view': 'menu_multiple_delete', 'famfam': 'tab_delete'}#, 'permissions': [PERMISSION_USER_DELETE]}
menu_add_child = {'text': _(u'new menu entry'), 'view': 'menu_add_child', 'args': 'object.id', 'famfam': 'tab_add'}#, 'permissions': [PERMISSION_USER_CREATE]}
menu_setup = {'text': _(u'menus'), 'view': 'menu_list', 'icon': 'menu.png'}#, 'permissions': [PERMISSION_USER_VIEW]}
menu_promote = {'text': _(u'up'), 'view': 'menu_promote', 'args': 'object.id', 'famfam': 'arrow_up'}#, 'permissions': [PERMISSION_USER_CREATE]}
menu_demote = {'text': _(u'down'), 'view': 'menu_demote', 'args': 'object.id', 'famfam': 'arrow_down'}#, 'permissions': [PERMISSION_USER_CREATE]}

register_links(MenuEntry, [menu_edit, menu_delete, menu_add_child])
register_links(['menu_list', 'menu_details', 'menu_add', 'menu_add_child', 'menu_edit', 'menu_delete', 'menu_multiple_delete'], [menu_list, menu_add], menu_name=u'sidebar')
register_multi_item_links(['menu_list'], [menu_multiple_delete])

register_setup(menu_setup)

开发者ID:rogeriofalcone,项目名称:redirector,代码行数:28,代码来源:__init__.py

示例5: import

from __future__ import absolute_import

from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.core.exceptions import ObjectDoesNotExist

from navigation.api import register_links, register_multi_item_links
from project_setup.api import register_setup

from .conf.settings import DEFAULT_ROLES
from .models import Role
from .links import (role_list, role_create, role_edit, role_members, role_permissions,
    role_delete, permission_grant, permission_revoke)

register_links(Role, [role_edit, role_delete, role_permissions, role_members])
register_links([Role, 'role_list', 'role_create'], [role_list, role_create], menu_name='secondary_menu')
register_multi_item_links(['role_permissions'], [permission_grant, permission_revoke])

permission_views = ['role_list', 'role_create', 'role_edit', 'role_members', 'role_permissions', 'role_delete']


def user_post_save(sender, instance, **kwargs):
    if kwargs.get('created', False):
        for default_role in DEFAULT_ROLES:
            if isinstance(default_role, Role):
                # If a model is passed, execute method
                default_role.add_member(instance)
            else:
                # If a role name is passed, lookup the corresponding model
                try:
                    role = Role.objects.get(name=default_role)
开发者ID:simone,项目名称:mayan-edms,代码行数:31,代码来源:__init__.py

示例6: register_links

from __future__ import unicode_literals

from navigation.api import register_links

from .links import link_setup

register_links(['common:current_user_details', 'common:current_user_edit', 'common:current_user_locale_profile_details', 'common:current_user_locale_profile_edit', 'common:password_change_view'], [link_setup], menu_name='secondary_menu')
开发者ID:SSE2000,项目名称:mayan-edms,代码行数:7,代码来源:__init__.py

示例7: _

metadata_remove = {'text': _(u'remove metadata'), 'view': 'metadata_remove', 'args': 'object.pk', 'famfam': 'xhtml_delete', 'permissions': [PERMISSION_METADATA_DOCUMENT_REMOVE]}
metadata_multiple_remove = {'text': _(u'remove metadata'), 'view': 'metadata_multiple_remove', 'famfam': 'xhtml_delete', 'permissions': [PERMISSION_METADATA_DOCUMENT_REMOVE]}

setup_metadata_type_list = {'text': _(u'metadata types'), 'view': 'setup_metadata_type_list', 'famfam': 'xhtml_go', 'icon': 'xhtml.png', 'permissions': [PERMISSION_METADATA_TYPE_VIEW], 'children_view_regex': [r'setup_metadata_type']}
setup_metadata_type_edit = {'text': _(u'edit'), 'view': 'setup_metadata_type_edit', 'args': 'object.pk', 'famfam': 'xhtml', 'permissions': [PERMISSION_METADATA_TYPE_EDIT]}
setup_metadata_type_delete = {'text': _(u'delete'), 'view': 'setup_metadata_type_delete', 'args': 'object.pk', 'famfam': 'xhtml_delete', 'permissions': [PERMISSION_METADATA_TYPE_DELETE]}
setup_metadata_type_create = {'text': _(u'create new'), 'view': 'setup_metadata_type_create', 'famfam': 'xhtml_add', 'permissions': [PERMISSION_METADATA_TYPE_CREATE]}

setup_metadata_set_list = {'text': _(u'metadata sets'), 'view': 'setup_metadata_set_list', 'famfam': 'table', 'icon': 'table.png', 'permissions': [PERMISSION_METADATA_SET_VIEW], 'children_view_regex': [r'setup_metadata_set']}
setup_metadata_set_edit = {'text': _(u'edit'), 'view': 'setup_metadata_set_edit', 'args': 'object.pk', 'famfam': 'table_edit', 'permissions': [PERMISSION_METADATA_SET_EDIT]}
setup_metadata_set_delete = {'text': _(u'delete'), 'view': 'setup_metadata_set_delete', 'args': 'object.pk', 'famfam': 'table_delete', 'permissions': [PERMISSION_METADATA_SET_DELETE]}
setup_metadata_set_create = {'text': _(u'create new'), 'view': 'setup_metadata_set_create', 'famfam': 'table_add', 'permissions': [PERMISSION_METADATA_SET_CREATE]}

setup_document_type_metadata = {'text': _(u'default metadata'), 'view': 'setup_document_type_metadata', 'args': 'document_type.pk', 'famfam': 'xhtml', 'permissions': [PERMISSION_DOCUMENT_TYPE_EDIT]}

register_links(['metadata_add', 'metadata_edit', 'metadata_remove', 'metadata_view'], [metadata_add, metadata_edit, metadata_remove], menu_name='sidebar')
register_links(Document, [metadata_view], menu_name='form_header')
register_multi_item_links(['document_find_duplicates', 'folder_view', 'index_instance_list', 'document_type_document_list', 'search', 'results', 'document_group_view', 'document_list', 'document_list_recent'], [metadata_multiple_add, metadata_multiple_edit, metadata_multiple_remove])

register_links(MetadataType, [setup_metadata_type_edit, setup_metadata_type_delete])
register_links([MetadataType, 'setup_metadata_type_list', 'setup_metadata_type_create'], [setup_metadata_type_list, setup_metadata_type_create], menu_name='secondary_menu')

register_links(MetadataSet, [setup_metadata_set_edit, setup_metadata_set_delete])
register_links([MetadataSet, 'setup_metadata_set_list', 'setup_metadata_set_create'], [setup_metadata_set_list, setup_metadata_set_create], menu_name='secondary_menu')

register_links(DocumentType, [setup_document_type_metadata])

metadata_type_setup_views = ['setup_metadata_type_list', 'setup_metadata_type_edit', 'setup_metadata_type_delete', 'setup_metadata_type_create']
metadata_set_setup_views = ['setup_metadata_set_list', 'setup_metadata_set_edit', 'setup_metadata_set_delete', 'setup_metadata_set_create']

register_sidebar_template(['setup_metadata_type_list'], 'metadata_type_help.html')
开发者ID:doubleotoo,项目名称:mayan,代码行数:31,代码来源:__init__.py

示例8: import

from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist
from django.db.models.signals import post_save

from navigation.api import register_links
from project_setup.api import register_setup
from rest_api.classes import APIEndPoint

from .models import Permission, Role
from .links import (
    permission_grant, permission_revoke, role_create, role_delete, role_edit,
    role_list, role_members, role_permissions
)
from .settings import DEFAULT_ROLES

register_links(Role, [role_edit, role_members, role_permissions, role_delete])
register_links([Role, 'permissions:role_create', 'permissions:role_list'], [role_list, role_create], menu_name='secondary_menu')
register_links(['permissions:role_permissions'], [permission_grant, permission_revoke], menu_name='multi_item_links')


def user_post_save(sender, instance, **kwargs):
    if kwargs.get('created', False):
        for default_role in DEFAULT_ROLES:
            if isinstance(default_role, Role):
                # If a model is passed, execute method
                default_role.add_member(instance)
            else:
                # If a role name is passed, lookup the corresponding model
                try:
                    role = Role.objects.get(name=default_role)
                    role.add_member(instance)
开发者ID:BangorUniversity,项目名称:mayan-edms,代码行数:31,代码来源:__init__.py

示例9: register_links

from __future__ import absolute_import

from navigation.api import register_links

from .classes import Statistic, StatisticNamespace
from .links import link_execute, link_namespace_details, link_namespace_list

register_links(StatisticNamespace, [link_namespace_details])
register_links([StatisticNamespace, 'statistics:namespace_list', 'statistics:execute'], [link_namespace_list], menu_name='secondary_menu')
register_links(Statistic, [link_execute])
开发者ID:EmlynC,项目名称:mayan-edms,代码行数:10,代码来源:__init__.py

示例10: _

index_setup_view = {'text': _(u'tree template'), 'view': 'index_setup_view', 'args': 'index.pk', 'famfam': 'textfield', 'permissions': [PERMISSION_DOCUMENT_INDEXING_SETUP]}

template_node_create = {'text': _(u'new child node'), 'view': 'template_node_create', 'args': 'node.pk', 'famfam': 'textfield_add', 'permissions': [PERMISSION_DOCUMENT_INDEXING_SETUP]}
template_node_edit = {'text': _(u'edit'), 'view': 'template_node_edit', 'args': 'node.pk', 'famfam': 'textfield', 'permissions': [PERMISSION_DOCUMENT_INDEXING_SETUP], 'conditional_disable': is_root_node}
template_node_delete = {'text': _(u'delete'), 'view': 'template_node_delete', 'args': 'node.pk', 'famfam': 'textfield_delete', 'permissions': [PERMISSION_DOCUMENT_INDEXING_SETUP], 'conditional_disable': is_root_node}

index_list = {'text': _(u'index list'), 'view': 'index_list', 'famfam': 'tab', 'permissions': [PERMISSION_DOCUMENT_INDEXING_VIEW]}

index_parent = {'text': _(u'go up one level'), 'view': 'index_instance_node_view', 'args': 'object.parent.pk', 'famfam': 'arrow_up', 'permissions': [PERMISSION_DOCUMENT_INDEXING_VIEW], 'dont_mark_active': True, 'condition': is_not_instance_root_node}
document_index_list = {'text': _(u'indexes'), 'view': 'document_index_list', 'args': 'object.pk', 'famfam': 'folder_page', 'permissions': [PERMISSION_DOCUMENT_INDEXING_VIEW, PERMISSION_DOCUMENT_VIEW]}

register_top_menu('indexes', link={'text': _('indexes'), 'famfam': 'tab', 'view': 'index_list', 'children_view_regex': [r'^index_[i,l]']})

rebuild_index_instances = {'text': _('rebuild indexes'), 'view': 'rebuild_index_instances', 'famfam': 'folder_page', 'permissions': [PERMISSION_DOCUMENT_INDEXING_REBUILD_INDEXES], 'description': _(u'Deletes and creates from scratch all the document indexes.')}

register_maintenance_links([rebuild_index_instances], namespace='document_indexing', title=_(u'Indexes'))

register_sidebar_template(['index_instance_list'], 'indexing_help.html')

register_links(IndexInstanceNode, [index_parent])

register_links(Document, [document_index_list], menu_name='form_header')

register_setup(index_setup)

register_links([Index, 'index_setup_list', 'index_setup_create', 'template_node_edit', 'template_node_delete'], [index_setup_list, index_setup_create], menu_name='secondary_menu')

register_links(Index, [index_setup_edit, index_setup_delete, index_setup_view])

register_links(IndexTemplateNode, [template_node_create, template_node_edit, template_node_delete])
开发者ID:AmiGanguli,项目名称:mayan,代码行数:30,代码来源:__init__.py

示例11: initialize_document_checkout_extra_methods

def initialize_document_checkout_extra_methods():
    Document.add_to_class('is_checked_out', lambda document: DocumentCheckout.objects.is_document_checked_out(document))
    Document.add_to_class('check_in', lambda document, user=None: DocumentCheckout.objects.check_in_document(document, user))
    Document.add_to_class('checkout_info', lambda document: DocumentCheckout.objects.document_checkout_info(document))
    Document.add_to_class('checkout_state', lambda document: DocumentCheckout.objects.document_checkout_state(document))
    Document.add_to_class('is_new_versions_allowed', lambda document, user=None: DocumentCheckout.objects.is_document_new_versions_allowed(document, user))


app.conf.CELERYBEAT_SCHEDULE.update({
    'check_expired_check_outs': {
        'task': 'checkouts.tasks.task_check_expired_check_outs',
        'schedule': timedelta(seconds=CHECK_EXPIRED_CHECK_OUTS_INTERVAL),
        'options': {'queue': 'checkouts'}
    },
})

class_permissions(Document, [
    PERMISSION_DOCUMENT_CHECKOUT,
    PERMISSION_DOCUMENT_CHECKIN,
    PERMISSION_DOCUMENT_CHECKIN_OVERRIDE,
    PERMISSION_DOCUMENT_RESTRICTIONS_OVERRIDE
])

initialize_document_checkout_extra_methods()

register_links(Document, [checkout_info], menu_name='form_header')
register_links(['checkouts:checkout_info', 'checkouts:checkout_document', 'checkouts:checkin_document'], [checkout_document, checkin_document], menu_name="sidebar")
register_top_menu(name='checkouts', link=checkout_list)

APIEndPoint('checkouts')
开发者ID:BangorUniversity,项目名称:mayan-edms,代码行数:30,代码来源:__init__.py

示例12: _

reminder_add = {'text': _(u'create reminder (calendar)'), 'view': 'reminder_add', 'famfam': 'hourglass_add', 'permissions': [PERMISSION_REMINDER_CREATE]}
reminder_add_days = {'text': _(u'create reminder (days)'), 'view': 'reminder_add_days', 'famfam': 'hourglass_add', 'permissions': [PERMISSION_REMINDER_CREATE]}
reminder_edit = {'text': _(u'edit (calendar)'), 'view': 'reminder_edit', 'args': 'object.pk', 'famfam': 'hourglass_go', 'permissions': [PERMISSION_REMINDER_EDIT]}
reminder_edit_days = {'text': _(u'edit (days)'), 'view': 'reminder_edit_days', 'args': 'object.pk', 'famfam': 'hourglass_go', 'permissions': [PERMISSION_REMINDER_EDIT]}
future_expired_remider_list = {'text': _(u'future expired reminders'), 'view': 'future_expired_remider_list', 'famfam': 'calendar', 'permissions': [PERMISSION_REMINDER_VIEW]}
future_expired_remider_list_all = {'text': _(u'future expired reminders (all)'), 'view': 'future_expired_remider_list_all', 'famfam': 'calendar', 'permissions': [PERMISSION_REMINDER_VIEW_ALL]}
reminder_view = {'text': _(u'details'), 'view': 'reminder_view', 'args': 'object.pk', 'famfam': 'hourglass', 'permissions': [PERMISSION_REMINDER_VIEW]}

reminder_delete = {'text': _(u'delete'), 'view': 'reminder_delete', 'args': 'object.id', 'famfam': 'hourglass_delete', 'permissions': [PERMISSION_REMINDER_DELETE]}
reminder_multiple_delete = {'text': _(u'delete'), 'view': 'reminder_multiple_delete', 'famfam': 'hourglass_delete', 'permissions': [PERMISSION_REMINDER_DELETE]}

reminder_participant_add = {'text': _(u'add participant'), 'view': 'participant_add', 'args': 'object.pk', 'famfam': 'user_add', 'permissions': [PERMISSION_REMINDER_EDIT]}
reminder_participant_remove = {'text': _(u'remove'), 'view': 'participant_remove', 'args': 'object.pk', 'famfam': 'user_delete', 'permissions': [PERMISSION_REMINDER_EDIT]}
reminder_participant_list = {'text': _(u'participants'), 'view': 'participant_list', 'args': 'object.pk', 'famfam': 'group', 'permissions': [PERMISSION_REMINDER_VIEW]}

register_links(['participant_list'], [reminder_participant_add], menu_name='sidebar')

register_links(
    [
        'comments_for_object', 'comment_add', 'comment_delete', 'comment_multiple_delete',
        'participant_remove', 'reminder_participant_add', 'participant_list',
        'future_expired_remider_list', 'future_expired_remider_list_all',
        'reminder_view', 'reminder_list_all', 'reminder_edit',
        'reminder_edit_days', 'reminder_delete', 'reminder_list',
        'expired_remider_list', 'expired_remider_list_all', 'reminder_add',
        'reminder_add_days', 'participant_add'],
    [
        reminder_list, reminder_list_all, expired_remider_list,
        expired_remider_list_all, future_expired_remider_list,
        future_expired_remider_list_all, reminder_add, reminder_add_days
    ], menu_name='sidebar'
开发者ID:Code4PuertoRico,项目名称:cujo,代码行数:31,代码来源:__init__.py

示例13: import

    smart_link_delete,
    smart_link_condition_list,
    smart_link_condition_create,
    smart_link_condition_edit,
    smart_link_condition_delete,
    smart_link_acl_list,
)
from .models import SmartLink, SmartLinkCondition
from .permissions import (
    PERMISSION_SMART_LINK_VIEW,
    PERMISSION_SMART_LINK_CREATE,
    PERMISSION_SMART_LINK_DELETE,
    PERMISSION_SMART_LINK_EDIT,
)

register_links(Document, [smart_link_instances_for_document], menu_name="form_header")

register_links(SmartLink, [smart_link_edit, smart_link_delete, smart_link_condition_list, smart_link_acl_list])
register_links(
    [SmartLink, "smart_link_list", "smart_link_create"],
    [smart_link_list, smart_link_create],
    menu_name="secondary_menu",
)

register_links(SmartLinkCondition, [smart_link_condition_edit, smart_link_condition_delete])
register_links(
    [
        "smart_link_condition_list",
        "smart_link_condition_create",
        "smart_link_condition_edit",
        "smart_link_condition_delete",
开发者ID:rosarior,项目名称:mayan,代码行数:31,代码来源:__init__.py

示例14: register_links

    user_add,
    user_delete,
    user_multiple_delete,
    user_set_password,
    user_multiple_set_password,
    user_groups,
    group_list,
    group_setup,
    group_edit,
    group_add,
    group_delete,
    group_multiple_delete,
    group_members,
)

register_links(User, [user_edit, user_set_password, user_groups, user_delete])
register_links(
    [User, "user_multiple_set_password", "user_multiple_delete", "user_list", "user_add"],
    [user_list, user_add],
    menu_name=u"secondary_menu",
)
register_multi_item_links(["user_list"], [user_multiple_set_password, user_multiple_delete])

register_links(Group, [group_edit, group_members, group_delete])
register_links(
    ["group_multiple_delete", "group_delete", "group_edit", "group_list", "group_add", "group_members"],
    [group_list, group_add],
    menu_name=u"secondary_menu",
)
register_multi_item_links(["group_list"], [group_multiple_delete])
开发者ID:gwalborn,项目名称:mayan-edms,代码行数:30,代码来源:__init__.py

示例15: _

document_type_list = {'text': _(u'document type list'), 'view': 'document_type_list', 'famfam': 'layout', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
document_type_document_list = {'text': _(u'documents of this type'), 'view': 'document_type_document_list', 'args': 'object.id', 'famfam': 'page_go', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
document_type_edit = {'text': _(u'edit'), 'view': 'document_type_edit', 'args': 'object.id', 'famfam': 'layout_edit', 'permissions': [PERMISSION_DOCUMENT_TYPE_EDIT]}
document_type_delete = {'text': _(u'delete'), 'view': 'document_type_delete', 'args': 'object.id', 'famfam': 'layout_delete', 'permissions': [PERMISSION_DOCUMENT_TYPE_DELETE]}
document_type_create = {'text': _(u'create document type'), 'view': 'document_type_create', 'famfam': 'layout_add', 'permissions': [PERMISSION_DOCUMENT_TYPE_CREATE]}

document_type_filename_list = {'text': _(u'filenames'), 'view': 'document_type_filename_list', 'args': 'object.id', 'famfam': 'database', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
document_type_filename_create = {'text': _(u'add filename to document type'), 'view': 'document_type_filename_create', 'args': 'document_type.id', 'famfam': 'database_add', 'permissions': [PERMISSION_DOCUMENT_TYPE_EDIT]}
document_type_filename_edit = {'text': _(u'edit'), 'view': 'document_type_filename_edit', 'args': 'object.id', 'famfam': 'database_edit', 'permissions': [PERMISSION_DOCUMENT_TYPE_EDIT]}
document_type_filename_delete = {'text': _(u'delete'), 'view': 'document_type_filename_delete', 'args': 'object.id', 'famfam': 'database_delete', 'permissions': [PERMISSION_DOCUMENT_TYPE_EDIT]}
document_type_filename_return_to_document_type = {'text': _(u'return to document type filenames'), 'view': 'document_type_filename_list', 'args': 'object.document_type.id', 'famfam': 'database', 'permissions': [PERMISSION_DOCUMENT_TYPE_EDIT]}

document_type_views = ['setup_document_type_metadata', 'document_type_list', 'document_type_document_list', 'document_type_edit', 'document_type_delete', 'document_type_create', 'document_type_filename_list', 'document_type_filename_create', 'document_type_filename_edit', 'document_type_filename_delete']

# Register document type links
register_links(DocumentType, [document_type_document_list, document_type_filename_list, document_type_edit, document_type_delete])
register_links(DocumentTypeFilename, [document_type_filename_edit, document_type_filename_delete])

register_links(['setup_document_type_metadata', 'document_type_filename_delete', 'document_type_create', 'document_type_filename_create', 'document_type_filename_edit', 'document_type_filename_list', 'document_type_list', 'document_type_document_list', 'document_type_edit', 'document_type_delete'], [document_type_create], menu_name='sidebar')
register_links(['document_type_filename_create', 'document_type_filename_list', 'document_type_filename_edit', 'document_type_filename_delete'], [document_type_filename_create], menu_name='sidebar')
register_links(['document_type_filename_edit', 'document_type_filename_delete'], [document_type_filename_return_to_document_type], menu_name='sidebar')

# Register document links 
register_links(Document, [document_edit, document_print, document_delete, document_download, document_find_duplicates, document_clear_transformations, document_create_siblings])
register_multi_item_links(['folder_view', 'index_instance_list', 'document_type_document_list', 'search', 'results', 'document_group_view', 'document_list', 'document_list_recent'], [document_multiple_clear_transformations, document_multiple_delete])

register_links(['document_list_recent', 'document_list', 'document_create', 'document_create_multiple', 'upload_document', 'upload_document_from_local', 'upload_document_from_staging', 'upload_document_from_user_staging', 'document_find_duplicates'], [document_list_recent, document_list, document_create_multiple], menu_name='secondary_menu')

# Document page links
register_links(DocumentPage, [
    document_page_transformation_list, document_page_view,
开发者ID:mrcrabby,项目名称:mayan,代码行数:31,代码来源:__init__.py


注:本文中的navigation.api.register_links函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。