Commit 0622b875 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'admin-user-projects' into 'master'

Fix admin user projects lists.

The admin user personal projects lists wasn't being rendered anymore.

cc @marin

See merge request !442
parents a9af6485 2d5f4458
...@@ -48,6 +48,8 @@ v 7.10.0 (unreleased) ...@@ -48,6 +48,8 @@ v 7.10.0 (unreleased)
- Prevent note form from being cleared when submitting failed. - Prevent note form from being cleared when submitting failed.
- Improve file icons rendering on tree (Sullivan Sénéchal) - Improve file icons rendering on tree (Sullivan Sénéchal)
- API: Add pagination to project events - API: Add pagination to project events
- Don't show commit comment button when user is not signed in.
- Fix admin user projects lists.
v 7.9.0 v 7.9.0
- Send EmailsOnPush email when branch or tag is created or deleted. - Send EmailsOnPush email when branch or tag is created or deleted.
......
...@@ -100,6 +100,8 @@ class Dispatcher ...@@ -100,6 +100,8 @@ class Dispatcher
when 'users:show' when 'users:show'
new User() new User()
new Activities() new Activities()
when 'admin:users:show'
new ProjectsList()
switch path.first() switch path.first()
when 'admin' when 'admin'
......
- if @contributed_projects.present? - if local_assigns.has_key?(:contributed_projects) && contributed_projects.present?
.panel.panel-default.contributed-projects .panel.panel-default.contributed-projects
.panel-heading Projects contributed to .panel-heading Projects contributed to
= render 'shared/projects_list', = render 'shared/projects_list',
projects: @contributed_projects.sort_by(&:star_count).reverse, projects: contributed_projects.sort_by(&:star_count).reverse,
projects_limit: 5, stars: true, avatar: false projects_limit: 5, stars: true, avatar: false
- if @projects.present? - if local_assigns.has_key?(:projects) && projects.present?
.panel.panel-default .panel.panel-default
.panel-heading Personal projects .panel-heading Personal projects
= render 'shared/projects_list', = render 'shared/projects_list',
projects: @projects.sort_by(&:star_count).reverse, projects: projects.sort_by(&:star_count).reverse,
projects_limit: 10, stars: true, avatar: false projects_limit: 10, stars: true, avatar: false
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
= spinner = spinner
%aside.col-md-4 %aside.col-md-4
= render 'profile', user: @user = render 'profile', user: @user
= render 'projects' = render 'projects', projects: @projects, contributed_projects: @contributed_projects
:coffeescript :coffeescript
$(".user-calendar").load("#{user_calendar_path}") $(".user-calendar").load("#{user_calendar_path}")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment