back_end widget breadcrumb finish
This commit is contained in:
1 parent
0b88f7d1f8
commit
2a61470f8b
10 files changed
+69
-1048
No files matched your search
@@ -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
|
||||
|
||||
@@ -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 %>
|
||||
</span>
|
||||
</span>
|
||||
@@ -0,0 +1,11 @@
|
||||
<% if not @ancestors.empty? %>
|
||||
<div class='category_list'>
|
||||
<ul class='list'>
|
||||
<%= @ancestors.each do |node| %>
|
||||
<li class='active'>
|
||||
<%= link_to node.title, (node.class.to_s.eql?('Page') ? '/' + node.path : node.url) %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
Reference in new issue
Block a user