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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
44f8742f
Commit
44f8742f
authored
Feb 25, 2021
by
Benj Fassbind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 'Followed User Activity' as dashboard user choices
parent
411e8901
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
27 additions
and
2 deletions
+27
-2
app/controllers/root_controller.rb
app/controllers/root_controller.rb
+2
-0
app/helpers/preferences_helper.rb
app/helpers/preferences_helper.rb
+1
-0
app/models/user.rb
app/models/user.rb
+1
-1
changelogs/unreleased/add-ollowed-user-activity-as-dashboard-user-choices.yml
...d/add-ollowed-user-activity-as-dashboard-user-choices.yml
+5
-0
doc/user/profile/preferences.md
doc/user/profile/preferences.md
+2
-1
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/controllers/root_controller_spec.rb
spec/controllers/root_controller_spec.rb
+12
-0
spec/helpers/preferences_helper_spec.rb
spec/helpers/preferences_helper_spec.rb
+1
-0
No files found.
app/controllers/root_controller.rb
View file @
44f8742f
...
...
@@ -46,6 +46,8 @@ class RootController < Dashboard::ProjectsController
redirect_to
(
activity_dashboard_path
)
when
'starred_project_activity'
redirect_to
(
activity_dashboard_path
(
filter:
'starred'
))
when
'followed_user_activity'
redirect_to
(
activity_dashboard_path
(
filter:
'followed'
))
when
'groups'
redirect_to
(
dashboard_groups_path
)
when
'todos'
...
...
app/helpers/preferences_helper.rb
View file @
44f8742f
...
...
@@ -29,6 +29,7 @@ module PreferencesHelper
stars:
_
(
"Starred Projects"
),
project_activity:
_
(
"Your Projects' Activity"
),
starred_project_activity:
_
(
"Starred Projects' Activity"
),
followed_user_activity:
_
(
"Followed Users' Activity"
),
groups:
_
(
"Your Groups"
),
todos:
_
(
"Your To-Do List"
),
issues:
_
(
"Assigned Issues"
),
...
...
app/models/user.rb
View file @
44f8742f
...
...
@@ -272,7 +272,7 @@ class User < ApplicationRecord
enum
layout:
{
fixed:
0
,
fluid:
1
}
# User's Dashboard preference
enum
dashboard:
{
projects:
0
,
stars:
1
,
project_activity:
2
,
starred_project_activity:
3
,
groups:
4
,
todos:
5
,
issues:
6
,
merge_requests:
7
,
operations:
8
}
enum
dashboard:
{
projects:
0
,
stars:
1
,
project_activity:
2
,
starred_project_activity:
3
,
groups:
4
,
todos:
5
,
issues:
6
,
merge_requests:
7
,
operations:
8
,
followed_user_activity:
9
}
# User's Project preference
enum
project_view:
{
readme:
0
,
activity:
1
,
files:
2
}
...
...
changelogs/unreleased/add-ollowed-user-activity-as-dashboard-user-choices.yml
0 → 100644
View file @
44f8742f
---
title
:
"
Add
'Followed
User
Activity'
as
dashboard
user
choices"
merge_request
:
55165
author
:
Benj Fassbind @randombenj
type
:
added
doc/user/profile/preferences.md
View file @
44f8742f
...
...
@@ -108,12 +108,13 @@ select few, the amount of activity on the default Dashboard page can be
overwhelming. Changing this setting allows you to redefine your default
dashboard.
You
have 8 options here that you can use
for your default dashboard view:
You
can include the following options
for your default dashboard view:
-
Your projects (default)
-
Starred projects
-
Your projects' activity
-
Starred projects' activity
-
Followed User' Activity
-
Your groups
-
Your
[
To-Do List
](
../todos.md
)
-
Assigned Issues
...
...
locale/gitlab.pot
View file @
44f8742f
...
...
@@ -13176,6 +13176,9 @@ msgstr ""
msgid "Follow"
msgstr ""
msgid "Followed Users' Activity"
msgstr ""
msgid "Followed users"
msgstr ""
...
...
spec/controllers/root_controller_spec.rb
View file @
44f8742f
...
...
@@ -68,6 +68,18 @@ RSpec.describe RootController do
end
end
context
'who has customized their dashboard setting for followed user activities'
do
before
do
user
.
dashboard
=
'followed_user_activity'
end
it
'redirects to the activity list'
do
get
:index
expect
(
response
).
to
redirect_to
activity_dashboard_path
(
filter:
'followed'
)
end
end
context
'who has customized their dashboard setting for groups'
do
before
do
user
.
dashboard
=
'groups'
...
...
spec/helpers/preferences_helper_spec.rb
View file @
44f8742f
...
...
@@ -29,6 +29,7 @@ RSpec.describe PreferencesHelper do
[
'Starred Projects'
,
'stars'
],
[
"Your Projects' Activity"
,
'project_activity'
],
[
"Starred Projects' Activity"
,
'starred_project_activity'
],
[
"Followed Users' Activity"
,
'followed_user_activity'
],
[
"Your Groups"
,
'groups'
],
[
"Your To-Do List"
,
'todos'
],
[
"Assigned Issues"
,
'issues'
],
...
...
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