equal
deleted
inserted
replaced
78 'deps':deps, |
78 'deps':deps, |
79 'is_guest':is_guest, |
79 'is_guest':is_guest, |
80 'is_mentor':is_mentor, |
80 'is_mentor':is_mentor, |
81 } |
81 } |
82 |
82 |
|
83 claimed_users = task.claimed_users.all() |
|
84 |
83 context['task_viewable'] = True if ( task.status != "UP" ) or is_mentor else False |
85 context['task_viewable'] = True if ( task.status != "UP" ) or is_mentor else False |
84 |
86 |
85 context['can_publish'] = True if task.status == "UP" and user == task.created_by else False |
87 context['can_publish'] = True if task.status == "UP" and user == task.created_by else False |
86 context['can_edit'] = True if task.status in ["UP", "LO", "OP"] and is_mentor else False |
88 context['can_edit'] = True if ( not claimed_users ) and task.status in ["UP", "LO", "OP"] and is_mentor else False |
87 context['can_close'] = True if task.status not in ["UP", "CD", "CM"] and is_mentor else False |
89 context['can_close'] = True if task.status not in ["UP", "CD", "CM"] and is_mentor else False |
88 |
90 |
89 context['can_mod_mentors'] = True if task.status in ["UP", "OP", "LO", "WR"] and is_mentor else False |
91 context['can_mod_mentors'] = True if task.status in ["UP", "OP", "LO", "WR"] and is_mentor else False |
90 context['can_mod_tasks'] = True if task.status in ["UP", "OP", "LO"] and is_mentor else False |
92 context['can_mod_tasks'] = True if task.status in ["UP", "OP", "LO"] and is_mentor else False |
91 |
93 |