mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-01-21 21:38:37 +01:00
Allow Templated Subjects.
This commit is contained in:
parent
978c0665b8
commit
19c1913268
@ -86,6 +86,10 @@ These changes are visible throughout django-helpdesk
|
|||||||
|
|
||||||
**Default:** ``HELPDESK_AUTO_SUBSCRIBE_ON_TICKET_RESPONSE = False``
|
**Default:** ``HELPDESK_AUTO_SUBSCRIBE_ON_TICKET_RESPONSE = False``
|
||||||
|
|
||||||
|
- **HELPDESK_EMAIL_SUBJECT_TEMPLATE ** Subject template for templated emails. ``%(subject)s`` represents the subject wording from the email template (e.g. "(Closed)").
|
||||||
|
|
||||||
|
**Default:** ``HELPDESK_EMAIL_SUBJECT_TEMPLATE = "{{ ticket.ticket }} {{ ticket.title|safe }} %(subject)s"``
|
||||||
|
|
||||||
|
|
||||||
Options shown on public pages
|
Options shown on public pages
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
@ -104,7 +104,7 @@ def send_templated_mail(template_name, email_context, recipients, sender=None, b
|
|||||||
).render(context)
|
).render(context)
|
||||||
|
|
||||||
subject_part = loader.get_template_from_string(
|
subject_part = loader.get_template_from_string(
|
||||||
"{{ ticket.ticket }} {{ ticket.title|safe }} %s" % t.subject
|
settings.HELPDESK_EMAIL_SUBJECT_TEMPLATE % t.subject
|
||||||
).render(context)
|
).render(context)
|
||||||
|
|
||||||
if isinstance(recipients,(str,unicode)):
|
if isinstance(recipients,(str,unicode)):
|
||||||
|
@ -80,6 +80,9 @@ HELPDESK_STAFF_ONLY_TICKET_OWNERS = getattr(settings, 'HELPDESK_STAFF_ONLY_TICKE
|
|||||||
HELPDESK_STAFF_ONLY_TICKET_CC = getattr(settings, 'HELPDESK_STAFF_ONLY_TICKET_CC', False)
|
HELPDESK_STAFF_ONLY_TICKET_CC = getattr(settings, 'HELPDESK_STAFF_ONLY_TICKET_CC', False)
|
||||||
|
|
||||||
|
|
||||||
|
# allow the subject to have a configurable template.
|
||||||
|
HELPDESK_EMAIL_SUBJECT_TEMPLATE = getattr(settings, 'HELPDESK_EMAIL_SUBJECT_TEMPLATE', "{{ ticket.ticket }} {{ ticket.title|safe }} %(subject)s")
|
||||||
|
|
||||||
|
|
||||||
''' options for staff.create_ticket view '''
|
''' options for staff.create_ticket view '''
|
||||||
# hide the 'assigned to' / 'Case owner' field from the 'create_ticket' view?
|
# hide the 'assigned to' / 'Case owner' field from the 'create_ticket' view?
|
||||||
|
Loading…
Reference in New Issue
Block a user