{% block title %} {{ title }} {% endblock %} {% block header %}

{{ title }}

{% endblock %} {% block content %} {% set status_label = { "Open": "label-success", "To Reply": "label-danger", "Closed": "label-default" } %}
{% if not doc -%} {% else %}
{%- if doc.status -%} {% if doc.status == "Waiting for Customer" -%} {% set status = "To Reply" %} {% else %} {% set status = doc.status %} {%- endif -%}
{{ status }}
{{ doc.subject }}
{{ frappe.utils.formatdate(doc.creation) }}

Messages

{%- for comm in (doc.get({"doctype":"Communication"})|sort(reverse=True, attribute="creation")) %} {% endfor -%}
{{ comm.sender }} on {{ frappe.utils.formatdate(comm.creation) }}

{{ frappe.utils.is_html(comm.content) and comm.content or comm.content.replace("\n", "
")}}

{%- endif -%} {% endif -%}
{% endblock %}