Commit 8c2297f0 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Move access request buttons to project header

parent 546fa165
...@@ -178,8 +178,10 @@ ...@@ -178,8 +178,10 @@
.download-button, .download-button,
.dropdown-toggle, .dropdown-toggle,
.notification-dropdown, .notification-dropdown,
.project-dropdown { .project-dropdown,
.access-button {
margin-left: 10px; margin-left: 10px;
vertical-align: top;
} }
.notification-dropdown .dropdown-menu { .notification-dropdown .dropdown-menu {
...@@ -201,7 +203,7 @@ ...@@ -201,7 +203,7 @@
display: inline-block; display: inline-block;
input { input {
height: 29px; height: 28px;
} }
} }
...@@ -255,7 +257,7 @@ ...@@ -255,7 +257,7 @@
line-height: 13px; line-height: 13px;
padding: $gl-vert-padding $gl-padding; padding: $gl-vert-padding $gl-padding;
letter-spacing: .4px; letter-spacing: .4px;
padding: 7px 14px; padding: 6px 14px;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
touch-action: manipulation; touch-action: manipulation;
......
...@@ -26,3 +26,6 @@ ...@@ -26,3 +26,6 @@
- if @project.feature_available?(:repository, current_user) - if @project.feature_available?(:repository, current_user)
.project-clone-holder .project-clone-holder
= render "shared/clone_panel" = render "shared/clone_panel"
- if current_user
= render 'shared/members/access_request_buttons', source: @project
...@@ -69,7 +69,6 @@ ...@@ -69,7 +69,6 @@
%li.project-repo-buttons.right %li.project-repo-buttons.right
.project-right-buttons .project-right-buttons
- if current_user - if current_user
= render 'shared/members/access_request_buttons', source: @project
= render "projects/buttons/koding" = render "projects/buttons/koding"
.btn-group.project-repo-btn-group .btn-group.project-repo-btn-group
......
- model_name = source.model_name.to_s.downcase - model_name = source.model_name.to_s.downcase
- if can?(current_user, :"destroy_#{model_name}_member", source.members.find_by(user_id: current_user.id)) .access-button.inline.hidden-sm.hidden-xs
= link_to "Leave #{model_name}", polymorphic_path([:leave, source, :members]), - if can?(current_user, :"destroy_#{model_name}_member", source.members.find_by(user_id: current_user.id))
method: :delete, = link_to "Leave #{model_name}", polymorphic_path([:leave, source, :members]),
data: { confirm: leave_confirmation_message(source) }, method: :delete,
class: 'btn' data: { confirm: leave_confirmation_message(source) },
- elsif requester = source.requesters.find_by(user_id: current_user.id) class: 'btn'
= link_to 'Withdraw Access Request', polymorphic_path([:leave, source, :members]), - elsif requester = source.requesters.find_by(user_id: current_user.id)
method: :delete, = link_to 'Withdraw Access Request', polymorphic_path([:leave, source, :members]),
data: { confirm: remove_member_message(requester) }, method: :delete,
class: 'btn' data: { confirm: remove_member_message(requester) },
- elsif source.request_access_enabled && can?(current_user, :request_access, source) class: 'btn'
= link_to 'Request Access', polymorphic_path([:request_access, source, :members]), - elsif source.request_access_enabled && can?(current_user, :request_access, source)
method: :post, = link_to 'Request Access', polymorphic_path([:request_access, source, :members]),
class: 'btn' method: :post,
class: 'btn'
---
title: Move access project button to header
merge_request:
author:
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