diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-08 17:03:30 -0700 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-08 17:03:30 -0700 |
commit | 9b3e156e43b8a14e4eb294a47bda6a477c8573b0 (patch) | |
tree | 4e1de7b6835ac646b34761b5814e4afe250f3f8c | |
parent | 8b551ee31858db9c5da1ff5245359151d5b71211 (diff) | |
download | gitlab-ce-9b3e156e43b8a14e4eb294a47bda6a477c8573b0.tar.gz |
Move profile groups page to dashboard
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/controllers/dashboard/groups_controller.rb (renamed from app/controllers/profiles/groups_controller.rb) | 6 | ||||
-rw-r--r-- | app/views/dashboard/groups/index.html.haml (renamed from app/views/profiles/groups/index.html.haml) | 2 | ||||
-rw-r--r-- | app/views/groups/group_members/_group_member.html.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/nav/_dashboard.html.haml | 5 | ||||
-rw-r--r-- | app/views/layouts/nav/_profile.html.haml | 5 | ||||
-rw-r--r-- | config/routes.rb | 11 |
7 files changed, 16 insertions, 16 deletions
diff --git a/CHANGELOG b/CHANGELOG index b8f95994213..d88e45c0fc3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/app/controllers/profiles/groups_controller.rb b/app/controllers/dashboard/groups_controller.rb index ce9dd50df67..61d691e6368 100644 --- a/app/controllers/profiles/groups_controller.rb +++ b/app/controllers/dashboard/groups_controller.rb @@ -1,6 +1,4 @@ -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 diff --git a/app/views/profiles/groups/index.html.haml b/app/views/dashboard/groups/index.html.haml index daf76636ff2..fd7bbb5500c 100644 --- a/app/views/profiles/groups/index.html.haml +++ b/app/views/dashboard/groups/index.html.haml @@ -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 diff --git a/app/views/groups/group_members/_group_member.html.haml b/app/views/groups/group_members/_group_member.html.haml index 21029c3a07d..30c3c2b00df 100644 --- a/app/views/groups/group_members/_group_member.html.haml +++ b/app/views/groups/group_members/_group_member.html.haml @@ -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 diff --git a/app/views/layouts/nav/_dashboard.html.haml b/app/views/layouts/nav/_dashboard.html.haml index 304744ba251..a22ddaf1cfd 100644 --- a/app/views/layouts/nav/_dashboard.html.haml +++ b/app/views/layouts/nav/_dashboard.html.haml @@ -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 diff --git a/app/views/layouts/nav/_profile.html.haml b/app/views/layouts/nav/_profile.html.haml index 0914d2a167a..d88e862829d 100644 --- a/app/views/layouts/nav/_profile.html.haml +++ b/app/views/layouts/nav/_profile.html.haml @@ -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 diff --git a/config/routes.rb b/config/routes.rb index 6dd9ded0193..1b855cd7a32 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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 |