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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
99682502
Commit
99682502
authored
Mar 22, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add inifinite scroll to user activity on user page
parent
29f6b01d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
6 deletions
+17
-6
CHANGELOG
CHANGELOG
+1
-0
app/assets/javascripts/dispatcher.js.coffee
app/assets/javascripts/dispatcher.js.coffee
+1
-0
app/controllers/users_controller.rb
app/controllers/users_controller.rb
+13
-5
app/views/users/show.html.haml
app/views/users/show.html.haml
+2
-1
No files found.
CHANGELOG
View file @
99682502
...
@@ -23,6 +23,7 @@ v 7.10.0 (unreleased)
...
@@ -23,6 +23,7 @@ v 7.10.0 (unreleased)
- Restrict permissions on backup files
- Restrict permissions on backup files
- Improve oauth accounts UI in profile page
- Improve oauth accounts UI in profile page
- Add ability to unlink connected accounts
- Add ability to unlink connected accounts
- Add inifinite scroll to user page activity
v 7.9.0 (unreleased)
v 7.9.0 (unreleased)
- Add HipChat integration documentation (Stan Hu)
- Add HipChat integration documentation (Stan Hu)
...
...
app/assets/javascripts/dispatcher.js.coffee
View file @
99682502
...
@@ -97,6 +97,7 @@ class Dispatcher
...
@@ -97,6 +97,7 @@ class Dispatcher
new
ProjectFork
()
new
ProjectFork
()
when
'users:show'
when
'users:show'
new
User
()
new
User
()
new
Activities
()
switch
path
.
first
()
switch
path
.
first
()
when
'admin'
when
'admin'
...
...
app/controllers/users_controller.rb
View file @
99682502
...
@@ -16,17 +16,16 @@ class UsersController < ApplicationController
...
@@ -16,17 +16,16 @@ class UsersController < ApplicationController
# Collect only groups common for both users
# Collect only groups common for both users
@groups
=
@user
.
groups
&
GroupsFinder
.
new
.
execute
(
current_user
)
@groups
=
@user
.
groups
&
GroupsFinder
.
new
.
execute
(
current_user
)
# Get user activity feed for projects common for both users
@events
=
@user
.
recent_events
.
where
(
project_id:
authorized_projects_ids
).
with_associations
.
limit
(
30
)
@title
=
@user
.
name
@title
=
@user
.
name
@title_url
=
user_path
(
@user
)
@title_url
=
user_path
(
@user
)
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
format
.
html
format
.
atom
{
render
layout:
false
}
format
.
atom
{
render
layout:
false
}
format
.
json
do
load_events
pager_json
(
"events/_events"
,
@events
.
count
)
end
end
end
end
end
...
@@ -82,4 +81,13 @@ class UsersController < ApplicationController
...
@@ -82,4 +81,13 @@ class UsersController < ApplicationController
@authorized_projects_ids
||=
@authorized_projects_ids
||=
ProjectsFinder
.
new
.
execute
(
current_user
).
pluck
(
:id
)
ProjectsFinder
.
new
.
execute
(
current_user
).
pluck
(
:id
)
end
end
def
load_events
# Get user activity feed for projects common for both users
@events
=
@user
.
recent_events
.
where
(
project_id:
authorized_projects_ids
).
with_associations
@events
=
@events
.
limit
(
20
).
offset
(
params
[
:offset
]
||
0
)
end
end
end
app/views/users/show.html.haml
View file @
99682502
...
@@ -40,7 +40,8 @@
...
@@ -40,7 +40,8 @@
%strong
%strong
%i
.fa.fa-rss
%i
.fa.fa-rss
=
render
@events
.content_list
=
spinner
%aside
.col-md-4
%aside
.col-md-4
=
render
'profile'
,
user:
@user
=
render
'profile'
,
user:
@user
=
render
'projects'
=
render
'projects'
...
...
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