summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2019-02-06 14:49:30 +0000
committerGrzegorz Bizon <grzegorz@gitlab.com>2019-02-06 14:49:30 +0000
commit8e9dd62233ac667281aca872c35be08fc213dfd5 (patch)
tree5793af9dc1c56c89eb2026da29ad2ffc9c1a7416
parent60876192f89e41494cb56e2dc0a90f5f0dbfa716 (diff)
parentf9c5c7aece95df650fb628b9068d0e59e5018e67 (diff)
downloadgitlab-ce-8e9dd62233ac667281aca872c35be08fc213dfd5.tar.gz
Merge branch '7048_add_preference_ui_for_group_overview_be-ce' into 'master'
Add UI for "Group Overview default" preference in User Settings See merge request gitlab-org/gitlab-ce!24761
-rw-r--r--app/controllers/profiles/preferences_controller.rb12
-rw-r--r--app/views/layouts/nav/sidebar/_group.html.haml2
-rw-r--r--app/views/profiles/preferences/show.html.haml3
3 files changed, 9 insertions, 8 deletions
diff --git a/app/controllers/profiles/preferences_controller.rb b/app/controllers/profiles/preferences_controller.rb
index 37ac11dc6a1..a27e3cceaeb 100644
--- a/app/controllers/profiles/preferences_controller.rb
+++ b/app/controllers/profiles/preferences_controller.rb
@@ -33,12 +33,10 @@ class Profiles::PreferencesController < Profiles::ApplicationController
end
def preferences_params
- params.require(:user).permit(
- :color_scheme_id,
- :layout,
- :dashboard,
- :project_view,
- :theme_id
- )
+ params.require(:user).permit(preferences_param_names)
+ end
+
+ def preferences_param_names
+ [:color_scheme_id, :layout, :dashboard, :project_view, :theme_id]
end
end
diff --git a/app/views/layouts/nav/sidebar/_group.html.haml b/app/views/layouts/nav/sidebar/_group.html.haml
index bf475c07711..3fbaaafe89e 100644
--- a/app/views/layouts/nav/sidebar/_group.html.haml
+++ b/app/views/layouts/nav/sidebar/_group.html.haml
@@ -36,7 +36,7 @@
%span
= _('Activity')
- = render_if_exists 'groups/sidebar/security_dashboard'
+ = render_if_exists 'groups/sidebar/security_dashboard' # EE-specific
- if group_sidebar_link?(:contribution_analytics)
= nav_link(path: 'analytics#show') do
diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml
index 7c378633667..c1616810185 100644
--- a/app/views/profiles/preferences/show.html.haml
+++ b/app/views/profiles/preferences/show.html.haml
@@ -51,6 +51,9 @@
= f.label :dashboard, class: 'label-bold' do
Default dashboard
= f.select :dashboard, dashboard_choices, {}, class: 'form-control'
+
+ = render_if_exists 'profiles/preferences/group_overview_selector', f: f # EE-specific
+
.form-group
= f.label :project_view, class: 'label-bold' do
Project overview content