summaryrefslogtreecommitdiff
path: root/app/views/shared/members
diff options
context:
space:
mode:
authorAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2016-12-14 15:51:25 -0600
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2016-12-17 13:22:19 -0600
commit8c2297f00b96cafea2adf7918086b3ef5fd049fc (patch)
treea135921c66b76d62a1c784d6420dfc65375e0a56 /app/views/shared/members
parent546fa165ff728bc2d25ed9b55b95dd1d48139d4a (diff)
downloadgitlab-ce-8c2297f00b96cafea2adf7918086b3ef5fd049fc.tar.gz
Move access request buttons to project header
Diffstat (limited to 'app/views/shared/members')
-rw-r--r--app/views/shared/members/_access_request_buttons.html.haml29
1 files changed, 15 insertions, 14 deletions
diff --git a/app/views/shared/members/_access_request_buttons.html.haml b/app/views/shared/members/_access_request_buttons.html.haml
index e166dfab710..e9b9ed554c1 100644
--- a/app/views/shared/members/_access_request_buttons.html.haml
+++ b/app/views/shared/members/_access_request_buttons.html.haml
@@ -1,16 +1,17 @@
- 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))
- = link_to "Leave #{model_name}", polymorphic_path([:leave, source, :members]),
- method: :delete,
- data: { confirm: leave_confirmation_message(source) },
- class: 'btn'
-- elsif requester = source.requesters.find_by(user_id: current_user.id)
- = link_to 'Withdraw Access Request', polymorphic_path([:leave, source, :members]),
- method: :delete,
- data: { confirm: remove_member_message(requester) },
- class: 'btn'
-- elsif source.request_access_enabled && can?(current_user, :request_access, source)
- = link_to 'Request Access', polymorphic_path([:request_access, source, :members]),
- method: :post,
- class: 'btn'
+.access-button.inline.hidden-sm.hidden-xs
+ - if can?(current_user, :"destroy_#{model_name}_member", source.members.find_by(user_id: current_user.id))
+ = link_to "Leave #{model_name}", polymorphic_path([:leave, source, :members]),
+ method: :delete,
+ data: { confirm: leave_confirmation_message(source) },
+ class: 'btn'
+ - elsif requester = source.requesters.find_by(user_id: current_user.id)
+ = link_to 'Withdraw Access Request', polymorphic_path([:leave, source, :members]),
+ method: :delete,
+ data: { confirm: remove_member_message(requester) },
+ class: 'btn'
+ - elsif source.request_access_enabled && can?(current_user, :request_access, source)
+ = link_to 'Request Access', polymorphic_path([:request_access, source, :members]),
+ method: :post,
+ class: 'btn'