Commit 7cebe9c5 authored by Imre Farkas's avatar Imre Farkas

Merge branch 'fix-sql-problems-in-admin-view' into 'master'

Refactor admin/groups/show view to make less db calls

See merge request gitlab-org/gitlab!27462
parents 438f0aff 65febfa1
...@@ -78,14 +78,15 @@ ...@@ -78,14 +78,15 @@
.card-footer .card-footer
= paginate @projects, param_name: 'projects_page', theme: 'gitlab' = paginate @projects, param_name: 'projects_page', theme: 'gitlab'
- if @group.shared_projects.any? - shared_projects = @group.shared_projects.sort_by(&:name)
- unless shared_projects.empty?
.card .card
.card-header .card-header
= _('Projects shared with %{group_name}') % { group_name: @group.name } = _('Projects shared with %{group_name}') % { group_name: @group.name }
%span.badge.badge-pill %span.badge.badge-pill
#{@group.shared_projects.count} #{shared_projects.size}
%ul.content-list %ul.content-list
- @group.shared_projects.sort_by(&:name).each do |project| - shared_projects.each do |project|
%li %li
%strong %strong
= link_to project.full_name, [:admin, project.namespace.becomes(Namespace), project] = link_to project.full_name, [:admin, project.namespace.becomes(Namespace), project]
......
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