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,6 +75,18 @@ class PagesController < ApplicationController
end end
params[:url] = page.url params[:url] = page.url
categories = [] categories = []
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| page.categories.each do |c|
category = Category.find(c) rescue nil category = Category.find(c) rescue nil
if !category.nil? && !category.disable if !category.nil? && !category.disable
@ -82,6 +94,7 @@ class PagesController < ApplicationController
end end
end end
categories = ["all"] if categories.blank? categories = ["all"] if categories.blank?
end
@manifest = @key @manifest = @key
OrbitHelper.set_params params,current_user OrbitHelper.set_params params,current_user
OrbitHelper.set_site_locale locale OrbitHelper.set_site_locale locale