fix member list

This commit is contained in:
JiangRu 2014-12-31 10:11:39 +08:00
parent 380e2cd4f9
commit 76397de5ef
1 changed files with 18 additions and 5 deletions

View File

@ -75,13 +75,26 @@ class PagesController < ApplicationController
end
params[:url] = page.url
categories = []
page.categories.each do |c|
category = Category.find(c) rescue nil
if !category.nil? && !category.disable
categories << c
if page.module == "member"
if page.categories.first == "all"
categories = ["all"]
else
page.categories.each do |c|
category = Role.find(c) rescue nil
if !category.nil? && !category.disabled
categories << c
end
end
end
else
page.categories.each do |c|
category = Category.find(c) rescue nil
if !category.nil? && !category.disable
categories << c
end
end
categories = ["all"] if categories.blank?
end
categories = ["all"] if categories.blank?
@manifest = @key
OrbitHelper.set_params params,current_user
OrbitHelper.set_site_locale locale