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

31 lines
940 B
HTML
Raw Normal View History

{% extends "app/website/templates/html/transactions.html" %}
{% block javascript -%}
{{ super() }}
var status_label = {
"Open": "label-success",
"Waiting for Customer": "label-danger",
"Closed": "label-default"
}
var render = function(doc) {
doc.status = doc.status.trim();
doc.label_class = status_label[doc.status] || "label-default";
if(doc.status==="Waiting for Customer") doc.status = "To Reply";
$(repl('<a href="{{ page }}?name=%(name)s" class="list-group-item">\
<div class="row">\
<div class="col-md-2" style="margin-bottom: 7px;"><span class="label %(label_class)s">\
%(status)s</span></div>\
<div class="col-md-8">\
<div class="row col-md-12">%(name)s</div>\
<div class="row col-md-12 text-muted">%(subject)s</div>\
</div>\
<div class="col-md-2 pull-right">\
<span class="text-muted">%(creation)s</span>\
</div>\
</div>\
</a>', doc)).appendTo($list);
};
{%- endblock %}