imposed a constraint that edit_task url is not displayed if task is OP and has claimed_users.
--- a/taskapp/views/task.py Mon Mar 01 05:41:12 2010 +0530
+++ b/taskapp/views/task.py Mon Mar 01 05:46:13 2010 +0530
@@ -80,10 +80,12 @@
'is_mentor':is_mentor,
}
+ claimed_users = task.claimed_users.all()
+
context['task_viewable'] = True if ( task.status != "UP" ) or is_mentor else False
context['can_publish'] = True if task.status == "UP" and user == task.created_by else False
- context['can_edit'] = True if task.status in ["UP", "LO", "OP"] and is_mentor else False
+ context['can_edit'] = True if ( not claimed_users ) and task.status in ["UP", "LO", "OP"] and is_mentor else False
context['can_close'] = True if task.status not in ["UP", "CD", "CM"] and is_mentor else False
context['can_mod_mentors'] = True if task.status in ["UP", "OP", "LO", "WR"] and is_mentor else False