BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
72b29525
Unverified
Commit
72b29525
authored
May 30, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show only personal projects on profile page
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
d54d3324
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
users_controller.rb
app/controllers/users_controller.rb
+3
-1
_projects.html.haml
app/views/users/_projects.html.haml
+1
-1
show.html.haml
app/views/users/show.html.haml
+2
-1
No files found.
app/controllers/users_controller.rb
View file @
72b29525
...
...
@@ -4,10 +4,12 @@ class UsersController < ApplicationController
def
show
@user
=
User
.
find_by_username!
(
params
[
:username
])
@projects
=
@user
.
authorized_projects
.
accessible_to
(
current_user
)
@projects
=
Project
.
personal
(
@user
).
accessible_to
(
current_user
)
if
!
current_user
&&
@projects
.
empty?
return
authenticate_user!
end
@groups
=
@user
.
groups
.
accessible_to
(
current_user
)
@events
=
@user
.
recent_events
.
where
(
project_id:
@projects
.
pluck
(
:id
)).
limit
(
20
)
@title
=
@user
.
name
...
...
app/views/users/_projects.html.haml
View file @
72b29525
.panel.panel-default
.panel-heading
Projects
.panel-heading
P
ersonal p
rojects
%ul
.well-list
-
@projects
.
each
do
|
project
|
%li
...
...
app/views/users/show.html.haml
View file @
72b29525
...
...
@@ -20,4 +20,5 @@
=
render
@events
.col-md-4
=
render
'profile'
,
user:
@user
=
render
'projects'
-
if
@projects
.
present?
=
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