diff options
author | Stan Hu <stanhu@gmail.com> | 2015-11-25 14:00:35 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-11-25 14:00:35 -0800 |
commit | 36bde0fcb197aa7ca93bb615cda070f55f5e268f (patch) | |
tree | e9f55a6cb2d39ff2822a9c2bde6e434efe215bcd /app/views/admin | |
parent | dee28c50a90acaf1a364d3971132c70c96493932 (diff) | |
download | gitlab-ce-36bde0fcb197aa7ca93bb615cda070f55f5e268f.tar.gz |
Fix Error 500 when viewing user's personal projects from admin page
This is a regression introduced in 4d7f00f.
Closes #3680
Diffstat (limited to 'app/views/admin')
-rw-r--r-- | app/views/admin/users/_projects.html.haml | 13 | ||||
-rw-r--r-- | app/views/admin/users/projects.html.haml | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/app/views/admin/users/_projects.html.haml b/app/views/admin/users/_projects.html.haml new file mode 100644 index 00000000000..a126a858ea8 --- /dev/null +++ b/app/views/admin/users/_projects.html.haml @@ -0,0 +1,13 @@ +- if local_assigns.has_key?(:contributed_projects) && contributed_projects.present? + .panel.panel-default.contributed-projects + .panel-heading Projects contributed to + = render 'shared/projects/list', + projects: contributed_projects.sort_by(&:star_count).reverse, + projects_limit: 5, stars: true, avatar: false + +- if local_assigns.has_key?(:projects) && projects.present? + .panel.panel-default + .panel-heading Personal projects + = render 'shared/projects/list', + projects: projects.sort_by(&:star_count).reverse, + projects_limit: 10, stars: true, avatar: false diff --git a/app/views/admin/users/projects.html.haml b/app/views/admin/users/projects.html.haml index 0d7a1a25a80..b655b2a15f5 100644 --- a/app/views/admin/users/projects.html.haml +++ b/app/views/admin/users/projects.html.haml @@ -14,7 +14,7 @@ .row .col-md-6 - if @personal_projects.present? - = render 'users/projects', projects: @personal_projects + = render 'admin/users/projects', projects: @personal_projects - else .nothing-here-block This user has no personal projects. |