コード例 #1
0
ファイル: __init__.py プロジェクト: rkpob/mayan-edms
        r'^metadata/[^s]',
        r'comments',
        r'tags/document',
        r'grouping/[^s]',
        r'history/list/for_object/documents',
    ],
    children_view_regex=[r'document_acl', r'smart_link_instance'],
    children_views=[
        'document_folder_list',
        'folder_add_document',
        'document_index_list',
        'upload_version',
    ],
    position=1)

register_sidebar_template(['document_list_recent'],
                          'recent_document_list_help.html')
register_sidebar_template(['document_type_list'], 'document_types_help.html')

register_links(Document, [document_view_simple],
               menu_name='form_header',
               position=0)
register_links(Document, [document_view_advanced],
               menu_name='form_header',
               position=1)
register_links(Document, [document_history_view], menu_name='form_header')
register_links(Document, [document_version_list], menu_name='form_header')

if (not validate_path(
        document_settings.CACHE_PATH)) or (not document_settings.CACHE_PATH):
    setattr(document_settings, 'CACHE_PATH', tempfile.mkdtemp())
コード例 #2
0
ファイル: __init__.py プロジェクト: cccs-web/mayan-edms
        encapsulate(lambda x: document_thumbnail(x, gallery_name='document_list', title=x.filename, size=THUMBNAIL_SIZE))
    },
])

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',
    ],
    children_view_regex=[r'document_acl', r'smart_link_instance'],
    children_views=['document_folder_list', 'folder_add_document', 'document_index_list', 'upload_version', ],
    position=1
)

register_sidebar_template(['document_list_recent'], 'recent_document_list_help.html')
register_sidebar_template(['document_type_list'], 'document_types_help.html')

register_links(Document, [document_view_simple], menu_name='form_header', position=0)
register_links(Document, [document_view_advanced], menu_name='form_header', position=1)
register_links(Document, [document_history_view], menu_name='form_header')
register_links(Document, [document_version_list], menu_name='form_header')

if (not validate_path(document_settings.CACHE_PATH)) or (not document_settings.CACHE_PATH):
    setattr(document_settings, 'CACHE_PATH', tempfile.mkdtemp())

register_setup(document_type_setup)

class_permissions(Document, [
    PERMISSION_DOCUMENT_PROPERTIES_EDIT,
    PERMISSION_DOCUMENT_EDIT,
コード例 #3
0
ファイル: __init__.py プロジェクト: AmiGanguli/mayan
from django.utils.translation import ugettext_lazy as _

from navigation.api import register_sidebar_template, register_links

search = {'text': _(u'search'), 'view': 'search', 'famfam': 'zoom'}
search_advanced = {'text': _(u'advanced search'), 'view': 'search_advanced', 'famfam': 'zoom_in'}
search_again = {'text': _(u'search again'), 'view': 'search_again', 'famfam': 'arrow_undo'}

register_sidebar_template(['search', 'search_advanced'], 'search_help.html')

register_links(['search', 'search_advanced', 'results'], [search, search_advanced], menu_name='form_header')
register_links(['results'], [search_again], menu_name='sidebar')

register_sidebar_template(['search', 'search_advanced', 'results'], 'recent_searches.html')
コード例 #4
0
ファイル: __init__.py プロジェクト: doubleotoo/mayan
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')
register_sidebar_template(['setup_metadata_set_list'], 'metadata_set_help.html')

register_setup(setup_metadata_type_list)
register_setup(setup_metadata_set_list)

class_permissions(Document, [
    PERMISSION_METADATA_DOCUMENT_EDIT,
    PERMISSION_METADATA_DOCUMENT_ADD,
    PERMISSION_METADATA_DOCUMENT_REMOVE,
    PERMISSION_METADATA_DOCUMENT_VIEW,
])
コード例 #5
0
ファイル: __init__.py プロジェクト: AmiGanguli/mayan
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])
コード例 #6
0
ファイル: __init__.py プロジェクト: mrcrabby/mayan
from django.utils.translation import ugettext_lazy as _

from navigation.api import register_sidebar_template

TRANFORMATION_CHOICES = {
    u'rotate': u'-rotate %(degrees)d'
}

formats_list = {'text': _('file formats'), 'view': 'formats_list', 'famfam': 'pictures'}

register_sidebar_template(['formats_list'], 'converter_file_formats_help.html')
コード例 #7
0
ファイル: __init__.py プロジェクト: rosarior/mayan
    [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",
    ],
    [smart_link_condition_create],
    menu_name="sidebar",
)

register_setup(smart_link_setup)
register_sidebar_template(["smart_link_list"], "smart_links_help.html")

class_permissions(
    SmartLink,
    [
        PERMISSION_SMART_LINK_VIEW,
        PERMISSION_SMART_LINK_DELETE,
        PERMISSION_SMART_LINK_EDIT,
        ACLS_EDIT_ACL,
        ACLS_VIEW_ACL,
    ],
)
コード例 #8
0
ファイル: __init__.py プロジェクト: ranjithtenz/mayan
    "args": "object.parent.pk",
    "famfam": "arrow_up",
    "permissions": [PERMISSION_DOCUMENT_INDEXING_VIEW],
    "dont_mark_active": True,
}
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": "folder_page", "view": "index_instance_list"})

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(IndexInstance, [index_parent])

register_links(Document, [document_index_list], menu_name="form_header")
コード例 #9
0
ファイル: __init__.py プロジェクト: rkpob/mayan-edms
from .permissions import (PERMISSION_SMART_LINK_VIEW,
                          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'
], [smart_link_condition_create],
               menu_name='sidebar')

register_setup(smart_link_setup)
register_sidebar_template(['smart_link_list'], 'smart_links_help.html')

class_permissions(SmartLink, [
    PERMISSION_SMART_LINK_VIEW, PERMISSION_SMART_LINK_DELETE,
    PERMISSION_SMART_LINK_EDIT, ACLS_EDIT_ACL, ACLS_VIEW_ACL
])
コード例 #10
0
ファイル: __init__.py プロジェクト: spacedman/mayan
from django.utils.translation import ugettext_lazy as _
from django.core.exceptions import ImproperlyConfigured

from navigation.api import register_sidebar_template
from project_tools.api import register_tool

from converter.utils import load_backend
from converter.conf.settings import GRAPHICS_BACKEND

formats_list = {
    'text': _('file formats'),
    'view': 'formats_list',
    'famfam': 'pictures',
    'icon': 'pictures.png'
}

register_sidebar_template(['formats_list'], 'converter_file_formats_help.html')

try:
    backend = load_backend().ConverterClass()
except ImproperlyConfigured:
    raise ImproperlyConfigured(u'Missing or incorrect converter backend: %s' %
                               GRAPHICS_BACKEND)

register_tool(formats_list)
コード例 #11
0
ファイル: __init__.py プロジェクト: AmiGanguli/mayan
smart_link_list = {'text': _(u'smart links list'), 'view': 'smart_link_list', 'famfam': 'link', 'permissions': [PERMISSION_SMART_LINK_CREATE]}
smart_link_create = {'text': _(u'create new smart link'), 'view': 'smart_link_create', 'famfam': 'link_add', 'permissions': [PERMISSION_SMART_LINK_CREATE]}
smart_link_edit = {'text': _(u'edit'), 'view': 'smart_link_edit', 'args': 'object.pk', 'famfam': 'link_edit', 'permissions': [PERMISSION_SMART_LINK_EDIT]}
smart_link_delete = {'text': _(u'delete'), 'view': 'smart_link_delete', 'args': 'object.pk', 'famfam': 'link_delete', 'permissions': [PERMISSION_SMART_LINK_DELETE]}

smart_link_condition_list = {'text': _(u'conditions'), 'view': 'smart_link_condition_list', 'args': 'object.pk', 'famfam': 'cog', 'permissions': [PERMISSION_SMART_LINK_CREATE, PERMISSION_SMART_LINK_CREATE]}
smart_link_condition_create = {'text': _(u'create condition'), 'view': 'smart_link_condition_create', 'args': 'object.pk', 'famfam': 'cog_add', 'permissions': [PERMISSION_SMART_LINK_CREATE, PERMISSION_SMART_LINK_EDIT]}
smart_link_condition_edit = {'text': _(u'edit'), 'view': 'smart_link_condition_edit', 'args': 'condition.pk', 'famfam': 'cog_edit', 'permissions': [PERMISSION_SMART_LINK_CREATE, PERMISSION_SMART_LINK_EDIT]}
smart_link_condition_delete = {'text': _(u'delete'), 'view': 'smart_link_condition_delete', 'args': 'condition.pk', 'famfam': 'cog_delete', 'permissions': [PERMISSION_SMART_LINK_CREATE, PERMISSION_SMART_LINK_EDIT]}

smart_link_acl_list = {'text': _(u'ACLs'), 'view': 'smart_link_acl_list', 'args': 'object.pk', 'famfam': 'lock', 'permissions': [ACLS_VIEW_ACL]}

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'], [smart_link_condition_create], menu_name='sidebar')

register_setup(smart_link_setup)
register_sidebar_template(['smart_link_list'], 'smart_links_help.html')

class_permissions(SmartLink, [
    PERMISSION_SMART_LINK_VIEW,
    PERMISSION_SMART_LINK_DELETE,
    PERMISSION_SMART_LINK_EDIT,
    ACLS_EDIT_ACL,
    ACLS_VIEW_ACL
])
コード例 #12
0
ファイル: __init__.py プロジェクト: rkpob/mayan-edms
    [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_members,
    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])

register_sidebar_template(['setup_metadata_type_list'],
                          'metadata_type_help.html')
register_sidebar_template(['setup_metadata_set_list'],
                          'metadata_set_help.html')

register_setup(setup_metadata_type_list)
register_setup(setup_metadata_set_list)

class_permissions(Document, [
    PERMISSION_METADATA_DOCUMENT_EDIT,
    PERMISSION_METADATA_DOCUMENT_ADD,
    PERMISSION_METADATA_DOCUMENT_REMOVE,
    PERMISSION_METADATA_DOCUMENT_VIEW,
])

register_model_list_columns(Document, [
    {
コード例 #13
0
folder_add_document = {'text': _('add to a folder'), 'view': 'folder_add_document', 'args': 'object.pk', 'famfam': 'add', 'permissions': [PERMISSION_FOLDER_ADD_DOCUMENT]}
document_folder_list = {'text': _(u'folders'), 'view': 'document_folder_list', 'args': 'object.pk', 'famfam': 'folder_user', 'permissions': [PERMISSION_DOCUMENT_VIEW], 'children_view_regex': [r'folder']}

folder_acl_list = {'text': _(u'ACLs'), 'view': 'folder_acl_list', 'args': 'object.pk', 'famfam': 'lock', 'permissions': [ACLS_VIEW_ACL]}

register_multi_item_links(['folder_view'], [folder_document_multiple_remove])

register_links(Folder, [folder_view, folder_edit, folder_delete, folder_acl_list])

register_links([Folder, 'folder_list', 'folder_create'], [folder_list, folder_create], menu_name='secondary_menu')

register_top_menu(name='folders', link={'text': _('folders'), 'famfam': 'folder_user', 'view': 'folder_list'}, children_views=['folder_list', 'folder_create', 'folder_edit', 'folder_delete', 'folder_view', 'folder_document_multiple_remove'])

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

register_sidebar_template(['folder_list'], 'folders_help.html')

register_links(['document_folder_list', 'folder_add_document'], [folder_add_document], menu_name="sidebar")

class_permissions(Folder, [
    PERMISSION_FOLDER_EDIT,
    PERMISSION_FOLDER_DELETE,
    PERMISSION_FOLDER_VIEW,
    ACLS_EDIT_ACL,
    ACLS_VIEW_ACL
])

class_permissions(Document, [
    PERMISSION_FOLDER_ADD_DOCUMENT,
    PERMISSION_FOLDER_REMOVE_DOCUMENT,
])
コード例 #14
0
                  })

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])
コード例 #15
0
ファイル: __init__.py プロジェクト: x3n0/mayan
from django.utils.translation import ugettext_lazy as _

from navigation.api import register_sidebar_template, register_links

search = {'text': _(u'search'), 'view': 'search', 'famfam': 'zoom'}
search_advanced = {
    'text': _(u'advanced search'),
    'view': 'search_advanced',
    'famfam': 'zoom_in'
}
search_again = {
    'text': _(u'search again'),
    'view': 'search_again',
    'famfam': 'arrow_undo'
}

register_sidebar_template(['search', 'search_advanced'], 'search_help.html')

register_links(['search', 'search_advanced', 'results'],
               [search, search_advanced],
               menu_name='form_header')
register_links(['results'], [search_again], menu_name='sidebar')

register_sidebar_template(['search', 'search_advanced', 'results'],
                          'recent_searches.html')
コード例 #16
0
ファイル: __init__.py プロジェクト: rosarior/mayan
from .permissions import (PERMISSION_FOLDER_CREATE,
    PERMISSION_FOLDER_EDIT, PERMISSION_FOLDER_DELETE,
    PERMISSION_FOLDER_REMOVE_DOCUMENT, PERMISSION_FOLDER_VIEW,
    PERMISSION_FOLDER_ADD_DOCUMENT)

register_multi_item_links(['folder_view'], [folder_document_multiple_remove])

register_links(Folder, [folder_view, folder_edit, folder_delete, folder_acl_list])

register_links([Folder, 'folder_list', 'folder_create'], [folder_list, folder_create], menu_name='secondary_menu')

register_top_menu(name='folders', link=folders_main_menu_link, children_views=['folder_list', 'folder_create', 'folder_edit', 'folder_delete', 'folder_view', 'folder_document_multiple_remove'])

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

register_sidebar_template(['folder_list'], 'folders_help.html')

register_links(['document_folder_list', 'folder_add_document'], [folder_add_document], menu_name="sidebar")

register_multi_item_links(['document_find_duplicates', 'folder_view', 'index_instance_node_view', 'document_type_document_list', 'search', 'results', 'document_group_view', 'document_list', 'document_list_recent', 'tag_tagged_item_list'], [folder_add_multiple_documents])

class_permissions(Folder, [
    PERMISSION_FOLDER_EDIT,
    PERMISSION_FOLDER_DELETE,
    PERMISSION_FOLDER_VIEW,
    ACLS_EDIT_ACL,
    ACLS_VIEW_ACL
])

class_permissions(Document, [
    PERMISSION_FOLDER_ADD_DOCUMENT,
コード例 #17
0
ファイル: __init__.py プロジェクト: ranjithtenz/mayan
)

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",
    ],
    # children_view_regex=[r'upload'],
    children_views=["document_folder_list", "folder_add_document", "document_index_list", "upload_version"],
    position=1,
)

register_sidebar_template(["document_list_recent"], "recent_document_list_help.html")
register_sidebar_template(["document_type_list"], "document_types_help.html")

register_links(Document, [document_view_simple], menu_name="form_header", position=0)
register_links(Document, [document_view_advanced], menu_name="form_header", position=1)
register_links(Document, [document_history_view], menu_name="form_header")
register_links(Document, [document_version_list], menu_name="form_header")

if (validate_path(document_settings.CACHE_PATH) == False) or (not document_settings.CACHE_PATH):
    setattr(document_settings, "CACHE_PATH", tempfile.mkdtemp())

register_setup(document_type_setup)