Move mailer defaults to the literals module
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -8,11 +8,11 @@ DEFAULT_DOCUMENT_BODY_TEMPLATE = _(
|
|||||||
'--------\n '
|
'--------\n '
|
||||||
'This email has been sent from %(project_title)s (%(project_website)s)'
|
'This email has been sent from %(project_title)s (%(project_website)s)'
|
||||||
)
|
)
|
||||||
|
DEFAULT_DOCUMENT_SUBJECT_TEMPLATE = _('Document: {{ document }}')
|
||||||
DEFAULT_LINK_BODY_TEMPLATE = _(
|
DEFAULT_LINK_BODY_TEMPLATE = _(
|
||||||
'To access this document click on the following link: '
|
'To access this document click on the following link: '
|
||||||
'{{ link }}\n\n--------\n '
|
'{{ link }}\n\n--------\n '
|
||||||
'This email has been sent from %(project_title)s (%(project_website)s)'
|
'This email has been sent from %(project_title)s (%(project_website)s)'
|
||||||
)
|
)
|
||||||
|
DEFAULT_LINK_SUBJECT_TEMPLATE = _('Link for document: {{ document }}')
|
||||||
EMAIL_SEPARATORS = (',', ';')
|
EMAIL_SEPARATORS = (',', ';')
|
||||||
|
|||||||
@@ -2,31 +2,32 @@ from __future__ import unicode_literals
|
|||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from mayan.apps.smart_settings import Namespace
|
from mayan.apps.smart_settings.classes import Namespace
|
||||||
|
|
||||||
from .literals import (
|
from .literals import (
|
||||||
DEFAULT_DOCUMENT_BODY_TEMPLATE, DEFAULT_LINK_BODY_TEMPLATE
|
DEFAULT_DOCUMENT_BODY_TEMPLATE, DEFAULT_DOCUMENT_SUBJECT_TEMPLATE,
|
||||||
|
DEFAULT_LINK_BODY_TEMPLATE, DEFAULT_LINK_SUBJECT_TEMPLATE
|
||||||
)
|
)
|
||||||
|
|
||||||
namespace = Namespace(label=_('Mailing'), name='mailer')
|
namespace = Namespace(label=_('Mailing'), name='mailer')
|
||||||
|
|
||||||
setting_link_subject_template = namespace.add_setting(
|
|
||||||
default=_('Link for document: {{ document }}'),
|
|
||||||
help_text=_('Template for the document link email form subject line.'),
|
|
||||||
global_name='MAILER_LINK_SUBJECT_TEMPLATE', quoted=True
|
|
||||||
)
|
|
||||||
setting_link_body_template = namespace.add_setting(
|
|
||||||
default=DEFAULT_LINK_BODY_TEMPLATE,
|
|
||||||
help_text=_('Template for the document link email form body text. Can include HTML.'),
|
|
||||||
global_name='MAILER_LINK_BODY_TEMPLATE', quoted=True
|
|
||||||
)
|
|
||||||
setting_document_subject_template = namespace.add_setting(
|
setting_document_subject_template = namespace.add_setting(
|
||||||
default=_('Document: {{ document }}'),
|
default=DEFAULT_DOCUMENT_SUBJECT_TEMPLATE,
|
||||||
help_text=_('Template for the document email form subject line.'),
|
help_text=_('Template for the document email form subject line.'),
|
||||||
global_name='MAILER_DOCUMENT_SUBJECT_TEMPLATE', quoted=True
|
global_name='MAILER_DOCUMENT_SUBJECT_TEMPLATE'
|
||||||
)
|
)
|
||||||
setting_document_body_template = namespace.add_setting(
|
setting_document_body_template = namespace.add_setting(
|
||||||
default=DEFAULT_DOCUMENT_BODY_TEMPLATE,
|
default=DEFAULT_DOCUMENT_BODY_TEMPLATE,
|
||||||
help_text=_('Template for the document email form body text. Can include HTML.'),
|
help_text=_('Template for the document email form body text. Can include HTML.'),
|
||||||
global_name='MAILER_DOCUMENT_BODY_TEMPLATE', quoted=True
|
global_name='MAILER_DOCUMENT_BODY_TEMPLATE'
|
||||||
|
)
|
||||||
|
setting_link_subject_template = namespace.add_setting(
|
||||||
|
default=DEFAULT_LINK_SUBJECT_TEMPLATE,
|
||||||
|
help_text=_('Template for the document link email form subject line.'),
|
||||||
|
global_name='MAILER_LINK_SUBJECT_TEMPLATE'
|
||||||
|
)
|
||||||
|
setting_link_body_template = namespace.add_setting(
|
||||||
|
default=DEFAULT_LINK_BODY_TEMPLATE,
|
||||||
|
help_text=_('Template for the document link email form body text. Can include HTML.'),
|
||||||
|
global_name='MAILER_LINK_BODY_TEMPLATE'
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user