\
-
', order)).appendTo($list);
// items
$.each(order.items || [], function(i, item) {
- var $item = $(repl('
\
-
\
+ item.export_rate = format_currency(item.export_rate, order.currency);
+ var $item = $(repl('
\
%(item_name)s
\
-
%(export_rate)s
\
-
%(status)s
\
+
%(qty)s %(stock_uom)s
\
+
%(export_rate)s
\
\
-
', item)).appendTo($order);
+
', item)).appendTo($order.find(".span8"));
});
$("
").appendTo($list);
diff --git a/website/templates/pages/ticket.html b/website/templates/pages/ticket.html
new file mode 100644
index 00000000000..fe185f82ba2
--- /dev/null
+++ b/website/templates/pages/ticket.html
@@ -0,0 +1,49 @@
+{% extends "html/page.html" %}
+
+{% set title=doc.name %}
+
+{% block content %}
+
+
+
{{ doc.name }}
+
+ {%- if doc.status -%}
+
+
+
+ {{ doc.subject }}
+
+
+ {{ utils.formatdate(doc.transaction_date) }}
+
+
+
+
Messages
+ {%- if doclist.get({"doctype":"Communication"}) -%}
+
+
+
+ {%- for comm in doclist.get({"doctype":"Communication"}) %}
+
+
+ {{ comm.sender }} on {{ utils.formatdate(doc.modified) }}
+ {{ comm.content }}
+ |
+
+ {% endfor -%}
+
+
+
+ {%- else -%}
+
No messages
+ {%- endif -%}
+ {%- endif -%}
+
+{% endblock %}
\ No newline at end of file
diff --git a/website/templates/pages/tickets.html b/website/templates/pages/tickets.html
index 822cd04d86b..11da32978df 100644
--- a/website/templates/pages/tickets.html
+++ b/website/templates/pages/tickets.html
@@ -1,6 +1,6 @@
{% extends "html/page.html" %}
-{% set title="My Orders" %}
+{% set title="My Tickets" %}
{% block content %}
@@ -40,7 +40,7 @@ $(document).ready(function() {
// parent
var $ticket = $(repl('
\
%(status)s
\
-
\
+
\
%(subject)s
\
', ticket)).appendTo($list);
diff --git a/website/utils.py b/website/utils.py
index b059bea3de7..94c9e872f5f 100644
--- a/website/utils.py
+++ b/website/utils.py
@@ -18,36 +18,9 @@ from __future__ import unicode_literals
import os
import conf
+from website.settings import *
import webnotes
-
-page_map = {
- 'Web Page': webnotes._dict({
- "template": 'html/web_page.html',
- "condition_field": "published"
- }),
- 'Blog Post': webnotes._dict({
- "template": 'html/blog_page.html',
- "condition_field": "published",
- }),
- 'Item': webnotes._dict({
- "template": 'html/product_page.html',
- "condition_field": "show_in_website",
- }),
- 'Item Group': webnotes._dict({
- "template": "html/product_group.html",
- "condition_field": "show_in_website"
- })
-}
-
-page_settings_map = {
- "about": "website.doctype.about_us_settings.about_us_settings.get_args",
- "contact": "Contact Us Settings",
- "blog": "website.helpers.blog.get_blog_template_args",
- "writers": "website.helpers.blog.get_writers_args",
- "print": "core.doctype.print_format.print_format.get_args"
-}
-
-no_cache = ["message", "print"]
+import webnotes.utils
def render(page_name):
"""render html page"""
@@ -257,7 +230,8 @@ def get_outer_env(page_name, args):
order by idx asc""", as_dict=1),
'int':int,
- "webnotes": webnotes
+ "webnotes": webnotes,
+ "utils": webnotes.utils
})
args.update(ret)