brotherton-erpnext/website/templates/pages/messages.html

31 lines
851 B
HTML

{% extends "app/website/templates/html/transactions.html" %}
{% block javascript -%}
{{ super() }}
var render = function(doc) {
doc.sender = doc.sender ? doc.sender : "To ";
doc.recipients = doc.recipients ? (" to " + doc.recipients) : "";
doc.content = remove_script_and_style(doc.content);
if(!is_html(doc.content)) {
doc.content = doc.content.replace("\n", "<br>");
}
$(repl('<a class="list-group-item">\
<div class="row col-md-12">%(subject)s</div>\
<div class="row text-muted">\
<div class="col-md-6">%(sender)s%(recipients)s</div>\
<div class="col-md-6 text-right">%(creation)s</div>\
</div>\
<div class="row col-md-12 msg-content" style="display: none;"><hr>%(content)s</div>\
</a>', doc))
.appendTo($list)
.on("click", function() {
$(this).find(".msg-content").toggle();
});
}
{%- endblock %}