diff --git a/lib/parsers/parser_back_end.rb b/lib/parsers/parser_back_end.rb index 24b6c59f..0ebaf90b 100644 --- a/lib/parsers/parser_back_end.rb +++ b/lib/parsers/parser_back_end.rb @@ -28,6 +28,7 @@ module ParserBackEnd parse_menu(body, page, true) public_r_tags = parse_content_edits(body, page, id) parse_images(body, page) + parse_footer(body, page, true) public_r_tags.each do |tag| send("parse_#{tag}s", body, page,id) diff --git a/lib/parsers/parser_common.rb b/lib/parsers/parser_common.rb index 66491232..04fe2e6c 100644 --- a/lib/parsers/parser_common.rb +++ b/lib/parsers/parser_common.rb @@ -1,5 +1,6 @@ module ParserCommon - + include ActionView::Helpers::TagHelper + def menu_level(page, current, menu, edit = false) res = '' if menu.levels > 0 && current <= menu.levels @@ -127,4 +128,14 @@ module ParserCommon end end + # page_menu + def parse_footer(body, page, edit=nil) + page_footer = body.css('.page_footer').first + res = "
" + fragment = Nokogiri::HTML::DocumentFragment.new(body ,res) + page_footer.swap(fragment) + end + end diff --git a/lib/parsers/parser_front_end.rb b/lib/parsers/parser_front_end.rb index c95cac4d..d37eba30 100644 --- a/lib/parsers/parser_front_end.rb +++ b/lib/parsers/parser_front_end.rb @@ -26,6 +26,7 @@ module ParserFrontEnd parse_menu(body, page) public_r_tags = parse_contents(body, page, id,params[:preview]) parse_images(body, page) + parse_footer(body, page, true) public_r_tags.each do |tag| send("parse_#{tag}s", body, page,id)