Added Enable and disable terms of use, sitemap
This commit is contained in:
1 parent
5c8a57e700
commit
55fa1cef4f
11 files changed
+84
-26
No files matched your search
@@ -125,6 +125,7 @@ module ParserCommon
|
||||
def parse_sub_menus_edit(body = nil, page = nil, edit=nil)
|
||||
body.css('sub_menu').each do |sub_menu|
|
||||
menu_page = Page.find(sub_menu['id']) rescue nil
|
||||
|
||||
res = ''
|
||||
if menu_page && menu_page.visible_children.size > 0
|
||||
res << "<div class='category_list'>"
|
||||
@@ -245,6 +246,15 @@ module ParserCommon
|
||||
sitemap.swap(fragment)
|
||||
end
|
||||
|
||||
# terms_of_use
|
||||
def parse_terms_of_uses_edit(body = nil, page = nil, edit=nil)
|
||||
terms_of_use = body.css('terms_of_use').first
|
||||
url = front_show_terms_of_use_path
|
||||
options = "?inner=true"
|
||||
fragment = Nokogiri::HTML::DocumentFragment.new(body, "<div class='dymanic_load' path='#{url + options}'></div>")
|
||||
terms_of_use.swap(fragment)
|
||||
end
|
||||
|
||||
# page_contents
|
||||
def parse_contents_edit(body, page, edit=nil)
|
||||
public_r_tags = []
|
||||
|
||||
@@ -222,4 +222,9 @@ module ParserFrontEnd
|
||||
def generate_tag_clouds(*args)
|
||||
"<div class='dymanic_load' path='#{front_show_tag_cloud_path(args[0])}'></div>"
|
||||
end
|
||||
|
||||
# tag_cloud
|
||||
def generate_terms_of_uses(*args)
|
||||
"<div class='dymanic_load' path='#{front_show_terms_of_use_path}'></div>"
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user