diff --git a/Gemfile b/Gemfile index de03e4fd..7ea9f783 100644 --- a/Gemfile +++ b/Gemfile @@ -76,8 +76,8 @@ group :test, :development do gem 'pry-remote' gem 'pry-stack_explorer' gem 'pry-debugger' + gem 'debugger' gem 'faker' - gem "sunspot-rails-tester" gem 'database_cleaner' #Strategies for cleaning databases. Can be used to ensure a clean state for testing. gem "rspec", "~> 2.0" @@ -93,4 +93,3 @@ group :test, :development do # gem "bluecloth" end -gem 'debugger' diff --git a/app/controllers/front_controller.rb b/app/controllers/front_controller.rb index eb14b25d..15a9d986 100644 --- a/app/controllers/front_controller.rb +++ b/app/controllers/front_controller.rb @@ -2,6 +2,11 @@ class FrontController < ApplicationController layout false + def show_breadcrumb + @ancestors = Page.find(params[:menu_page_id]).ancestors_and_self.map{|m|m.title_translations[locale]}.delete_at(0) rescue [] + @ancestors.delete_at(0) + end + def show_banner @ad_banner = AdBanner.find(params[:id]) rescue nil end diff --git a/app/views/admin/page_parts/_public_r_tag.html.erb b/app/views/admin/page_parts/_public_r_tag.html.erb index 68f91dbc..9a3ce984 100644 --- a/app/views/admin/page_parts/_public_r_tag.html.erb +++ b/app/views/admin/page_parts/_public_r_tag.html.erb @@ -7,7 +7,8 @@ <%= f.hidden_field :public_r_tag_object_id, :value => @part.page.id %> <%#= f.select :public_r_tag_object_id, options_for_select([t(:horizontal), t(:vertical)], t(:horizontal)) %> <% elsif @r_tag.eql?('sitemap') %> + <% elsif @r_tag.eql?('breadcrumb') %> <% else %> <%= f.select :public_r_tag_object_id, options_from_collection_for_select(@tag_objects, :id, :title, :selected => @part.public_r_tag_object_id) %> <% end %> - \ No newline at end of file + diff --git a/app/views/front/show_breadcrumb.html.erb b/app/views/front/show_breadcrumb.html.erb new file mode 100644 index 00000000..afba97b2 --- /dev/null +++ b/app/views/front/show_breadcrumb.html.erb @@ -0,0 +1,11 @@ +<% if not @ancestors.empty? %> +
\\n \"\n\n\n; _erbout.concat((h frames.first.filename.split(\"/\").last ).to_s); _erbout.concat \"
\"\n; _erbout.concat((h frames.first.function ).to_s); _erbout.concat \"\\n
\"\n; _erbout.concat((h frame.filename ).to_s); _erbout.concat \"
in\\n \"\n; _erbout.concat((h frame.function ).to_s); _erbout.concat \"
\\n \"\n; _erbout.concat((h line ).to_s); _erbout.concat \"
\"; _erbout.concat((\n h frame.context_line ).to_s); _erbout.concat \"
\"\n; _erbout.concat((h line ).to_s); _erbout.concat \"
Variable | \\nValue | \\n
---|---|
\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \" | \\n\"\n; _erbout.concat((h val.inspect ).to_s); _erbout.concat \" | \\n
No GET data.
\\n \"\n\n; end ; _erbout.concat \"\\n \\nVariable | \\nValue | \\n
---|---|
\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \" | \\n\"\n; _erbout.concat((h val.inspect ).to_s); _erbout.concat \" | \\n
No POST data.
\\n \"\n\n; end ; _erbout.concat \"\\n \\nVariable | \\nValue | \\n
---|---|
\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \" | \\n\"\n; _erbout.concat((h val ).to_s); _erbout.concat \" | \\n
You're seeing this error because you have\\nenabled the show_exceptions
setting.