summaryrefslogtreecommitdiff
path: root/app/views/projects/_aside.html.haml
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-29 15:10:46 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-29 15:10:46 +0000
commita3b60982e59b7a3be052a62b5d89393d12c64562 (patch)
treef13bd86a62c473079b418cd24d2d3dde5ebb3359 /app/views/projects/_aside.html.haml
parenta1c45338f37560b044f23f1af07fea7bef2107cd (diff)
parent7815f9ddaceaa379d7ccce1ab565ecb87bcaf845 (diff)
downloadgitlab-ce-a3b60982e59b7a3be052a62b5d89393d12c64562.tar.gz
Merge branch 'leave-project' into 'master'
Add ability to leave project Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> See merge request !744
Diffstat (limited to 'app/views/projects/_aside.html.haml')
-rw-r--r--app/views/projects/_aside.html.haml12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/views/projects/_aside.html.haml b/app/views/projects/_aside.html.haml
index 000a40b466d..9c2ff8f8402 100644
--- a/app/views/projects/_aside.html.haml
+++ b/app/views/projects/_aside.html.haml
@@ -94,3 +94,15 @@
= icon("exclamation-triangle fw")
Archived project!
%p Repository is read-only
+
+ - if current_user
+ - access = user_max_access_in_project(current_user, @project)
+ - if access
+ .light-well.light.prepend-top-20
+ %small
+ You have #{access} access to this project.
+ - if @project.project_member_by_id(current_user)
+ %br
+ = link_to leave_namespace_project_project_members_path(@project.namespace, @project),
+ data: { confirm: leave_project_message(@project) }, method: :delete, title: 'Leave project' do
+ Leave this project