diff --git a/app/controllers/repository_rows_controller.rb b/app/controllers/repository_rows_controller.rb index d2a84a9cb..335291900 100644 --- a/app/controllers/repository_rows_controller.rb +++ b/app/controllers/repository_rows_controller.rb @@ -213,12 +213,12 @@ class RepositoryRowsController < ApplicationController params[:query], whole_phrase: true ) - viewable_modules = assigned_modules.viewable_by_user(current_user, current_user.teams) - private_modules = assigned_modules - viewable_modules + viewable_modules = assigned_modules.viewable_by_user(current_user, current_team) + private_modules_number = assigned_modules.where.not(id: viewable_modules).count render json: { html: render_to_string(partial: 'shared/my_modules_list_partial.html.erb', locals: { my_modules: viewable_modules, - private_modules: private_modules + private_modules_number: private_modules_number }) } end diff --git a/app/views/shared/_my_modules_list_partial.html.erb b/app/views/shared/_my_modules_list_partial.html.erb index c3bb1bac4..43eed252b 100644 --- a/app/views/shared/_my_modules_list_partial.html.erb +++ b/app/views/shared/_my_modules_list_partial.html.erb @@ -1,43 +1,44 @@
<%= t('my_modules.modules_list_partial.no_results.description') %>
-<%= t('my_modules.modules_list_partial.no_results.description') %>
+