Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
c7c541c9
Commit
c7c541c9
authored
Jan 04, 2013
by
Sofia Papagiannaki
Browse files
Do not allow user whose project acceptation is
pending to leave the project.
parent
feb4f6a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-astakos-app/astakos/im/tables.py
View file @
c7c541c9
...
...
@@ -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 ?'
)
el
se
:
el
if
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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment