diff --git a/app/controllers/groups/profile_controller.rb b/app/controllers/groups/profile_controller.rb index 1fd4ebab5..ff35cac4a 100644 --- a/app/controllers/groups/profile_controller.rb +++ b/app/controllers/groups/profile_controller.rb @@ -10,7 +10,7 @@ class Groups::ProfileController < Groups::BaseController end def show - @projects = @group.projects #.paginate(:page => params[:project_page], :per_page => 10) + @projects = @group.projects.by_visibilities(['open']) end def new diff --git a/app/controllers/users/profile_controller.rb b/app/controllers/users/profile_controller.rb index 1e7c18869..25aa15e31 100644 --- a/app/controllers/users/profile_controller.rb +++ b/app/controllers/users/profile_controller.rb @@ -3,8 +3,6 @@ class Users::ProfileController < Users::BaseController autocomplete :user, :uname def show - @groups = @user.groups.uniq - @platforms = @user.platforms.paginate(:page => params[:platform_page], :per_page => 10) - @projects = @user.projects.paginate(:page => params[:project_page], :per_page => 10) + @projects = @user.projects.by_visibilities(['open']) end end diff --git a/app/views/groups/profile/show.html.haml b/app/views/groups/profile/show.html.haml index 8525cffe3..a67abf0e8 100644 --- a/app/views/groups/profile/show.html.haml +++ b/app/views/groups/profile/show.html.haml @@ -3,7 +3,7 @@ %h3= @group.name %h4= t("activerecord.attributes.group.description") + ":" %p= @group.description - %h4= t("layout.groups.projects_list") + ":" + %h4= t("layout.groups.public_projects_list") + ":" %p - @projects.each do |project| = link_to project.name, project diff --git a/app/views/users/profile/show.html.haml b/app/views/users/profile/show.html.haml index ace969117..3ab79e99f 100644 --- a/app/views/users/profile/show.html.haml +++ b/app/views/users/profile/show.html.haml @@ -12,7 +12,7 @@ %p= @user.professional_experience %h4= t("layout.users.public_projects_list") + ":" %p - - @user.projects.by_visibilities(['open']).each do |project| + - @projects.each do |project| = link_to project.name, project %br diff --git a/config/locales/models/group.en.yml b/config/locales/models/group.en.yml index f8e015de3..1cb6a06dc 100644 --- a/config/locales/models/group.en.yml +++ b/config/locales/models/group.en.yml @@ -16,6 +16,7 @@ en: description: Descripton leave_group: Leave group projects_list: Projects list + public_projects_list: Public projects list public_profile: Public profile delete_warning: Attention! Deleted group can not be restored! diff --git a/config/locales/models/group.ru.yml b/config/locales/models/group.ru.yml index 01c5aaf7a..c43e33e2a 100644 --- a/config/locales/models/group.ru.yml +++ b/config/locales/models/group.ru.yml @@ -16,6 +16,7 @@ ru: description: Описание leave_group: Покинуть группу projects_list: Список проектов + public_projects_list: Список публичных проектов public_profile: Публичный профиль delete_warning: Внимание! Удаленная группа восстановлению не подлежит.