Files
mayan-edms/mayan/apps/documents/events.py
Roberto Rosario 74dfa53787 Update documents app
Rename the DeletedDocument proxy model to a TrashedDocument.

Rename the deleted_document views to trashed_document.

Rename the document and deleted_document URL parameters to
trashed_document.

Update URL parameters to the '_id' form.

Add keyword arguments.

Update use of .filter_by_access().

Enclose trashed document restore method in a transaction.

Sort arguments.

Update app for compliance with MERCs 5 and 6.

Add document page view tests.

Add favorite document view tests.

Movernize tests.

Replace use of urlencode with furl.

Update views to use ExternalObjectMixin.

Refactor the document and version download views.

Rename the DocumentDocumentTypeEditView to DocumentChangeTypeView.

Move the trashed document views to their own module.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2019-01-28 05:25:48 -04:00

39 lines
1.4 KiB
Python

from __future__ import absolute_import, unicode_literals
from django.utils.translation import ugettext_lazy as _
from mayan.apps.events import EventTypeNamespace
namespace = EventTypeNamespace(label=_('Documents'), name='documents')
event_document_create = namespace.add_event_type(
label=_('Document created'), name='document_create'
)
event_document_download = namespace.add_event_type(
label=_('Document downloaded'), name='document_download'
)
event_document_new_version = namespace.add_event_type(
label=_('New version uploaded'), name='document_new_version'
)
event_document_properties_edit = namespace.add_event_type(
label=_('Document properties edited'), name='document_edit'
)
# The type of an existing document is changed to another type
event_document_type_change = namespace.add_event_type(
label=_('Document type changed'), name='document_type_change'
)
# A document type is created
event_document_type_created = namespace.add_event_type(
label=_('Document type created'), name='document_type_created'
)
# An existing document type is modified
event_document_type_edited = namespace.add_event_type(
label=_('Document type edited'), name='document_type_edit'
)
event_document_version_revert = namespace.add_event_type(
label=_('Document version reverted'), name='document_version_revert'
)
event_document_view = namespace.add_event_type(
label=_('Document viewed'), name='document_view'
)