#345: fixed: visibility of projects

This commit is contained in:
Vokhmin Alexey V 2014-03-26 14:21:54 +04:00
parent 7f39986b99
commit 3cda2248a2
1 changed files with 2 additions and 1 deletions

View File

@ -10,7 +10,7 @@ class Groups::ProfileController < Groups::BaseController
def show
@path, page = group_path(@group), params[:page].to_i
@projects = @group.own_projects.opened.search(params[:search]).recent
@projects = @group.own_projects.search(params[:search]).recent
if request.xhr?
if params[:visibility] != 'hidden'
@projects = @projects.opened
@ -20,6 +20,7 @@ class Groups::ProfileController < Groups::BaseController
end
render partial: 'shared/profile_projects', layout: nil, locals: {projects: paginate_projects(page)}
else
@projects = @projects.opened
@projects = paginate_projects(page)
end
end