Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
8c2297f0
Commit
8c2297f0
authored
Dec 14, 2016
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move access request buttons to project header
parent
546fa165
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
18 deletions
+27
-18
app/assets/stylesheets/pages/projects.scss
app/assets/stylesheets/pages/projects.scss
+5
-3
app/views/projects/_home_panel.html.haml
app/views/projects/_home_panel.html.haml
+3
-0
app/views/projects/show.html.haml
app/views/projects/show.html.haml
+0
-1
app/views/shared/members/_access_request_buttons.html.haml
app/views/shared/members/_access_request_buttons.html.haml
+15
-14
changelogs/unreleased/leave-project-btn.yml
changelogs/unreleased/leave-project-btn.yml
+4
-0
No files found.
app/assets/stylesheets/pages/projects.scss
View file @
8c2297f0
...
...
@@ -178,8 +178,10 @@
.download-button
,
.dropdown-toggle
,
.notification-dropdown
,
.project-dropdown
{
.project-dropdown
,
.access-button
{
margin-left
:
10px
;
vertical-align
:
top
;
}
.notification-dropdown
.dropdown-menu
{
...
...
@@ -201,7 +203,7 @@
display
:
inline-block
;
input
{
height
:
2
9
px
;
height
:
2
8
px
;
}
}
...
...
@@ -255,7 +257,7 @@
line-height
:
13px
;
padding
:
$gl-vert-padding
$gl-padding
;
letter-spacing
:
.4px
;
padding
:
7
px
14px
;
padding
:
6
px
14px
;
text-align
:
center
;
vertical-align
:
middle
;
touch-action
:
manipulation
;
...
...
app/views/projects/_home_panel.html.haml
View file @
8c2297f0
...
...
@@ -26,3 +26,6 @@
-
if
@project
.
feature_available?
(
:repository
,
current_user
)
.project-clone-holder
=
render
"shared/clone_panel"
-
if
current_user
=
render
'shared/members/access_request_buttons'
,
source:
@project
app/views/projects/show.html.haml
View file @
8c2297f0
...
...
@@ -69,7 +69,6 @@
%li
.project-repo-buttons.right
.project-right-buttons
-
if
current_user
=
render
'shared/members/access_request_buttons'
,
source:
@project
=
render
"projects/buttons/koding"
.btn-group.project-repo-btn-group
...
...
app/views/shared/members/_access_request_buttons.html.haml
View file @
8c2297f0
-
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'
changelogs/unreleased/leave-project-btn.yml
0 → 100644
View file @
8c2297f0
---
title
:
Move access project button to header
merge_request
:
author
:
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