2013-08-30 12:53:50 +00:00
|
|
|
{% extends "app/website/templates/html/transactions.html" %}
|
2013-03-21 11:42:25 +00:00
|
|
|
|
2013-08-30 12:53:50 +00:00
|
|
|
{% block javascript -%}
|
|
|
|
{{ super() }}
|
2013-03-21 11:42:25 +00:00
|
|
|
|
2013-08-30 12:53:50 +00:00
|
|
|
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">\
|
2013-09-04 11:16:08 +00:00
|
|
|
<div class="col-md-2" style="margin-bottom: 7px;"><span class="label %(label_class)s">\
|
|
|
|
%(status)s</span></div>\
|
2013-08-30 12:53:50 +00:00
|
|
|
<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>\
|
2013-09-04 11:16:08 +00:00
|
|
|
<div class="col-md-2 pull-right">\
|
|
|
|
<span class="text-muted">%(creation)s</span>\
|
2013-08-30 12:53:50 +00:00
|
|
|
</div>\
|
|
|
|
</div>\
|
|
|
|
</a>', doc)).appendTo($list);
|
|
|
|
};
|
|
|
|
{%- endblock %}
|