diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-11-30 12:18:59 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-11-30 19:57:26 +0300 |
commit | d2f21bf72ae842c81c00b840f7e39780c442e717 (patch) | |
tree | 696e5d9d07ddb9b68eb2a7a943e7e5c471e3cdfe /app | |
parent | 3b9a9109388f02e5ed127e24d32838a9cd761b59 (diff) |
Merge branch 'fix-admin-page-personal-projects' into 'master'
Fix Error 500 when viewing user's personal projects from admin page
This is a regression introduced in 4d7f00f.
Closes #3680
Closes https://github.com/gitlabhq/gitlabhq/issues/9861
Closes gitlab-org/gitlab-ee#90
See merge request !1909
Diffstat (limited to 'app')
-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. |