fixed all button for page settings and also filter display after page refresh

This commit is contained in:
harrybomrah committed 2013-11-06 22:30:41 +08:00
1 parent 591a3e0bc4
commit 4697a0d237
4 files changed
+74 -24

No files matched your search

+2 -2
View File
@@ -60,8 +60,8 @@ class Admin::PagesController < Admin::ItemsController
m = {}
m["main"] = page.module_app_id.to_s
m["sub"] = page.app_frontend_url
m["category"] = page.category.present? ? [0, page.category.map{|c| c.to_s}] : [1]
m["tags"] = page.tag.present? ? [0, page.tag.map{|c| c.to_s}] : [1]
m["category"] = page.category.present? ? page.category.map{|c| c.to_s} : []
m["tags"] = page.tag.present? ? page.tag.map{|c| c.to_s} : []
m["public"] = page.is_published ? 1 : 0
m["link"] = @site_valid_locales.inject([]) do |link, locale|
link << [locale, (page.enabled_for && page.enabled_for.include?(locale)) ? 1 : 0, (page.menu_enabled_for && page.menu_enabled_for[locale].eql?('true')) ? 1 :0]