Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-03-26 13:08:48 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-03-26 13:08:48 +0300
commitea8bd204e3c6fe297cdea07ee0ac8e1e8daf87c1 (patch)
tree347780b5963b0d7983ceee6389652d2dd35b1dd6 /app
parentc44de4f21ee6db857f0c6f086f7a3ce649d1c50c (diff)
parentc3a98d8fcc2f9f7a0ce8816c8cf9dbebe58e64e9 (diff)
Merge branch 'feature--preferences-dashboard-groups' of https://gitlab.com/eliasw/gitlab-ce
Diffstat (limited to 'app')
-rw-r--r--app/controllers/root_controller.rb4
-rw-r--r--app/helpers/preferences_helper.rb4
-rw-r--r--app/models/user.rb2
3 files changed, 8 insertions, 2 deletions
diff --git a/app/controllers/root_controller.rb b/app/controllers/root_controller.rb
index ad04c646e1b..627be74a38f 100644
--- a/app/controllers/root_controller.rb
+++ b/app/controllers/root_controller.rb
@@ -26,6 +26,10 @@ class RootController < Dashboard::ProjectsController
redirect_to activity_dashboard_path
when 'starred_project_activity'
redirect_to activity_dashboard_path(filter: 'starred')
+ when 'groups'
+ redirect_to dashboard_groups_path
+ when 'todos'
+ redirect_to dashboard_todos_path
else
return
end
diff --git a/app/helpers/preferences_helper.rb b/app/helpers/preferences_helper.rb
index c73cb3028ee..c3832cf5d65 100644
--- a/app/helpers/preferences_helper.rb
+++ b/app/helpers/preferences_helper.rb
@@ -12,7 +12,9 @@ module PreferencesHelper
projects: 'Your Projects (default)',
stars: 'Starred Projects',
project_activity: "Your Projects' Activity",
- starred_project_activity: "Starred Projects' Activity"
+ starred_project_activity: "Starred Projects' Activity",
+ groups: "Your Groups",
+ todos: "Your Todos"
}.with_indifferent_access.freeze
# Returns an Array usable by a select field for more user-friendly option text
diff --git a/app/models/user.rb b/app/models/user.rb
index 9c315cfe966..128ddc2a694 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -184,7 +184,7 @@ class User < ActiveRecord::Base
# User's Dashboard preference
# Note: When adding an option, it MUST go on the end of the array.
- enum dashboard: [:projects, :stars, :project_activity, :starred_project_activity]
+ enum dashboard: [:projects, :stars, :project_activity, :starred_project_activity, :groups, :todos]
# User's Project preference
# Note: When adding an option, it MUST go on the end of the array.