[refs #641] Show only public projects in group profile

This commit is contained in:
Vladimir Sharshov 2012-09-12 18:49:40 +04:00
parent 459e1ba2fa
commit e3bcd2382e
6 changed files with 6 additions and 6 deletions

View File

@ -10,7 +10,7 @@ class Groups::ProfileController < Groups::BaseController
end end
def show def show
@projects = @group.projects #.paginate(:page => params[:project_page], :per_page => 10) @projects = @group.projects.by_visibilities(['open'])
end end
def new def new

View File

@ -3,8 +3,6 @@ class Users::ProfileController < Users::BaseController
autocomplete :user, :uname autocomplete :user, :uname
def show def show
@groups = @user.groups.uniq @projects = @user.projects.by_visibilities(['open'])
@platforms = @user.platforms.paginate(:page => params[:platform_page], :per_page => 10)
@projects = @user.projects.paginate(:page => params[:project_page], :per_page => 10)
end end
end end

View File

@ -3,7 +3,7 @@
%h3= @group.name %h3= @group.name
%h4= t("activerecord.attributes.group.description") + ":" %h4= t("activerecord.attributes.group.description") + ":"
%p= @group.description %p= @group.description
%h4= t("layout.groups.projects_list") + ":" %h4= t("layout.groups.public_projects_list") + ":"
%p %p
- @projects.each do |project| - @projects.each do |project|
= link_to project.name, project = link_to project.name, project

View File

@ -12,7 +12,7 @@
%p= @user.professional_experience %p= @user.professional_experience
%h4= t("layout.users.public_projects_list") + ":" %h4= t("layout.users.public_projects_list") + ":"
%p %p
- @user.projects.by_visibilities(['open']).each do |project| - @projects.each do |project|
= link_to project.name, project = link_to project.name, project
%br %br

View File

@ -16,6 +16,7 @@ en:
description: Descripton description: Descripton
leave_group: Leave group leave_group: Leave group
projects_list: Projects list projects_list: Projects list
public_projects_list: Public projects list
public_profile: Public profile public_profile: Public profile
delete_warning: Attention! Deleted group can not be restored! delete_warning: Attention! Deleted group can not be restored!

View File

@ -16,6 +16,7 @@ ru:
description: Описание description: Описание
leave_group: Покинуть группу leave_group: Покинуть группу
projects_list: Список проектов projects_list: Список проектов
public_projects_list: Список публичных проектов
public_profile: Публичный профиль public_profile: Публичный профиль
delete_warning: Внимание! Удаленная группа восстановлению не подлежит. delete_warning: Внимание! Удаленная группа восстановлению не подлежит.