Commit c7c541c9 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

Do not allow user whose project acceptation is

pending to leave the project.
parent feb4f6a5
......@@ -154,19 +154,23 @@ def action_extra_context(project, table, self):
action = _('Update')
confirm = False
prompt = ''
elif user.is_project_member(project):
elif user.is_project_accepted_member(project):
url = 'astakos.im.views.project_leave'
action = _('- Leave')
confirm = True
prompt = _('Are you sure you want to leave from the project ?')
else:
elif not user.is_project_member(project):
url = 'astakos.im.views.project_join'
action = _('+ Join')
confirm = True
prompt = _('Are you sure you want to join this project ?')
else:
action = _('Pending')
return {'action': action, 'confirm': confirm,
'url': reverse(url, args=(project.pk, )) + append_url,
url = reverse(url, args=(project.pk, )) + append_url if url else ''
return {'action': action,
'confirm': confirm,
'url': url,
'prompt': prompt}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment