{% extends "app/website/templates/html/page.html" %} {% set title=doc.name %} {% set status_label = { "Open": "label-success", "To Reply": "label-danger", "Closed": "label-default" } %} {% block content %}

{{ doc.name }}


{%- if doc.status -%} {% if doc.status == "Waiting for Customer" -%} {% set status = "To Reply" %} {% else %} {% set status = doc.status %} {%- endif -%}
{{ status }}
{{ doc.subject }}
{{ utils.formatdate(doc.creation) }}

Messages

{%- if doclist.get({"doctype":"Communication"}) -%}
{%- for comm in doclist.get({"doctype":"Communication"}) %} {% endfor -%}
{{ comm.sender }} on {{ utils.formatdate(doc.modified) }}

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

{%- else -%}
No messages
{%- endif -%} {%- endif -%}
{% endblock %}