From c3a98d8fcc2f9f7a0ce8816c8cf9dbebe58e64e9 Mon Sep 17 00:00:00 2001 From: Elias Werberich Date: Thu, 24 Mar 2016 11:12:45 +0100 Subject: Implementing 'Groups View' and 'TODOs View' as options for dashboard preferences. Fixes #14585. --- app/controllers/root_controller.rb | 4 ++++ app/helpers/preferences_helper.rb | 4 +++- app/models/user.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'app') 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. -- cgit v1.2.3