taskapp/utilities/notification.py
changeset 199 946d0fe60606
parent 186 c083ebb6f8d7
child 201 c429873d8ac8
--- a/taskapp/utilities/notification.py	Thu Mar 04 15:31:40 2010 +0530
+++ b/taskapp/utilities/notification.py	Thu Mar 04 17:29:00 2010 +0530
@@ -222,6 +222,21 @@
             notification.remarks = remarks
             notification.message += "<b>Reason: </b>%s"%remarks
 
+    elif role == "CL":
+
+        notification.sent_from = sent_from
+        notification.task = task
+        notification.remarks = remarks
+
+        claimed_by_url = '<a href="/user/view/uid=%s">%s</a>'%(sent_from.id, sent_from.username)
+        task_url = '<a href="/task/view/tid=%s">%s</a>'%(task.id, task.title)
+
+        notification.sub = 'New claim for the task "%s"'%(task.title[:20])
+        notification.message = '%s has submitted a claim for the task "%s" mentored by you.<br />'%(claimed_by_url, task_url)
+        notification.message += '<b>Claim proposal:</b> %s'%(remarks)
+
+
+
     notification.save()
 
 def mark_notification_read(notification_id):