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
Léo-Paul Géneau
gitlab-ce
Commits
9b3e156e
Commit
9b3e156e
authored
Mar 08, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move profile groups page to dashboard
parent
8b551ee3
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
16 deletions
+16
-16
CHANGELOG
CHANGELOG
+1
-0
app/controllers/dashboard/groups_controller.rb
app/controllers/dashboard/groups_controller.rb
+2
-4
app/views/dashboard/groups/index.html.haml
app/views/dashboard/groups/index.html.haml
+1
-1
app/views/groups/group_members/_group_member.html.haml
app/views/groups/group_members/_group_member.html.haml
+1
-1
app/views/layouts/nav/_dashboard.html.haml
app/views/layouts/nav/_dashboard.html.haml
+5
-0
app/views/layouts/nav/_profile.html.haml
app/views/layouts/nav/_profile.html.haml
+0
-5
config/routes.rb
config/routes.rb
+6
-5
No files found.
CHANGELOG
View file @
9b3e156e
...
...
@@ -31,6 +31,7 @@ v 7.9.0 (unreleased)
- Condense commits already in target branch when updating merge request source branch.
- Send notifications and leave system comments when bulk updating issues.
- Automatically link commit ranges to compare page: sha1...sha4 or sha1..sha4 (includes sha1 in comparison)
- Move groups page from profile to dashboard
v 7.8.2
- Fix service migration issue when upgrading from versions prior to 7.3
...
...
app/controllers/
profiles
/groups_controller.rb
→
app/controllers/
dashboard
/groups_controller.rb
View file @
9b3e156e
class
Profiles::GroupsController
<
ApplicationController
layout
"profile"
class
Dashboard::GroupsController
<
ApplicationController
def
index
@user_groups
=
current_user
.
group_members
.
page
(
params
[
:page
]).
per
(
20
)
end
...
...
@@ -9,7 +7,7 @@ class Profiles::GroupsController < ApplicationController
@users_group
=
group
.
group_members
.
where
(
user_id:
current_user
.
id
).
first
if
can?
(
current_user
,
:destroy
,
@users_group
)
@users_group
.
destroy
redirect_to
(
profile
_groups_path
,
info:
"You left
#{
group
.
name
}
group."
)
redirect_to
(
dashboard
_groups_path
,
info:
"You left
#{
group
.
name
}
group."
)
else
return
render_403
end
...
...
app/views/
profiles
/groups/index.html.haml
→
app/views/
dashboard
/groups/index.html.haml
View file @
9b3e156e
...
...
@@ -23,7 +23,7 @@
Settings
-
if
can?
(
current_user
,
:destroy
,
user_group
)
=
link_to
leave_
profile
_group_path
(
group
),
data:
{
confirm:
leave_group_message
(
group
.
name
)
},
method: :delete
,
class:
"btn-small btn btn-grouped"
,
title:
'Remove user from group'
do
=
link_to
leave_
dashboard
_group_path
(
group
),
data:
{
confirm:
leave_group_message
(
group
.
name
)
},
method: :delete
,
class:
"btn-small btn btn-grouped"
,
title:
'Remove user from group'
do
%i
.fa.fa-sign-out
Leave
...
...
app/views/groups/group_members/_group_member.html.haml
View file @
9b3e156e
...
...
@@ -19,7 +19,7 @@
%i
.fa.fa-pencil-square-o
-
if
can?
(
current_user
,
:destroy
,
member
)
-
if
current_user
==
member
.
user
=
link_to
leave_
profile
_group_path
(
@group
),
data:
{
confirm:
leave_group_message
(
@group
.
name
)},
method: :delete
,
class:
"btn-tiny btn btn-remove"
,
title:
'Remove user from group'
do
=
link_to
leave_
dashboard
_group_path
(
@group
),
data:
{
confirm:
leave_group_message
(
@group
.
name
)},
method: :delete
,
class:
"btn-tiny btn btn-remove"
,
title:
'Remove user from group'
do
%i
.fa.fa-minus.fa-inverse
-
else
=
link_to
group_group_member_path
(
@group
,
member
),
data:
{
confirm:
remove_user_from_group_message
(
@group
,
user
)
},
method: :delete
,
remote:
true
,
class:
"btn-tiny btn btn-remove"
,
title:
'Remove user from group'
do
...
...
app/views/layouts/nav/_dashboard.html.haml
View file @
9b3e156e
...
...
@@ -9,6 +9,11 @@
%i
.fa.fa-cube
%span
Projects
=
nav_link
(
controller: :groups
)
do
=
link_to
dashboard_groups_path
,
title:
'Groups'
do
%i
.fa.fa-group
%span
Groups
=
nav_link
(
controller: :milestones
)
do
=
link_to
dashboard_milestones_path
,
title:
'Milestones'
do
%i
.fa.fa-clock-o
...
...
app/views/layouts/nav/_profile.html.haml
View file @
9b3e156e
...
...
@@ -43,11 +43,6 @@
%i
.fa.fa-image
%span
Design
=
nav_link
(
controller: :groups
)
do
=
link_to
profile_groups_path
,
title:
'Groups'
do
%i
.fa.fa-group
%span
Groups
=
nav_link
(
path:
'profiles#history'
)
do
=
link_to
history_profile_path
,
title:
'History'
do
%i
.fa.fa-history
...
...
config/routes.rb
View file @
9b3e156e
...
...
@@ -193,11 +193,6 @@ Gitlab::Application.routes.draw do
end
resources
:keys
resources
:emails
,
only:
[
:index
,
:create
,
:destroy
]
resources
:groups
,
only:
[
:index
]
do
member
do
delete
:leave
end
end
resource
:avatar
,
only:
[
:destroy
]
end
end
...
...
@@ -220,6 +215,12 @@ Gitlab::Application.routes.draw do
scope
module: :dashboard
do
resources
:milestones
,
only:
[
:index
,
:show
]
resources
:groups
,
only:
[
:index
]
do
member
do
delete
:leave
end
end
end
end
...
...
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