diff --git a/mayan/apps/mailer/literals.py b/mayan/apps/mailer/literals.py new file mode 100644 index 0000000000..948cf8deb1 --- /dev/null +++ b/mayan/apps/mailer/literals.py @@ -0,0 +1,25 @@ +from __future__ import unicode_literals + +from django.conf import settings +from django.utils.translation import ugettext_lazy as _ + + +DEFAULT_DOCUMENT_BODY_TEMPLATE =_('\ + Attached to this email is the document: {{ document }}

\n\n\ + --------
\nThis email has been sent from \ + %(project_title)s (%(project_website)s)' + ) % { + 'project_title': settings.PROJECT_TITLE, + 'project_website': settings.PROJECT_WEBSITE + } + +DEFAULT_LINK_BODY_TEMPLATE = _('\ + To access this document click on the following link: \ + {{ link }}

\n\n--------
\ + \nThis email has been sent from %(project_title)s (%(project_website)s)\ + ') % { + 'project_title': settings.PROJECT_TITLE, + 'project_website': settings.PROJECT_WEBSITE + } + + diff --git a/mayan/apps/mailer/settings.py b/mayan/apps/mailer/settings.py index 4da6266404..a86a56faa7 100644 --- a/mayan/apps/mailer/settings.py +++ b/mayan/apps/mailer/settings.py @@ -4,8 +4,14 @@ from django.utils.translation import ugettext_lazy as _ from smart_settings import Namespace +from .literals import ( + DEFAULT_DOCUMENT_BODY_TEMPLATE, DEFAULT_LINK_BODY_TEMPLATE +) + + namespace = Namespace(name='mailer', label=_('Mailing')) setting_link_subject_template = namespace.add_setting(global_name='MAILER_LINK_SUBJECT_TEMPLATE', default=_('Link for document: {{ document }}'), help_text=_('Template for the document link email form subject line.')) -setting_link_body_template = namespace.add_setting(global_name='MAILER_LINK_BODY_TEMPLATE', default=_('To access this document click on the following link: {{ link }}

\n\n--------
\nThis email has been sent from Mayan EDMS (http://www.mayan-edms.com)'), help_text=_('Template for the document link email form body line.')) +setting_link_body_template = namespace.add_setting(global_name='MAILER_LINK_BODY_TEMPLATE', default=DEFAULT_LINK_BODY_TEMPLATE, help_text=_('Template for the document link email form body line.')) setting_document_subject_template = namespace.add_setting(global_name='MAILER_DOCUMENT_SUBJECT_TEMPLATE', default=_('Document: {{ document }}'), help_text=_('Template for the document email form subject line.')) -setting_document_body_template = namespace.add_setting(global_name='MAILER_DOCUMENT_BODY_TEMPLATE', default=_('Attached to this email is the document: {{ document }}

\n\n--------
\nThis email has been sent from Mayan EDMS (http://www.mayan-edms.com)'), help_text=_('Template for the document email form body line.')) +setting_document_body_template = namespace.add_setting(global_name='MAILER_DOCUMENT_BODY_TEMPLATE', default=DEFAULT_DOCUMENT_BODY_TEMPLATE, help_text=_('Template for the document email form body line.')) + diff --git a/mayan/settings/base.py b/mayan/settings/base.py index aa53d4cd40..5ee6df0e1e 100644 --- a/mayan/settings/base.py +++ b/mayan/settings/base.py @@ -151,6 +151,7 @@ STATIC_URL = '/static/' TEMPLATE_DEBUG = True PROJECT_TITLE = 'Mayan EDMS' PROJECT_NAME = 'mayan' +PROJECT_WEBSITE = 'http://www.mayan-edms.com' LANGUAGES = ( ('ar', _('Arabic')),