mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-04 05:58:27 +00:00
[website] [minor] moving to framework
This commit is contained in:
67
support/doctype/support_ticket/templates/ticket.html
Normal file
67
support/doctype/support_ticket/templates/ticket.html
Normal file
@@ -0,0 +1,67 @@
|
||||
{% 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 %}
|
||||
<div class="col-md-12">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="index">Home</a></li>
|
||||
<li><a href="account">My Account</a></li>
|
||||
<li><a href="tickets">My Tickets</a></li>
|
||||
<li class="active"><i class="icon-ticket icon-fixed-width"></i> {{ doc.name }}</li>
|
||||
</ul>
|
||||
<h3><i class="icon-ticket icon-fixed-width"></i> {{ doc.name }}</h3>
|
||||
{% if doc.name == "Not Allowed" -%}
|
||||
<script>ask_to_login();</script>
|
||||
{% else %}
|
||||
<hr>
|
||||
{%- if doc.status -%}
|
||||
{% if doc.status == "Waiting for Customer" -%}
|
||||
{% set status = "To Reply" %}
|
||||
{% else %}
|
||||
{% set status = doc.status %}
|
||||
{%- endif -%}
|
||||
<div class="row">
|
||||
<div class="col-md-2" style="margin-bottom: 7px;">
|
||||
<span class="label {{ status_label.get(status) or 'label-default' }}">{{ status }}</span>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="row col-md-12">{{ doc.subject }}</div>
|
||||
</div>
|
||||
<div class="col-md-2 pull-right">
|
||||
<span class="text-muted">{{ utils.formatdate(doc.creation) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<h4>Messages</h4>
|
||||
{%- if doclist.get({"doctype":"Communication"}) -%}
|
||||
<div>
|
||||
<table class="table table-bordered table-striped">
|
||||
<tbody>
|
||||
{%- for comm in doclist.get({"doctype":"Communication"}) %}
|
||||
<tr>
|
||||
<td>
|
||||
<h5 style="text-transform: none">
|
||||
{{ comm.sender }} on {{ utils.formatdate(doc.modified) }}</h5>
|
||||
<hr>
|
||||
<p>{{ webnotes.utils.is_html(comm.content) and comm.content or
|
||||
comm.content.replace("\n", "<br>")}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor -%}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{%- else -%}
|
||||
<div class="alert">No messages</div>
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{% endif -%}
|
||||
</div>
|
||||
{% endblock %}
|
||||
31
support/doctype/support_ticket/templates/tickets.html
Normal file
31
support/doctype/support_ticket/templates/tickets.html
Normal file
@@ -0,0 +1,31 @@
|
||||
{% 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 %}
|
||||
Reference in New Issue
Block a user