diff --git a/projects/doctype/task/task_list.js b/projects/doctype/task/task_list.js index 468f1f3755..e6f3a73ce0 100644 --- a/projects/doctype/task/task_list.js +++ b/projects/doctype/task/task_list.js @@ -9,30 +9,41 @@ wn.doclistviews['Task'] = wn.views.ListView.extend({ '`tabTask`.priority', '`tabTask`.allocated_to', ]); + this.stats = this.stats.concat(['status']); + }, + + label_style: { + "status": { + "Open": "danger", + "Closed": "success", + "Hold": "info", + "Waiting for Customer": "info" + } }, prepare_data: function(data) { this._super(data); - data.opening_date = wn.datetime.str_to_user(data.opening_date); + + data.label_style = this.label_style.status[data.status]; + + data.status_html = repl('%(status)s', data); + + // escape double quotes + data.description = cstr(data.subject) + + " | " + cstr(data.description); + + data.description = data.description.replace(/"/gi, '\"') + .replace(//gi, '>'); }, columns: [ {width: '3%', content: 'check'}, - {width: '5%', content: 'avatar'}, - {width: '3%', content: 'docstatus'}, - {width: '12%', content: 'name'}, - {width: '30%', content: 'subject+tags'}, - { - width: '15%', - content: function(parent, data) { - $(parent).html(data.status + - (data.priority ? " [" + data.priority + "]" : "") - ); - }, - }, + {width: '5%', content: 'avatar_modified'}, + {width: '20%', content:'name'}, + {width: '10%', content:'status_html'}, + {width: '40%', content: 'subject+tags'}, {width: '20%', content: 'allocated_to'}, - {width: '12%', content:'opening_date', css: { - 'text-align': 'right', 'color':'#777' - }}, + {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}} ] }); diff --git a/setup/doctype/email_digest/email_digest.py b/setup/doctype/email_digest/email_digest.py index 08e1dfe543..f8754f3327 100644 --- a/setup/doctype/email_digest/email_digest.py +++ b/setup/doctype/email_digest/email_digest.py @@ -28,6 +28,22 @@ content_sequence = ["income_year_to_date", "bank_balance", "new_purchase_orders", "new_purchase_receipts", "new_stock_entries", "new_support_tickets", "new_communications", "new_projects", "open_tickets"] +digest_template = """
%(date)s
+To change what you see here, +create more digests, go to Setup > Email Digest
""" + +row_template = """+%(label)s: + + %(currency)s%(value)s +
""" + class DocType: def __init__(self, doc, doclist=[]): self.doc, self.doclist = doc, doclist @@ -87,12 +103,7 @@ class DocType: date = self.doc.frequency == "Daily" and formatdate(self.from_date) or \ "%s to %s" % (formatdate(self.from_date), formatdate(self.to_date)) - msg = """%(date)s
-- %(label)s: - - %(currency)s%(value)s -
""" % { + return row_template % { "style": style or "", "label": label, "currency": currency and (currency+" ") or "",