sous pages
This commit is contained in:
parent
f6e50a2cc5
commit
1f443d1704
7
app/helpers/menu_items_helper.rb
Normal file
7
app/helpers/menu_items_helper.rb
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# -*- encoding : utf-8 -*-
|
||||||
|
module MenuItemsHelper
|
||||||
|
def menu_item_link(menu_item)
|
||||||
|
link_to menu_item.name, menu_item_path(:url => menu_item.url), :class => ("active" if @menu_item and (@menu_item == menu_item or @menu_item.ancestors.include?(menu_item)))
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
@ -1 +1,38 @@
|
|||||||
|
-content_for :sidebar do
|
||||||
|
|
||||||
|
-if @menu_item.parent_id
|
||||||
|
-if @menu_item.ancestors.reverse[0]
|
||||||
|
-first_level_menu = @menu_item.ancestors.reverse[0]
|
||||||
|
|
||||||
|
-else
|
||||||
|
|
||||||
|
-first_level_menu = @menu_item
|
||||||
|
|
||||||
|
-if first_level_menu.children.size > 0
|
||||||
|
.square
|
||||||
|
%h2=menu_item_link(first_level_menu)
|
||||||
|
%ul
|
||||||
|
-first_level_menu.children.where(:enabled => true, :visible => true).order(:position).each do |menu_item|
|
||||||
|
|
||||||
|
%li
|
||||||
|
=menu_item_link(menu_item)
|
||||||
|
-if menu_item.children.where(:enabled => true, :visible => true).size > 0
|
||||||
|
%ul
|
||||||
|
-menu_item.children.where(:enabled => true, :visible => true).order(:position).each do |menu_item|
|
||||||
|
%li=menu_item_link(menu_item)
|
||||||
|
-if first_level_menu.slug == "livres-eft"
|
||||||
|
%li=link_to "Ebook Maigrir Durablement avec l'EFT", "http://www.maigrir-durablement-avec-eft.com/", :target => "_blank"
|
||||||
|
%li=link_to "Ebook Arrêter de Fumer avec l'EFT", "http://www.arreter-de-fumer-avec-eft.com/", :target => "_blank"
|
||||||
|
|
||||||
|
.breadcrumb
|
||||||
|
-if @menu_item.ancestors
|
||||||
|
=link_to i(:home), "/"
|
||||||
|
>
|
||||||
|
-for menu_item in @menu_item.ancestors.reverse
|
||||||
|
=menu_item_link(menu_item)
|
||||||
|
>
|
||||||
|
|
||||||
|
=@menu_item.name
|
||||||
|
|
||||||
|
|
||||||
=render :partial => "public/blocks/block", :locals => {:block => @menu_item.menu_content.blocks[0]}
|
=render :partial => "public/blocks/block", :locals => {:block => @menu_item.menu_content.blocks[0]}
|
@ -1,5 +1,5 @@
|
|||||||
# -*- encoding : utf-8 -*-
|
# -*- encoding : utf-8 -*-
|
||||||
HOSTNAME = 'http://new.lepicvert.org'
|
HOSTNAME = 'http://lepicvert.org'
|
||||||
|
|
||||||
Survey::Application.configure do
|
Survey::Application.configure do
|
||||||
# Settings specified here will take precedence over those in config/application.rb.
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
@ -91,7 +91,7 @@ Survey::Application.configure do
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
config.action_mailer.default_url_options = { :host => "new.lepicvert.org" }
|
config.action_mailer.default_url_options = { :host => "lepicvert.org" }
|
||||||
|
|
||||||
config.action_mailer.delivery_method = :smtp
|
config.action_mailer.delivery_method = :smtp
|
||||||
config.action_mailer.smtp_settings = {
|
config.action_mailer.smtp_settings = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user