From bfad8467c8504c55b69d50ac73da2ab8e517228c Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Sat, 2 Feb 2013 01:25:11 +0800 Subject: [PATCH] breadcrumb widget of front-end has done Conflicts: app/controllers/front_controller.rb lib/parsers/parser_common.rb --- app/controllers/front_controller.rb | 2 +- lib/parsers/parser_common.rb | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/controllers/front_controller.rb b/app/controllers/front_controller.rb index 3648f6a4..686c504e 100644 --- a/app/controllers/front_controller.rb +++ b/app/controllers/front_controller.rb @@ -3,7 +3,7 @@ class FrontController < ApplicationController layout false def show_breadcrumb - @ancestors = Page.find(params[:page_id]).ancestors_and_self + @ancestors = Page.find(params[:id]).ancestors_and_self @ancestors.delete_at(0) end diff --git a/lib/parsers/parser_common.rb b/lib/parsers/parser_common.rb index b1b32332..d2591200 100644 --- a/lib/parsers/parser_common.rb +++ b/lib/parsers/parser_common.rb @@ -147,7 +147,7 @@ module ParserCommon # breadcrumb def parse_breadcrumbs_edit(body = nil, page = nil, edit=nil) body.css('breadcrumb').each do |breadcrumb| - ancestors = Page.find(page.id).ancestors_and_self.map{|m|m.title} rescue nil + ancestors = Page.find(page.id).ancestors_and_self rescue nil ancestors.delete_at(0) res = '' @@ -156,7 +156,7 @@ module ParserCommon res << "" @@ -207,10 +207,7 @@ module ParserCommon '' end end -<<<<<<< HEAD -======= ->>>>>>> cf956ac... breadcrumb widget of back-end has done, front-end has bug... # sitemap def parse_sitemaps_edit(body = nil, page = nil, edit=nil) sitemap = body.css('sitemap').first