Rushabh Mehta | 3023a8f | 2013-04-03 16:34:23 +0530 | [diff] [blame] | 1 | {% extends "app/website/templates/html/page.html" %} |
Rushabh Mehta | da512ba | 2013-03-22 12:45:44 +0530 | [diff] [blame] | 2 | |
| 3 | {% set title=doc.name %} |
| 4 | |
Anand Doshi | 85ef502 | 2013-09-04 16:46:08 +0530 | [diff] [blame^] | 5 | {% set status_label = { |
| 6 | "Open": "label-success", |
| 7 | "To Reply": "label-danger", |
| 8 | "Closed": "label-default" |
| 9 | } %} |
| 10 | |
Rushabh Mehta | da512ba | 2013-03-22 12:45:44 +0530 | [diff] [blame] | 11 | {% block content %} |
Rushabh Mehta | cce21d1 | 2013-08-21 17:48:08 +0530 | [diff] [blame] | 12 | <div class="col-md-12"> |
Rushabh Mehta | da512ba | 2013-03-22 12:45:44 +0530 | [diff] [blame] | 13 | <ul class="breadcrumb"> |
Anand Doshi | f7e5648 | 2013-08-29 17:46:40 +0530 | [diff] [blame] | 14 | <li><a href="index">Home</a></li> |
| 15 | <li><a href="account">My Account</a></li> |
| 16 | <li><a href="tickets">My Tickets</a></li> |
| 17 | <li class="active"><i class="icon-ticket icon-fixed-width"></i> {{ doc.name }}</li> |
Rushabh Mehta | da512ba | 2013-03-22 12:45:44 +0530 | [diff] [blame] | 18 | </ul> |
Anand Doshi | f7e5648 | 2013-08-29 17:46:40 +0530 | [diff] [blame] | 19 | <h3><i class="icon-ticket icon-fixed-width"></i> {{ doc.name }}</h3> |
Rushabh Mehta | da512ba | 2013-03-22 12:45:44 +0530 | [diff] [blame] | 20 | <hr> |
| 21 | {%- if doc.status -%} |
Anand Doshi | 85ef502 | 2013-09-04 16:46:08 +0530 | [diff] [blame^] | 22 | {% if doc.status == "Waiting for Customer" -%} |
| 23 | {% set status = "To Reply" %} |
| 24 | {% else %} |
| 25 | {% set status = doc.status %} |
| 26 | {%- endif -%} |
Rushabh Mehta | da512ba | 2013-03-22 12:45:44 +0530 | [diff] [blame] | 27 | <div class="row"> |
Anand Doshi | 85ef502 | 2013-09-04 16:46:08 +0530 | [diff] [blame^] | 28 | <div class="col-md-2" style="margin-bottom: 7px;"> |
| 29 | <span class="label {{ status_label.get(status) or 'label-default' }}">{{ status }}</span> |
Rushabh Mehta | da512ba | 2013-03-22 12:45:44 +0530 | [diff] [blame] | 30 | </div> |
Anand Doshi | 85ef502 | 2013-09-04 16:46:08 +0530 | [diff] [blame^] | 31 | <div class="col-md-8"> |
| 32 | <div class="row col-md-12">{{ doc.subject }}</div> |
Rushabh Mehta | da512ba | 2013-03-22 12:45:44 +0530 | [diff] [blame] | 33 | </div> |
Anand Doshi | 85ef502 | 2013-09-04 16:46:08 +0530 | [diff] [blame^] | 34 | <div class="col-md-2 pull-right"> |
| 35 | <span class="text-muted">{{ utils.formatdate(doc.creation) }}</span> |
Rushabh Mehta | da512ba | 2013-03-22 12:45:44 +0530 | [diff] [blame] | 36 | </div> |
| 37 | </div> |
| 38 | <br> |
| 39 | <h4>Messages</h4> |
| 40 | {%- if doclist.get({"doctype":"Communication"}) -%} |
Anand Doshi | 85ef502 | 2013-09-04 16:46:08 +0530 | [diff] [blame^] | 41 | <div> |
Rushabh Mehta | da512ba | 2013-03-22 12:45:44 +0530 | [diff] [blame] | 42 | <table class="table table-bordered table-striped"> |
| 43 | <tbody> |
| 44 | {%- for comm in doclist.get({"doctype":"Communication"}) %} |
| 45 | <tr> |
| 46 | <td> |
Anand Doshi | 85ef502 | 2013-09-04 16:46:08 +0530 | [diff] [blame^] | 47 | <h5 style="text-transform: none"> |
| 48 | {{ comm.sender }} on {{ utils.formatdate(doc.modified) }}</h5> |
| 49 | <p>{{ webnotes.utils.is_html(comm.content) and comm.content or |
| 50 | comm.content.replace("\n", "<br>")}}</p> |
Rushabh Mehta | da512ba | 2013-03-22 12:45:44 +0530 | [diff] [blame] | 51 | </td> |
| 52 | </tr> |
| 53 | {% endfor -%} |
| 54 | </tbody> |
| 55 | </table> |
| 56 | </div> |
| 57 | {%- else -%} |
| 58 | <div class="alert">No messages</div> |
| 59 | {%- endif -%} |
| 60 | {%- endif -%} |
| 61 | </div> |
| 62 | {% endblock %} |